pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding
Date: Sat, 9 Jan 2021 14:15:39 -0800
Message-ID: <20210109221539.GA179375@rfd.leadboat.com> (raw)
In-Reply-To: <0B9F7E26-2C0F-43E7-A0C5-FB84DA1163DB@yandex-team.ru>
References: <1959.1586198769@sss.pgh.pa.us>
	<20200407041847.GA519993@rfd.leadboat.com>
	<20200525070033.GA1591335@rfd.leadboat.com>
	<20200830053433.GA3275593@rfd.leadboat.com>
	<20201029040159.GA3803708@rfd.leadboat.com>
	<20201109045319.GA459206@rfd.leadboat.com>
	<23599722-1EFF-4B71-A77C-67141882EFAE@yandex-team.ru>
	<561A2AF4-E745-4043-B5FC-9537AEE55701@yandex-team.ru>
	<20210109101759.GA122398@rfd.leadboat.com>
	<0B9F7E26-2C0F-43E7-A0C5-FB84DA1163DB@yandex-team.ru>

On Sat, Jan 09, 2021 at 08:25:39PM +0500, Andrey Borodin wrote:
> > 9 янв. 2021 г., в 15:17, Noah Misch <noah@leadboat.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().





view thread (33+ messages)  latest in thread

Message-ID: <20210109221539.GA179375@rfd.leadboat.com>
Permalink:  ../20210109221539.GA179375@rfd.leadboat.com/
Also on:    postgresql.org/message-id/20210109221539.GA179375@rfd.leadboat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: noah@leadboat.com, x4mmm@yandex-team.ru, tgl@sss.pgh.pa.us, tomas.vondra@2ndquadrant.com
  Subject: Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding
  In-Reply-To: <20210109221539.GA179375@rfd.leadboat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox