Re: fixing old_snapshot_threshold's time->xid mapping

Anastasia Lubennikova <a.lubennikova@postgrespro.ru>

From: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
To: Thomas Munro <thomas.munro@gmail.com>, Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>, Andres Freund <andres@anarazel.de>, Kevin Grittner <kgrittn@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-11-26T10:03:56Z
Lists: pgsql-hackers
On 06.10.2020 08:32, Thomas Munro wrote:
> On Fri, Sep 25, 2020 at 2:00 PM Michael Paquier <michael@paquier.xyz> wrote:
>> On Thu, Sep 24, 2020 at 03:46:14PM -0400, Robert Haas wrote:
>>
>>> Thomas, with respect to your part of this patch set, I wonder if we
>>> can make the functions that you're using to write tests safe enough
>>> that we could add them to contrib/old_snapshot and let users run them
>>> if they want. As you have them, they are hedged around with vague and
>>> scary warnings, but is that really justified? And if so, can it be
>>> fixed? It would be nicer not to end up with two loadable modules here,
>>> and maybe the right sorts of functions could even have some practical
>>> use.
> Yeah, you may be right.  I am thinking about that.  In the meantime,
> here is a rebase.  A quick recap of these remaining patches:
>
> 0001 replaces the current "magic test mode" that didn't really test
> anything with a new test mode that verifies pruning and STO behaviour.
> 0002 fixes a separate bug that Andres reported: the STO XID map
> suffers from wraparound-itis.
> 0003 adds a simple smoke test for Robert's commit 55b7e2f4.  Before
> that fix landed, it failed.
>
>> I have switched this item as waiting on author in the CF app then, as
>> we are not completely done yet.
> Thanks.  For the record, I think there is still one more complaint
> from Andres that remains unaddressed even once these are in the tree:
> there are thought to be some more places that lack
> TestForOldSnapshot() calls.

Status update for a commitfest entry.

This entry is "Waiting on author" and the thread was inactive for a 
while.  As far as I see, part of the fixes is already committed. Is 
there anything left to work on or this patch set needs review now?

-- 
Anastasia Lubennikova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company




Commits

  1. Remove the "snapshot too old" feature.

  2. Fix two bugs in MaintainOldSnapshotTimeMapping.

  3. Add new 'old_snapshot' contrib module.

  4. Expose oldSnapshotControl definition via new header.