PostgreSQL 15: Stats Collector Gone? What’s New?
percona.com
percona.com
This could be a really important change, especially for people with large instances.
I was waiting to upgrade to pg12 then 13 then 14.
With this change I seriously think I’ll just upgrade to 15 at the end of the year.
Now is the perfect time to update to pg14 because it’s on rev 5 (14.5).
I have since decided to always wait for a .1 with Postgres before updating.
The good news is that this is only a few weeks past the initial release.
Now if only more people upgraded during the RC phase already, then everybody could go to a .0 release.
And conversely, if everybody follows my (and your) advice, then .2 will be the new .1.
It’s never easy
14.4 was released with a fix on silent data corruption when using the CREATE INDEX CONCURRENTLY or REINDEX CONCURRENTLY commands.
https://www.postgresql.org/about/news/postgresql-144-release...
I'm not downplaying the issue and index corruption is really bad, but I would wager a guess that admins who do need concurrent reindexing would also be aware of `pg_repack` and would prefer that anyways because of the other benefits it provides.
This is probably why it took 6 months for the issue to be reported and fixed.
Not all of them were broken, but the broken one was returning wrong results 100% of the time.
Index corruption shows the same symptoms, but, of course, it is a different cause.
> which simple test coverage cannot find.
Anyway here is a post for using built-in logical replication.
https://dev.to/pikachuexe/postgresql-logical-replication-for...
Only throwing out this as a reference.
Once I switched to pglogical jumping major versions worked as intended. Now it's possible in the rush I used the wrong setting somewhere and built-in logical replication can work between major versions. Though I lost enough time experimenting I'll keep using pglogical until AWS officially recommends something else.
[0] https://aws.amazon.com/blogs/database/part-1-upgrade-your-am...
Reads are easy with replicas, right? What are you doing to handle "writes" across all your apps/regions/etc.?
We don’t have huge constant loads. Over-provisioned on massive bare metal so we can take a lot.
Also daily pg_basebackup which does not eat too many resources. Standard pg_dump is impossible.
About to also add log shipping when I upgrade. We don’t do super critical things like banking or anything like that. But I do want to move to the point where at worse we only lose a few minutes of data.
Now we can lose up to 24 hours if all the replicas die at once.
If it goes down, we get a page, and we can have it switched by hand in a few minutes.
I guess if our service was super-critical, I would do that, but since it's not, the three of us that work as developers and sys-admins can deal with it very quickly.
Considering the huge engineering teams SqlServer and Oracle have, I'm always amazed how well Postgres works - despite the tiny number of full time developers.
To get around the inefficiencies of spawning many processes, I put pgbouncer in front of PostgreSQL.
isn't this still processes, just with shared memory?
This introduces lot's of overhead across the board.
* Cross process communication is a lot more expensive (done via shared memory or as here via the file system)
* Switching between processes is a lot more expensive because each process has its own memory space, hence a switch flushes the TLB. Also more bookkeeping for the OS.
This is especially bad for a DB, which will usually spend most of its time waiting for IO, so can switch execution context all the time.
* Each process also has a distinct set of file descriptors, so those need to be cloned as well
* A dB needs lots of locks. Cross process locks are more expensive.
* ...
These things add up.
One pro of non-threaded is simplicity and no need for thread safety everywhere.