Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

From: Noah Misch <noah(at)leadboat(dot)com>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding
Date: 2021-01-09 22:15:39
Message-ID: 20210109221539.GA179375@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 09, 2021 at 08:25:39PM +0500, Andrey Borodin wrote:
> > 9 янв. 2021 г., в 15:17, Noah Misch <noah(at)leadboat(dot)com> написал(а):

> >> I'm a little bit afraid that this kind of patch can hide bugs (while potentially saving some users data). Besides this patch seems like a useful precaution. Maybe we could emit scary warnings if SLRU segments do not stack into continuous range?
> >
> > Scary warnings are good for an observation that implies a bug, but the
> > slru-truncate-t-insurance patch causes such an outcome in non-bug cases where
> > it doesn't happen today. In other words, discontinuous ranges of SLRU
> > segments would be even more common after that patch. For example, it would
> > happen anytime oldestXID advances by more than ~1B at a time.
>
> Uhm, I thought that if there is going to be more than ~1B xids - we are going to keep all segements forever and range still will be continuous. Or am I missing something?

No; it deletes the most recent ~1B and leaves the older segments. An
exception is multixact, as described in the commit message and the patch's
change to a comment in TruncateMultiXact().

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2021-01-10 01:08:16 Re: Key management with tests
Previous Message Dian M Fay 2021-01-09 21:29:28 Re: [HACKERS] [PATCH] Generic type subscripting