Re: snapshot too old issues, first around wraparound and then more.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Kevin Grittner <kgrittn(at)gmail(dot)com>
Subject: Re: snapshot too old issues, first around wraparound and then more.
Date: 2020-04-02 20:04:12
Message-ID: CAH2-Wzn+V4sp-Z2EytRM4zYgcXGjkqWZ=SNphfP1o040E2ZkcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 2, 2020 at 11:28 AM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> In conclusion, I share Andres' concerns here. There are glaring
> problems with how we manipulate the data structure that controls the
> effective horizon for pruning. Maybe they can be fixed while leaving
> the code that manages the OldSnapshotControl circular buffer in
> something resembling its current form, but I doubt it. In my opinion,
> there is no approach to fixing "snapshot too old" that won't have some
> serious downside.

I'll add something that might be constructive: It would probably be a
good idea to introduce a function like syncrep.c's
SyncRepQueueIsOrderedByLSN() function, which is designed to be called
by assertions only. That would both clearly document and actually
verify the circular buffer/OldSnapshotControl data structure's
invariants.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message legrand legrand 2020-04-02 20:04:28 Re: Planning counters in pg_stat_statements (using pgss_store)
Previous Message Tom Lane 2020-04-02 20:04:06 Re: A bug when use get_bit() function for a long bytea string