3 ms·
Um, this is the postgres article: https://aphyr.com/posts/282-call-me-maybe-postgres https://aphyr.com/posts/282-call-me-maybe-postgres There were no acknowle
by ak4g 11y ago
Um, this is the postgres article:
https://aphyr.com/posts/282-call-me-maybe-postgres https://aphyr.com/posts/282-call-me-maybe-postgres
There were no acknowledged writes lost. The only unacked-but-successful writes resulted from a connection while a commit ack was in-flight. That doesn't qualify as a data-consistency error, it means the client has to check if the data is present after reconnecting.
But in no cases would the client reconnect to find that there were acknowledged-as-committed records that were missing or stale. In no cases would the client find that responded-as-rolled-back data was actually committed. This is very, very different than what is seen with MongoDB.
- hendzen 11y agoI don't think the results of Aphyr's MongoDB and postgres experiments are directly comparable. In the OP, MongoDB was run in a 5 node replicated configuration. In the post you reference, the experiment was run against a single postgres node. Furthermore, the postgres experiment only checked that no writes were lost. As Aphyr acknowledges, MongoDB did not lose any writes with "majority" write concern. The postgres experiment did not include the verification of a linearizable history of reads, which is what the bulk of the OP is about. I'd like to see a similar experiment run against a replicated postgres configuration with auto-failover.
- tracker1 11y agoNow try it again with PostgreSQL's built in sharding or replication functionality... oh, wait.
- zapov 11y agoThe parent post correctly pointed out that including Postgres in that list is misleading at least.
- threeseed 11y agoI was talking about data consistency more broadly. "However, two writes (215 and 218) succeeded, even though they threw an exception claiming that a failure occurred". This obviously isn't ideal behaviour from the perspective of a developer but isn't necessarily not correct. My broader point was that you need to assume the worst from your database in the application layer. Which I think you missed.
- zapov 11y agoI read your post as FUD regarding Postgres. That article has various issues, for example, calling Postgres commit protocol as a special case of two phase commit is not really correct. Postgres has 2pc: http://www.postgresql.org/docs/9.2/static/sql-prepare-transaction.html http://www.postgresql.org/docs/9.2/static/sql-prepare-transa... but that was not tested. The described behavior is "expected" and "understood". Saying that "you should assume worst from your database" is not something I would ever use for describing DB with ACID semantics.
- threeseed 11y agoI wasn't spreading FUD about anything. From the article there was issues with every databases expected behaviour. My point again was that you should expect and manage failure in your application layer. It's what sensible architecture looks like. And ACID does NOT guarentee that you will not lose data. It is a theory not an implementation. I have lost data with both Oracle and Teradata due to bugs.
- zapov 11y agoWell, you said that Postgres had data consistency errors (referencing Aphyr articles). This is not true (at least regarding that article). Aphyr article about Postgres could be renamed to call-me-maybe-acid-db-over-the-network and could remain the same.