pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Andres Freund <andres@anarazel.de>
Cc: Jacob Speidel <jacob@extrahop.com>
Cc: Will Mortensen <will@extrahop.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon
Date: Sat, 2 Sep 2023 08:21:34 -0700
Message-ID: <20230902152134.GA3320738@nathanxps13> (raw)
In-Reply-To: <ZPJ89h7Z7WOiIoIX@paquier.xyz>
References: <CAMpnoC5=njD8tLG9q8XQZKi=1SfLehjVPmLJC+pktzGdfZEgoA@mail.gmail.com>
	<CA+pD2MKw6FwU21efw4+kAziFXWB+cnfxiE1824COmp=0x+jwBQ@mail.gmail.com>
	<ZNbRByjoQlUtTkTb@paquier.xyz>
	<20230812004812.4yev47iili57u4hc@awork3.anarazel.de>
	<ZNlxRmI15e1BtCR6@paquier.xyz>
	<ZPE5qXLuMs+/vx9H@paquier.xyz>
	<20230901025613.GB3097511@nathanxps13>
	<ZPFa/bED0YZc0oE3@paquier.xyz>
	<20230901152024.GA3175143@nathanxps13>
	<ZPJ89h7Z7WOiIoIX@paquier.xyz>

On Sat, Sep 02, 2023 at 09:08:22AM +0900, Michael Paquier wrote:
> On Fri, Sep 01, 2023 at 08:20:24AM -0700, Nathan Bossart wrote:
>> Something along those lines seems fine to me.  FWIW this is what I had in
>> my head:
>> 
>> 	It is important that MyDatabaseId only be set once we are sure that the
>> 	target database can no longer be concurrently dropped or renamed.  Some
>> 	code depends on this.  For example, without this guarantee,
>> 	pgstat_update_dbstats() could create entries for databases that were
>> 	just dropped, which will lead to problems down the road.
> 
> I'm mostly OK with this formulation as well, but without the second
> sentence and adding as extra that pgstat_update_dbstats() could be
> specifically called in the shutdown callback of the shared statistics.

WFM

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (24+ messages)  latest in thread

Message-ID: <20230902152134.GA3320738@nathanxps13>
Permalink:  ../20230902152134.GA3320738@nathanxps13/
Also on:    postgresql.org/message-id/20230902152134.GA3320738@nathanxps13

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: nathandbossart@gmail.com, michael@paquier.xyz, andres@anarazel.de, jacob@extrahop.com, will@extrahop.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon
  In-Reply-To: <20230902152134.GA3320738@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox