The submitted title buries the lede: RDS for PostgreSQL 17.4 does not properly implement snapshot isolation.
I emailed the mods and asked them to change it to this phrase copy-pasted from the linked article: > Amazon RDS for PostgreSQL multi-AZ clusters violate Snapshot Isolation
Jepsen: Amazon RDS for PostgreSQL 17.4
81–90 of 153 posts
Re: Jepsen: Amazon RDS for PostgreSQL 17.4
#82New headline: AWS RDS is not CockroachDB or Spanner. And it's not trying to be.
Re: Jepsen: Amazon RDS for PostgreSQL 17.4
#83This is in such a thick academic style that it is difficult to follow what the problem actually might be and how it would impact someone. This style of writing serves mostly to remind me that I am not a part of the world that writes like this, which makes me a little sad.
Have you tried using an LLM? I’ve found good results getting at the underlying concepts and building a mental model that works for me that way. It makes domain expertise - that often has unique terminology for concepts you already know or at least know without a specific name - more easily accessible after a little bit of a QA round.
I’ve repeatedly used ChatGPT and Claude to help me understand papers and to cut through the verbiage to the underlying concepts.
Re: Jepsen: Amazon RDS for PostgreSQL 17.4
#84Multi-AZ instances is a long-standing feature of RDS where the primary DB is synchronously replicated to a secondary DB in another AZ. On failure of the primary, RDS fails over to the secondary.
Multi-AZ clusters has two secondaries, and transactions are synchronously replicated to at least one of them. This is more robust than multi-AZ instances if a secondary fails or is degraded. It also allows read-only access to the secondaries.
Multi-AZ clusters no doubt have more "magic" under the hood, as its not a vanilla Postgres feature as far as I'm aware. I imagine this is why it's failing the Jepsen test.
Re: Jepsen: Amazon RDS for PostgreSQL 17.4
#85Re: Jepsen: Amazon RDS for PostgreSQL 17.4
#86It's not mentioned in the headline and not made super clear in the article: This is specific to multi-AZ clusters, which is a relatively new feature of RDS, and differ from multi-AZ instance that most will be familiar with. (Clear as mud.) Multi-AZ instances is a long-standing feature of RDS where the primary DB is synchronously replicated to a secondary DB in another AZ. On failure of the primary, RDS fails over to…
So if snapshot violation is happening inside Multi-AZ instances, it can happen with a single region - multiple read replica kind of setup as well ? But it might be easily observable in Multi-AZ setups because the lag is high ?
Re: Jepsen: Amazon RDS for PostgreSQL 17.4
#87Interesting. At a previous company, when we changed the pg_dump command in a backup script to start using parallel workers (-j flag) we started to rarely see errors that suggested inconsistency when restoring the backups (duplicate key errors and fk constraint errors). At the time, I tried reporting the issue to both AWS and on the Postgres mailing list but never got anywhere since I could not easily reproduce it. We…
Was a single instance, one instance with a standby in another AZ or a multiaz cluster as tested here?
Re: Jepsen: Amazon RDS for PostgreSQL 17.4
#88I wonder how Aurora fares on this?
Re: Jepsen: Amazon RDS for PostgreSQL 17.4
#89It's not entirely clear but this isn't an issue in multi instance upstream Postgres clusters? Am I correct in understanding either AWS is doing something with the cluster configuration or has added some patches that introduce this behavior?
AWS patched Postgres to replicate to two instances and to call it good if one of the two acknowledges the change. When this ack happens is not public information.
My personal opinion is that filesystem level replication (think drbd) is the better approach for PostgreSQL. I believe that this is what the old school AWS Multi-AZ instances do. But you get lower throughput and you can't read from the secondary instance.
Re: Jepsen: Amazon RDS for PostgreSQL 17.4
#90I wonder how Aurora fares on this?
I wondered how Microsoft SQL Server fares, but not it's tested in the long list of databases: https://jepsen.io/analyses