Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon
Дата
Msg-id ZPJ89h7Z7WOiIoIX@paquier.xyz
обсуждение исходный текст
Ответ на Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-bugs
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.
--
Michael

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18077: PostgreSQL server subprocess crashed by a SELECT statement with WITH clause
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #17928: Standby fails to decode WAL on termination of primary