Re: found xmin from before relfrozenxid on pg_catalog.pg_authid - Mailing list pgsql-hackers

From Andres Freund
Subject Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Date
Msg-id 20180528195206.6vqxcdhvfurlyhda@alap3.anarazel.de
Whole thread Raw
In response to Re: found xmin from before relfrozenxid on pg_catalog.pg_authid  (Andres Freund <andres@anarazel.de>)
Responses Re: found xmin from before relfrozenxid on pg_catalog.pg_authid  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: found xmin from before relfrozenxid on pg_catalog.pg_authid  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

On 2018-05-27 13:00:06 -0700, Andres Freund wrote:
> I've a patch that seems to work, that mostly needs some comment
> polishing.

Attached is what I currently have. Still needs some more work, but I
think it's more than good enough to review the approach.  Basically the
approach consists out of two changes:

1) Send init file removals for shared nailed relations as well.

   This fixes that the shared init file contains arbitrarily outdated
   information for relfrozenxid etc. Leading to e.g. the pg_authid
   errors we've seen in some recent threads.  Only applies to
   new connections.

2) Reread RelationData->rd_rel for nailed relations when invalidated.

   This ensures that already built relcache entries for nailed relations
   are updated. Currently they never are.  This currently doesn't cause
   *that* frequently an issue for !shared entries, because for those the
   init file gets zapped regularly, and autovacuum workers usually don't
   live that long.  But it's still a significant correctness issue for
   both shared an non shared relations.

FWIW, I wonder if this isn't critical enough to make us consider having
a point release earlier..

Greetings,

Andres Freund

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: behave of --create-slot option
Next
From: Andres Freund
Date:
Subject: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid