Re: old_snapshot_threshold bottleneck on replica
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>, Maxim Orlov <orlovmg@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-06-14T03:56:46Z
Lists: pgsql-hackers
Attachments
- 0001-Remove-old_snapshot_threshold.patch (text/x-patch) patch 0001
On Tue, Feb 14, 2023 at 9:45 AM Andres Freund <andres@anarazel.de> wrote: > On 2023-01-24 10:46:28 -0500, Robert Haas wrote: > > On Mon, Jan 23, 2023 at 9:40 AM Maxim Orlov <orlovmg@gmail.com> wrote: > > > One of our customers stumble onto a significant performance degradation while running multiple OLAP-like queries on a replica. > > > After some investigation, it became clear that the problem is in accessing old_snapshot_threshold parameter. > > > > It has been suggested that we remove that feature entirely. > > Indeed. There's a lot of things wrong with it. We have reproducers for > creating wrong query results. Nobody has shown interest in fixing the > problems, for several years by now. It costs users that *do not* use the > feature performance (*). > > I think we're doing our users a disservice by claiming to have this feature. > > I don't think a lot of the existing code would survive if we were to create a > newer version, more maintainable / reliable, version of the feature. I raised this at the recent developer meeting and the assembled hackers agreed. Does anyone think we *shouldn't* drop the feature? I volunteered to write a removal patch for v17, so here's a first run through to find all the traces of this feature. In this first go I removed everything I could think of, but we might want to keep some vestiges. I guess we might want to keep the registered error class/code? Should we invent a place where we keep stuff like #define TestForOldSnapshot(...) expanding to nothing for some amount of time, for extensions? I dunno, I bet extensions doing stuff that sophisticated already have a bunch of version tests anyway. I suppose keeping the GUC wouldn't really be helpful (if you're using it, you probably want to know that it isn't available anymore and think about the implications for your application).
Commits
-
Remove some more "snapshot too old" vestiges.
- 9f0602539db4 17.0 landed
-
Remove the "snapshot too old" feature.
- f691f5b80a85 17.0 landed