Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: will@extrahop.com, pgsql-bugs@lists.postgresql.org
Date: 2023-06-14T22:30:12Z
Lists: pgsql-bugs
Attachments
- pgstat-mydatabase-fix-prototype.diff (text/x-diff) patch
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
Commits
-
Fix handling of shared statistics with dropped databases
- 5a9325fdde1d 15.5 landed
- c397c98ae63d 16.0 landed
- 2b8e5273e949 17.0 landed
-
Accept fractional seconds in jsonpath's datetime() method.
- bd590d1fea1b 15.4 cited