From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
Cc: | 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-12 06:42:21 |
Message-ID: | ZpDQTZ0cAz0WEbh7@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jul 05, 2024 at 01:52:31PM +0900, Michael Paquier wrote:
> On Sat, Jun 29, 2024 at 11:13:04PM +0200, Tomas Vondra wrote:
>> I think those are two independent issues - knowing that the snapshot is
>> from the last checkpoint, and knowing that it's correct (not corrupted).
>> And yeah, we should be careful about fsync/durable_rename.
>
> Yeah, that's bugging me as well. I don't really get why we would not
> want durability at shutdown for this data. So how about switching the
> end of pgstat_write_statsfile() to use durable_rename()? Sounds like
> an independent change, worth on its own.
Please find attached a rebased patch set with the durability point
addressed in 0001. There were also some conflicts.
Note that I have applied the previous 0002 adding an assert in
pgstat_write_statsfile() as 734c057a8935, as I've managed to break
again this assumption while hacking more on this area..
--
Michael
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Make-write-of-pgstats-file-durable.patch | text/x-diff | 1.1 KB |
v2-0002-Add-redo-LSN-to-pgstats-file.patch | text/x-diff | 4.5 KB |
v2-0003-Add-some-DEBUG2-information-about-the-redo-LSN-of.patch | text/x-diff | 1.4 KB |
v2-0004-Flush-pgstats-file-during-checkpoints.patch | text/x-diff | 9.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2024-07-12 06:43:15 | Re: Pgoutput not capturing the generated columns |
Previous Message | Ashutosh Bapat | 2024-07-12 06:29:12 | Re: Optimize WindowAgg's use of tuplestores |