Re: InstallXLogFileSegment() vs concurrent WAL flush

2024-10-31 Thread Soumyadeep Chakraborty
ng held during a durable_rename()? Guess it would invite more contention though, and surrounding code paths are already holding other LWLocks, which we may not be able to get rid of. Regards, Soumyadeep (Broadcom) From 7a974a0de9838968d0b41f42cd3922736e6a2918 Mon Sep 17 00:00:00 2001 From: Thomas Mu

Re: InstallXLogFileSegment() vs concurrent WAL flush

2024-02-05 Thread Kyotaro Horiguchi
At Fri, 2 Feb 2024 14:42:46 +0100, Thomas Munro wrote in > On Fri, Feb 2, 2024 at 12:56 PM Yugo NAGATA wrote: > > On Fri, 2 Feb 2024 11:18:18 +0100 > > Thomas Munro wrote: > > > One simple way to address that would be to make XLogFileInitInternal() > > > wait for InstallXLogFileSegment() to fi

Re: InstallXLogFileSegment() vs concurrent WAL flush

2024-02-02 Thread Thomas Munro
On Fri, Feb 2, 2024 at 12:56 PM Yugo NAGATA wrote: > On Fri, 2 Feb 2024 11:18:18 +0100 > Thomas Munro 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

Re: InstallXLogFileSegment() vs concurrent WAL flush

2024-02-02 Thread Yugo NAGATA
On Fri, 2 Feb 2024 11:18:18 +0100 Thomas Munro wrote: > Hi, > > New WAL space is created by renaming a file into place. Either a > newly created file with a temporary name or, ideally, a recyclable old > file with a name derived from an old LSN. I think there is a data > loss window between re

InstallXLogFileSegment() vs concurrent WAL flush

2024-02-02 Thread Thomas Munro
Hi, New WAL space is created by renaming a file into place. Either a newly created file with a temporary name or, ideally, a recyclable old file with a name derived from an old LSN. I think there is a data loss window between rename() and fsync(parent_directory). A concurrent backend might open