Re: Flush pgstats file during checkpoints

Поиск
Список
Период
Сортировка
От Bertrand Drouvot
Тема Re: Flush pgstats file during checkpoints
Дата
Msg-id ZpEpHxi/5xnXjrUS@ip-10-97-1-34.eu-west-3.compute.internal
обсуждение исходный текст
Ответ на Re: Flush pgstats file during checkpoints  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Ответы Re: Flush pgstats file during checkpoints
Список pgsql-hackers
Hi,

On Fri, Jul 12, 2024 at 12:10:26PM +0000, Bertrand Drouvot wrote:
> Need to spend more time and thoughts on 0002+.

I think there is a corner case, say:

1. shutdown checkpoint at LSN1
2. startup->reads the stat file (contains LSN1)->all good->read stat file and
remove it
3. crash (no checkpoint occured between 2. and 3.) 
4. startup (last checkpoint is still LSN1)->no stat file (as removed in 2.) 

In that case we start with empty stats.

Instead of removing the stat file, should we keep it around until the first call
to pgstat_write_statsfile()?

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



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