Re: old_snapshot_threshold bottleneck on replica
Maxim Orlov <orlovmg@gmail.com>
From: Maxim Orlov <orlovmg@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-01-25T08:51:53Z
Lists: pgsql-hackers
Attachments
- v2-0001-Use-atomic-old_snapshot_threshold.patch (application/octet-stream) patch v2-0001
On Tue, 24 Jan 2023 at 18:46, Robert Haas <robertmhaas@gmail.com> wrote: > > (1) that mutex also protects something else and the existing comment > is wrong, or > > (2) the mutex should have been removed but the patch neglected to do so, or > > (3) the mutex is still needed for some reason, in which case either > (3a) the patch isn't actually safe or (3b) the patch needs comments to > explain what the new synchronization model is. > > Yes, you're absolutely right. And my first intention was to remove this mutex completely. But in TransactionIdLimitedForOldSnapshots these variable is using conjointly. So, I'm not sure, is it completely safe to remove mutex. Actually, removing mutex and switch to atomics was my first choice. I've run all the tests and no problems were found. But, at that time I choose to be more conservative. Anyway, here is the new variant. -- Best regards, Maxim Orlov.
Commits
-
Remove some more "snapshot too old" vestiges.
- 9f0602539db4 17.0 landed
-
Remove the "snapshot too old" feature.
- f691f5b80a85 17.0 landed