pgsql: Acquire ControlFileLock in relevant SQL functions.

2023-10-15 Thread Thomas Munro
Acquire ControlFileLock in relevant SQL functions. Commit dc7d70ea added functions that read the control file, but didn't acquire ControlFileLock. With unlucky timing, file systems that have weak interlocking like ext4 and ntfs could expose partially overwritten contents, and the checksum would f

pgsql: Acquire ControlFileLock in relevant SQL functions.

2023-10-15 Thread Thomas Munro
Acquire ControlFileLock in relevant SQL functions. Commit dc7d70ea added functions that read the control file, but didn't acquire ControlFileLock. With unlucky timing, file systems that have weak interlocking like ext4 and ntfs could expose partially overwritten contents, and the checksum would f

pgsql: Acquire ControlFileLock in relevant SQL functions.

2023-10-15 Thread Thomas Munro
Acquire ControlFileLock in relevant SQL functions. Commit dc7d70ea added functions that read the control file, but didn't acquire ControlFileLock. With unlucky timing, file systems that have weak interlocking like ext4 and ntfs could expose partially overwritten contents, and the checksum would f

pgsql: Acquire ControlFileLock in relevant SQL functions.

2023-10-15 Thread Thomas Munro
Acquire ControlFileLock in relevant SQL functions. Commit dc7d70ea added functions that read the control file, but didn't acquire ControlFileLock. With unlucky timing, file systems that have weak interlocking like ext4 and ntfs could expose partially overwritten contents, and the checksum would f

pgsql: Acquire ControlFileLock in relevant SQL functions.

2023-10-15 Thread Thomas Munro
Acquire ControlFileLock in relevant SQL functions. Commit dc7d70ea added functions that read the control file, but didn't acquire ControlFileLock. With unlucky timing, file systems that have weak interlocking like ext4 and ntfs could expose partially overwritten contents, and the checksum would f

pgsql: Acquire ControlFileLock in relevant SQL functions.

2023-10-15 Thread Thomas Munro
Acquire ControlFileLock in relevant SQL functions. Commit dc7d70ea added functions that read the control file, but didn't acquire ControlFileLock. With unlucky timing, file systems that have weak interlocking like ext4 and ntfs could expose partially overwritten contents, and the checksum would f

pgsql: Acquire ControlFileLock in relevant SQL functions.

2023-10-15 Thread Thomas Munro
Acquire ControlFileLock in relevant SQL functions. Commit dc7d70ea added functions that read the control file, but didn't acquire ControlFileLock. With unlucky timing, file systems that have weak interlocking like ext4 and ntfs could expose partially overwritten contents, and the checksum would f