Re: xid wraparound danger due to INDEX_CLEANUP false

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: xid wraparound danger due to INDEX_CLEANUP false
Date: 2020-04-17 18:21:51
Message-ID: CA+TgmoaSFyeJvywjMberoNvX14sFZQhqQH8hWyCG2zY2Ldt55Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 16, 2020 at 6:49 PM Andres Freund <andres(at)anarazel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-04-17 18:26:37 Re: Poll: are people okay with function/operator table redesign?
Previous Message Corey Huinker 2020-04-17 18:18:17 Re: Additional Chapter for Tutorial