Re: Flush pgstats file during checkpoints

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Konstantin Knizhnik <knizhnik(at)garret(dot)ru>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Flush pgstats file during checkpoints
Date: 2024-07-17 03:52:12
Message-ID: Zpc_7FErsNO7lH6K@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 16, 2024 at 10:37:39AM +0900, Michael Paquier wrote:
> On Fri, Jul 12, 2024 at 01:01:19PM +0000, Bertrand Drouvot wrote:
>> Instead of removing the stat file, should we keep it around until the first call
>> to pgstat_write_statsfile()?
>
> Oops. You are right, I have somewhat missed the unlink() once we are
> done reading the stats file with a correct redo location.

The durable_rename() part has been applied. Please find attached a
rebase of the patch set with all the other comments addressed.
--
Michael

Attachment Content-Type Size
v3-0001-Add-redo-LSN-to-pgstats-file.patch text/x-diff 4.5 KB
v3-0002-Add-some-DEBUG2-information-about-the-redo-LSN-of.patch text/x-diff 1.4 KB
v3-0003-Flush-pgstats-file-during-checkpoints.patch text/x-diff 10.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2024-07-17 04:28:20 Re: Slow catchup of 2PC (twophase) transactions on replica in LR
Previous Message Peter Smith 2024-07-17 03:31:14 Re: Slow catchup of 2PC (twophase) transactions on replica in LR