Live data from Hacker News

An early look at Postgres 14: Performance and monitoring Improvements

pganalyze.com

21–30 of 254 posts

Re: An early look at Postgres 14: Performance and monitoring Improvements

#21

I'm thinking of using Postgres for a project, but a DBA friend told me operationally it's more challenging than MySQL. Unfortunately, he can't elaborate. Does anyone have real work experience? Or is it based on outdated "PG must manually vacuum frequently"?

I don’t know if there are distros which tune it, but the default configuration is usually… conservative.

Re: An early look at Postgres 14: Performance and monitoring Improvements

#22
post #7

Earlier quoted context omitted.

MySQL 8 is not that far behind in feature parity. And is ahead when it comes to scalability. So I don't see postgres as necessarily standing alone.

You claim that MySQL 8 is ahead when it comes to scalability. What are the bases of this claim? When I see comparisons or entire systems that rely on a database (that is, not micro-benchmarks) such as the TechEmpower web framework benchmarks [0] , I notice that the 'Pg' results cluster near the top, with the "My" results showing up further down the rankings. I understand this isn't version 14 of the former versus ver…

well if you need more than one server, mysql has vitess, which is huge. postgres has citus, but that is way more complex to setup than vitess.

I still would never use mysql, just because of vitess.

Re: An early look at Postgres 14: Performance and monitoring Improvements

#23

Tangential to this topic: If I have a Django + PG query that takes 1 second and I want to deeply inspect the breakdown of that entire second, where might I begin reading to learn what tools to use and how?

EXPLAIN ANALYZE in Postgres will give you the query plan, learning to understand that output is very useful to figure out why a query is slow. If the query isn’t slow, you can look into Django, but the DB is often a good first guess in these cases.

Re: An early look at Postgres 14: Performance and monitoring Improvements

#24
post #10

Earlier quoted context omitted.

Fortran for linear algebra software. Excel for business spreadsheets. Java for enterprise server software.

> Java for enterprise server software. Big corporations are horribly inefficient and Enterprise Software necessarily so from that...if you're saying Java is terrible by nature of it being the goto for enterprise, then that makes sense. It took 20 years for it to swap places with COBOL and I expect it will be something else in 20 more.

I don't work with Java, but I can think of a few advantages off the top of my head:

- appreciation of backwards-compatibility (here it wins with Python);

- great debuggers and performance tools (e.g. Java Flight Recorder or Eclipse Memory Analyzer);

- easy deployment - you can just give someone a fat JAR (here it wins with all scripting languages, so Python, Ruby, PHP, or any other flavour of the month);

- industry-grade garbage collectors;

- publicly-available standard spec (here it wins with all the defined-by-implementation languages such as Python, PHP, Rust, basically most languages, and with languages which are standardized, but their specs aren't public: C, C++, Ruby);

- kind of like the previous point, but anyway: multiple implementations to choose from;

- I've been told it has good performance. I've never seen a real-world Java application which felt fast, but I've heard people put it at the pedestal and the Debian programming languages benchmarks game seems to corroborate that story;

Besides, the question wasn't about which technologies we like, but which we believe are entrenched so much, they aren't going to go away for a very long time. I don't see Java going away for another 100 years, no matter how much I would or wouldn't like to work with it.

Re: An early look at Postgres 14: Performance and monitoring Improvements

#25

Tangential to this topic: If I have a Django + PG query that takes 1 second and I want to deeply inspect the breakdown of that entire second, where might I begin reading to learn what tools to use and how?

I recommend the book "SQL Performance Explained" by Markus Winand: https://sql-performance-explained.com/

It covers all major databases and is a good start to dive into database interna and how to interpret output from query analyzers.

Other than that, I highly recommend joining the mailing list and IRC (#postgresql on libera.chat).

Lots of valuable tricks being shared there by people with decades of experience.

Re: An early look at Postgres 14: Performance and monitoring Improvements

#26

I'm thinking of using Postgres for a project, but a DBA friend told me operationally it's more challenging than MySQL. Unfortunately, he can't elaborate. Does anyone have real work experience? Or is it based on outdated "PG must manually vacuum frequently"?

One thing is that Postgres doesn’t let you just upgrade to a new major version, as it doesn’t update the format of the on-disk binary database files; you must replicate from an existing node or dump/restore. MySQL upgrades the previous version when a new version is installed (which can cause problems, but is certainly “easier”).

Pg_upgrade [0] is an official part of postgres and does the binary inplace upgrade for you. You should obviously test before running in production, but it has worked perfectly for us when upgrading a 10+TB cluster from pg11 to pg13

[0] https://www.postgresql.org/docs/current/pgupgrade.html

Re: An early look at Postgres 14: Performance and monitoring Improvements

#27

I'm thinking of using Postgres for a project, but a DBA friend told me operationally it's more challenging than MySQL. Unfortunately, he can't elaborate. Does anyone have real work experience? Or is it based on outdated "PG must manually vacuum frequently"?

One thing is that Postgres doesn’t let you just upgrade to a new major version, as it doesn’t update the format of the on-disk binary database files; you must replicate from an existing node or dump/restore. MySQL upgrades the previous version when a new version is installed (which can cause problems, but is certainly “easier”).

I think this is very convenient; you don't want to automatically upgrade a big database because you probably want to choose the downtime window. This is obviously by design, but I'd also like being able to automate the pg_upgradecluster pg_dropcluster process, specially for install-and-forget little databases.

IMO, the biggest shock from the MSSQL/MYSQL to PostgreSQL migration was not having 1 or 2 specific files per database, specially if you used to backup the files instead of doing a formal database backup.

Re: An early look at Postgres 14: Performance and monitoring Improvements

#28
post #22

Earlier quoted context omitted.

You claim that MySQL 8 is ahead when it comes to scalability. What are the bases of this claim? When I see comparisons or entire systems that rely on a database (that is, not micro-benchmarks) such as the TechEmpower web framework benchmarks [0] , I notice that the 'Pg' results cluster near the top, with the "My" results showing up further down the rankings. I understand this isn't version 14 of the former versus ver…

well if you need more than one server, mysql has vitess, which is huge. postgres has citus, but that is way more complex to setup than vitess. I still would never use mysql, just because of vitess.

[deleted]

Re: An early look at Postgres 14: Performance and monitoring Improvements

#29
post #7

Earlier quoted context omitted.

MySQL 8 is not that far behind in feature parity. And is ahead when it comes to scalability. So I don't see postgres as necessarily standing alone.

You claim that MySQL 8 is ahead when it comes to scalability. What are the bases of this claim? When I see comparisons or entire systems that rely on a database (that is, not micro-benchmarks) such as the TechEmpower web framework benchmarks [0] , I notice that the 'Pg' results cluster near the top, with the "My" results showing up further down the rankings. I understand this isn't version 14 of the former versus ver…

Techempower is not a database benchmark. The tests that involve a DB exist to include a DB client in the request flow, not to put any serious load on the database.

Re: An early look at Postgres 14: Performance and monitoring Improvements

#30

Postgres is one of those pieces of software that’s so much better than anything else, it’s really incredible. I wonder if it’s even possible for competitors to catch up at this point - there’s not a lot of room for improvement in architecture of relational databases any more. I’m starting to think that Postgres is going to be with us for decades maybe even centuries. Do any other entrenched software projects come to…

I think many mercurial users would disagree with you about git.
Post reply on HN