pgsql: Fix race condition in COMMIT PREPARED causing orphaned 2PC files

2024-09-30 Thread Michael Paquier
Fix race condition in COMMIT PREPARED causing orphaned 2PC files COMMIT PREPARED removes on-disk 2PC files near its end, but the state checked if a file is on-disk or not gets read from shared memory while not holding the two-phase state lock. Because of that, there was a small window where a sec

pgsql: Fix race condition in COMMIT PREPARED causing orphaned 2PC files

2024-09-30 Thread Michael Paquier
Fix race condition in COMMIT PREPARED causing orphaned 2PC files COMMIT PREPARED removes on-disk 2PC files near its end, but the state checked if a file is on-disk or not gets read from shared memory while not holding the two-phase state lock. Because of that, there was a small window where a sec

pgsql: Fix race condition in COMMIT PREPARED causing orphaned 2PC files

2024-09-30 Thread Michael Paquier
Fix race condition in COMMIT PREPARED causing orphaned 2PC files COMMIT PREPARED removes on-disk 2PC files near its end, but the state checked if a file is on-disk or not gets read from shared memory while not holding the two-phase state lock. Because of that, there was a small window where a sec

pgsql: Fix race condition in COMMIT PREPARED causing orphaned 2PC files

2024-09-30 Thread Michael Paquier
Fix race condition in COMMIT PREPARED causing orphaned 2PC files COMMIT PREPARED removes on-disk 2PC files near its end, but the state checked if a file is on-disk or not gets read from shared memory while not holding the two-phase state lock. Because of that, there was a small window where a sec

pgsql: Fix race condition in COMMIT PREPARED causing orphaned 2PC files

2024-09-30 Thread Michael Paquier
Fix race condition in COMMIT PREPARED causing orphaned 2PC files COMMIT PREPARED removes on-disk 2PC files near its end, but the state checked if a file is on-disk or not gets read from shared memory while not holding the two-phase state lock. Because of that, there was a small window where a sec

pgsql: Fix race condition in COMMIT PREPARED causing orphaned 2PC files

2024-09-30 Thread Michael Paquier
Fix race condition in COMMIT PREPARED causing orphaned 2PC files COMMIT PREPARED removes on-disk 2PC files near its end, but the state checked if a file is on-disk or not gets read from shared memory while not holding the two-phase state lock. Because of that, there was a small window where a sec

pgsql: Fix race condition in COMMIT PREPARED causing orphaned 2PC files

2024-09-30 Thread Michael Paquier
Fix race condition in COMMIT PREPARED causing orphaned 2PC files COMMIT PREPARED removes on-disk 2PC files near its end, but the state checked if a file is on-disk or not gets read from shared memory while not holding the two-phase state lock. Because of that, there was a small window where a sec