News for hackers. Stuff that matters.
Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by kstrauser on Thursday February 04, 2021 @01:25PM (#26028247)
I've heard it said of Python that it's the second best language for doing anything. For one specific task, there's probably something more tailored to the purpose. For integrating lots of different tasks into a single project, there's nothing that's better at doing everything pretty well.

I see PostgreSQL the same way (although I don't think there's a better RDBMS). It's not the best document database, but it's pretty good. It's not the best key-value store, but it's pretty good. It's not the best graph database, but it's pretty good. And here "pretty good" means "enough that you can build large, complex projects on top of it and expect that it will always work and do the right thing".

Also, the converse is not true: you can't replace PostgreSQL with a K-V store, or a document database, or a graph database. It has a million convenient features that nothing outside of another ACID RDBMS could fully support without massive engineering efforts. Unless I know beyond the shadow of doubt that I'd need, say, a dedicated document database for a specific reason, I'd infinitely rather start on PostgreSQL and use it until we outgrow it, than start with something like MongoDB and find out that we actually need some ACID or relational features that don't exist in Mongo.

Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by gqewogpdqa on Thursday February 04, 2021 @07:03PM (#26031281)
I like thinking about the best tools for the job, or "jobs to be done" as Clay Christensen would put it. But why wouldn't you use MongoDB for things that require ACID? MongoDB has had cross-collection ACID transactions since 4.0 (years ago) and in-collection transactions (less useful, of course) since a long time before that. PostgreSQL is indeed a pretty awesome database. That said, the JSON support is just so very painful. It's nice that it supports indexes on JSON, though, once you get through the syntax. Thanks for your post.
Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by kstrauser on Thursday February 04, 2021 @07:19PM (#26031425)
According to Jepsen[0], as of 9 months ago:

> Jepsen evaluated MongoDB version 4.2.6, and found that even at the strongest levels of read and write concern, it failed to preserve snapshot isolation. Instead, Jepsen observed read skew, cyclic information flow, duplicate writes, and internal consistency violations.

I would not use that where data integrity is mission critical.

[0] https://jepsen.io/analyses/mongodb-4.2.6

Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by jd_mongodb on Thursday February 04, 2021 @07:34PM (#26031589)
FYI: Same report update:

2020-05-26: MongoDB identified a bug in the transaction retry mechanism which they believe was responsible for the anomalies observed in this report; a patch is scheduled for 4.2.8.

Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by gqewogpdqa on Thursday February 04, 2021 @07:57PM (#26031779)
Lots of databases have transaction bugs which they hurriedly rush out patches to. MySQL, Oracle, SQL*Server, even the cloud databases like DynamoDB, CosmosDB, Aurora. Looks like MongoDB fixed this one.
Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by justinclift on Thursday February 04, 2021 @08:12PM (#26031874)
Cool. Hopefully that means it passes the next round of Jepson testing. :)
Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by gqewogpdqa on Sunday February 07, 2021 @03:47PM (#26058056)
Indeed! That would be a great confirmation.
Re:Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses by richardwhiuk on Thursday February 04, 2021 @07:55PM (#26031764)
MongoDB's licensing situation is much more of a pain.