Re: InstallXLogFileSegment() vs concurrent WAL flush
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Yugo NAGATA <nagata@sraoss.co.jp>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-02-02T13:42:46Z
Lists: pgsql-hackers
On Fri, Feb 2, 2024 at 12:56 PM Yugo NAGATA <nagata@sraoss.co.jp> wrote: > On Fri, 2 Feb 2024 11:18:18 +0100 > Thomas Munro <thomas.munro@gmail.com> wrote: > > One simple way to address that would be to make XLogFileInitInternal() > > wait for InstallXLogFileSegment() to finish. It's a little > > Or, can we make sure the rename is durable by calling fsync before > returning the fd, as a patch attached here? Right, yeah, that works too. I'm not sure which way is better.