News for hackers. Stuff that matters.
Re:SQL Needed Structure by Spixel_ on Friday September 05, 2025 @07:55AM (#45137516)
I don't get the transaction bit. At least with postgres, a transaction doesn't guarantee that all statements in it see the data at the same point in time (actually, it's not even guaranteed for subqueries).

Also, often, the transactional database servers is more difficult to scale than application servers so from a technical standpoint, it makes sense to do this glue work in app code.

Re:SQL Needed Structure by TheTaytay on Friday September 05, 2025 @08:06AM (#45137596)
Doesn’t it guarantee consistency from the time the transaction started (assuming read committed isolation)? It guarantees you won’t see something “later” than when your transaction began.

https://www.postgresql.org/docs/current/transaction-iso.html

I’m likely misunderstanding what you mean by time.

Re:SQL Needed Structure by Spixel_ on Friday September 05, 2025 @10:48AM (#45139233)
Read committed (which is the default), doesn't guarantee that. See "Nonrepeatable Read" and "Phantom Read" which are both possible in your documentation page.
Re:SQL Needed Structure by andyferris on Friday September 05, 2025 @08:23AM (#45137697)
> a transaction doesn't guarantee that all statements in it see the data at the same point in time

This depends on the transaction isolation level. If you use snapshot or serializable this should be the case (but you may have aborted transactions due to optimistic concurrency).

Re:SQL Needed Structure by Spixel_ on Friday September 05, 2025 @10:50AM (#45139249)
You are right, but note that the default isolation level is "Read committed" in postgres.
Re:SQL Needed Structure by Jweb_Guru on Friday September 05, 2025 @09:12AM (#45138150)
SSI scales fine for most workloads as long as you correctly mark your read-only transactions.