Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon - Mailing list pgsql-bugs

From Jacob Speidel
Subject Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon
Date
Msg-id CA+pD2MKw6FwU21efw4+kAziFXWB+cnfxiE1824COmp=0x+jwBQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon  (Will Mortensen <will@extrahop.com>)
Responses Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs


On Thu, Jun 15, 2023 at 1:35 PM Will Mortensen <will@extrahop.com> wrote:
Thanks for the quick patch Andres! Jacob tested and that appears to
fix our scenario.


On Wed, Jun 14, 2023 at 3:30 PM Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
>
> On 2023-06-14 14:57:44 -0700, Andres Freund wrote:
> > If I am not, then we we should defer setting MyDatabaseId until after "Recheck
> > pg_database", e.g. by setting 'dboid' for the in_dbname path.
> >
> > I think that would likely end up with *less* code than before, because we'd
> > need less redundant code.
> >
> >
> > It's a bit odd that we do the second lookup with dbname, rather the oid we
> > previously looked up.
> >
> >
> > Afaics there's no reason to look up MyDatabaseTableSpace before the recheck.
>
> Attached is a rough prototype implementing this idea.  Could you check if that
> fixes the issue?
>
> Greetings,
>
> Andres Freund

Hello,

I don't think this is a surprise to anyone but this is just an update that the bug still exists in 15.4 and the patch from Andres still fixes the problem.

Thanks,
Jacob

pgsql-bugs by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: BUG #18040: PostgreSQL does not report its version correctly
Next
From: Thomas Munro
Date:
Subject: Re: BUG #17928: Standby fails to decode WAL on termination of primary