4 ms·
Long running transactions can lead to an accumulation of dead tuples: https://brandur.org/postgres-queues https://brandur.org/postgres-queues
by w23j 3y ago
Long running transactions can lead to an accumulation of dead tuples: https://brandur.org/postgres-queues https://brandur.org/postgres-queues
- lomereiter 3y agoThis article was written in 2015, a year before idle_in_transaction_session_timeout parameter was added (in Postgres 9.6) - which is unfortunately still disabled by default, but that's the easiest way to make sure no transaction sits idle for too long.
- bavell 3y agoThis is from 2015, does it still hold true in 2023?
- sgarland 3y agoYes, in that Postgres still uses oldest-to-newest tuple ordering, and its MVCC hasn’t changed, so you can still cause the issues listed. Careful monitoring and tuning of parameters mentioned by the sibling comment to you can help mitigate this, though. Ultimately at scale, no, RDBMS shouldn’t be a queue. But most have a long way to go before they hit that point.