TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Jepsen: Amazon RDS for PostgreSQL 17.4

608 pointsby aphyr20 days ago

20 comments

hliyan19 days ago
I wish more writing in the software world was done this way:<p>&quot;Amazon RDS for PostgreSQL is an Amazon Web Services (AWS) service which provides managed instances of the PostgreSQL database. We show that Amazon RDS for PostgreSQL multi-AZ clusters violate Snapshot Isolation, the strongest consistency model supported across all endpoints. Healthy clusters occasionally allow...&quot;<p>Direct, to-the-point, unembellished and analogous to how other STEM disciplines share findings. There was a time I liked reading cleverly written blog posts that use memes to explain things, but now I long for the plain and simple.
评论 #43845204 未加载
评论 #43844963 未加载
评论 #43848844 未加载
评论 #43842947 未加载
评论 #43849074 未加载
luhn20 days ago
It&#x27;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.)<p>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 the secondary.<p>Multi-AZ clusters has <i>two</i> 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.<p>Multi-AZ clusters no doubt have more &quot;magic&quot; under the hood, as its not a vanilla Postgres feature as far as I&#x27;m aware. I imagine this is why it&#x27;s failing the Jepsen test.
评论 #43844314 未加载
评论 #43840821 未加载
评论 #43842779 未加载
评论 #43848808 未加载
havkom19 days ago
Good investigation!<p>Software developers nowadays barely know about transactions, and definitely not about different transaction models (in my experience). I have even encountered &quot;senior developers&quot; (who are actually so called &quot;CRUD developers&quot;), who are clueless about database transactions.. In reality, transactions and transaction models matter a lot to performance and error free code (at least when you have volumes of traffic and your software solves something non-trivial).<p>For example: After a lot of analysis, I switched from SQL Server standard Read Committed to Read Committed Snapshot Isolation in a large project - the users could not be happier -&gt; a lot of locking contention has disappeared. No software engineer in that project had any clue of transaction models or locks before I taught them some basics (even though they had used transactions extensively in that project)..
评论 #43850339 未加载
评论 #43843171 未加载
评论 #43849649 未加载
评论 #43848200 未加载
评论 #43847417 未加载
评论 #43855352 未加载
cswilliams20 days ago
Interesting. 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 eventually gave up and went back to single threaded dumps. I wonder if this issue is related to that behavior we were seeing.
评论 #43840098 未加载
ezekiel6820 days ago
In my reading of this, it looks like the practical implication could be that reads happening quickly after writes to the same row(s) might return stale data. The write transaction gets marked as complete before all of the distributed layers of a multi AZ RDS instance have been fully updated, such that immediate reads from the same rows might return nothing (if the row does not exist yet) or older values if the columns have not been fully updated.<p>Due to the way PostgreSQL does snapshotting, I don&#x27;t believe this implies such a read might obtain a nonsense value due to only a portion of the bytes in a multi-byte column type having been updated yet.<p>It seems like a race condition that becomes eventually consistent. Or did anyone read this as if the later transaction(s) of a &quot;long fork&quot; might never complete under normal circumstances?
评论 #43838634 未加载
baq19 days ago
&gt; This work was performed independently by Jepsen, without compensation<p>not what a RDBMS stakeholder wants to wake up to on the best of days. I&#x27;d imagine there were a couple emails expressing concern internally.<p>hats off to aphyr as usual.
评论 #43842487 未加载
评论 #43854072 未加载
nijave20 days ago
It&#x27;s not entirely clear but this isn&#x27;t an issue in multi instance upstream Postgres clusters?<p>Am I correct in understanding either AWS is doing something with the cluster configuration or has added some patches that introduce this behavior?
评论 #43839410 未加载
评论 #43843790 未加载
评论 #43840963 未加载
评论 #43838651 未加载
tibbar20 days ago
The submitted title buries the lede: RDS for PostgreSQL 17.4 does not properly implement snapshot isolation.
评论 #43839287 未加载
评论 #43838455 未加载
评论 #43838896 未加载
评论 #43838796 未加载
badmonster20 days ago
What safety or application-level bugs could arise if developers assume Snapshot Isolation but Amazon RDS for PostgreSQL is actually providing only Parallel Snapshot Isolation, especially in multi-AZ configurations using the read replica endpoint?
评论 #43841927 未加载
评论 #43843795 未加载
mushufasa20 days ago
&gt; These phenomena occurred in every version tested, from 13.15 to 17.4.<p>I was worried I had made the wrong move upgrading major versions, but it looks like this is not that. This is not a regression, but just a feature request or longstanding bug.
password432120 days ago
It would be great to get all the Amazon RDS flavors Jepsen&#x27;d.
评论 #43839333 未加载
film4220 days ago
I think AWS will need to update their documentation to communicate this. Will a snapshot isolation fix introduce a performance regression in latency or throughput? Or, maybe they stand by what they have as being strong enough. Either way, they&#x27;ll need to say something.
评论 #43838914 未加载
oblio20 days ago
I wonder how Aurora fares on this?
评论 #43840962 未加载
评论 #43843487 未加载
评论 #43842179 未加载
kchoudhu19 days ago
I&#x27;ve suspected that there are consistency issues on RDS for a while now: if you push large quantities of data (e.g. 1MM+ rows) into a database quickly and then try to read the same data out on another connection, you&#x27;ll periodically get null return sets.<p>We&#x27;ve worked around it by not touching the hot stove, but it&#x27;s kind of worrying that there are consistency issues with it.
wb1412320 days ago
Surprised to see Amazon RDS doesn&#x27;t pass such simple test. Nicely done!
评论 #43840073 未加载
cr3ative20 days ago
This 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.
评论 #43838178 未加载
评论 #43838330 未加载
评论 #43840069 未加载
评论 #43838141 未加载
评论 #43838703 未加载
评论 #43838456 未加载
评论 #43838922 未加载
gitroom20 days ago
honestly this made me side-eye aws docs hard, i always think snapshot isolation just means what it says. good catch
henning20 days ago
I thought this kind of bullshit was only supposed to happen in MongoDB!
评论 #43838051 未加载
评论 #43838135 未加载
评论 #43838122 未加载
评论 #43838431 未加载
billiam20 days ago
New headline: AWS RDS is not CockroachDB or Spanner. And it&#x27;s not trying to be.
评论 #43840424 未加载
评论 #43839781 未加载
skywhopper20 days ago
This is an unfortunate report in a lot of ways. First, the title is incomplete. Second, there’s no context as to the purpose of the test and very little about the parameters of the test. It makes no comparison to other PostgreSQL architectures except one reference at the end to a standalone system. Third, it characterizes the transaction isolation of this system as if it were a failure (see comments in this thread assuming this is a bug or a missing feature of Postgres). Finally, it never compares the promises made by the product vendors to the reality. Does AWS or Postgres promise perfect snapshot isolation?<p>I understand the mission of the Jepsen project but presenting results in this format is misleading and will only sow confusion.<p>Transaction isolation involves a ton of tradeoffs, and the tradeoffs chosen here may be fine for most use cases. The issues can be easily avoided by doing any critical transactional work against the primary read-write node only, which would be the only typical way in which transactional work would be done against a Postgres cluster of this sort.
评论 #43838647 未加载