Re: xid wraparound danger due to INDEX_CLEANUP false - Mailing list pgsql-hackers

From Robert Haas
Subject Re: xid wraparound danger due to INDEX_CLEANUP false
Date
Msg-id CA+TgmoaSFyeJvywjMberoNvX14sFZQhqQH8hWyCG2zY2Ldt55Q@mail.gmail.com
Whole thread Raw
In response to Re: xid wraparound danger due to INDEX_CLEANUP false  (Andres Freund <andres@anarazel.de>)
Responses Re: xid wraparound danger due to INDEX_CLEANUP false  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
List pgsql-hackers
On Thu, Apr 16, 2020 at 6:49 PM Andres Freund <andres@anarazel.de> wrote:
> Yea. _bt_vacuum_needs_cleanup() needs to check if
> metad->btm_oldest_btpo_xact is older than the FreezeLimit computed by
> vacuum_set_xid_limits() and vacuum the index if so even if INDEX_CLEANUP
> false.

I'm still fairly unclear on what the actual problem is here, and on
how we propose to fix it. It seems to me that we probably don't have a
problem in the case where we don't advance relfrozenxid or relminmxid,
because in that case there's not much difference between the behavior
created by this patch and a case where we just error out due to an
interrupt or something before reaching the index cleanup stage. I
think that the problem is that in the case where we do relfrozenxid,
we might advance it past some XID value stored in the index metadata.
Is that right?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Should we add xid_current() or a int8->xid cast?
Next
From: Robert Haas
Date:
Subject: Re: Poll: are people okay with function/operator table redesign?