Re: visibility map corruption - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: visibility map corruption
Date
Msg-id E2724621-256F-4215-B1EA-B10E8B4867F9@enterprisedb.com
Whole thread Raw
In response to Re: visibility map corruption  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: visibility map corruption  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers

> On Jul 6, 2021, at 2:27 PM, Peter Geoghegan <pg@bowt.ie> wrote:
>
> It looks like amcheck's verify_heapam.c functionality almost catches
> bugs like this one. Something for Mark (CC'd) to consider. Does it
> matter that we usually "ctx.oldest_xid = ctx.relfrozenxid", and so
> usually use pg_class.relfrozenxid as our oldest_xid (and not
> ShmemVariableCache->oldestXid)? In other words, could we be doing more
> to sanitize ShmemVariableCache->oldestXid, especially when the
> relation's pg_class.relfrozenxid happens to be set to a real XID?

Thanks, Peter, for drawing my attention to this.  I had already been following this thread, but had not yet thought
aboutthe problem in terms of amcheck. 

I will investigate possible solutions in verify_heapam().

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: trivial improvement to system_or_bail
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Allow CustomScan nodes to signal projection support