Re: visibility map corruption

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Floris Van Nee <florisvannee(at)optiver(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Subject: Re: visibility map corruption
Date: 2021-07-27 02:39:17
Message-ID: 20210727023917.GB19774@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jul 24, 2021 at 10:01:05AM -0400, Bruce Momjian wrote:
> On Fri, Jul 23, 2021 at 09:01:18PM -0400, Bruce Momjian wrote:
> > On Fri, Jul 23, 2021 at 05:47:18PM -0700, Peter Geoghegan wrote:
> > > > I could perhaps see corruption happening if pg_control's oldest xid
> > > > value was closer to the current xid value than it should be, but I can't
> > > > see how having it 2-billion away could cause harm, unless perhaps
> > > > pg_upgrade itself used enough xids to cause the counter to wrap more
> > > > than 2^31 away from the oldest xid recorded in pg_control.
> > > >
> > > > What I am basically asking is how to document this and what it fixes.
> > >
> > > ISTM that this is a little like commits 78db307bb2 and a61daa14. Maybe
> > > take a look at those?
> >
> > Agreed. I just wanted to make sure I wasn't missing an important aspect
> > of this patch. Thanks.
>
> Another question --- with the previous code, the oldest xid was always
> set to a reasonable value, -2 billion less than the current xid. With
> the new code, the oldest xid might be slightly higher than the current
> xid if they use -x but not -u. Is that acceptable? I think we agreed it
> was. pg_upgrade will always set both.

This patch has been applied back to 9.6 and will appear in the next
minor release.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

If only the physical world exists, free will is an illusion.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-07-27 02:42:42 Re: Slim down integer formatting
Previous Message Bruce Momjian 2021-07-27 02:39:04 Re: [UNVERIFIED SENDER] Re: pg_upgrade can result in early wraparound on databases with high transaction load