On Thu, Apr 16, 2020 at 6:49 PM Andres Freund <and...@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