Skip to content

Commit 3faa3cf

Browse files
committed
Fix SignalBarrier
1 parent 30b887f commit 3faa3cf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/backend/commands/dbcommands.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3470,15 +3470,15 @@ dbase_redo(XLogReaderState *record)
34703470
}
34713471
pfree(parentdir);
34723472

3473+
/* Close all sgmr fds in all backends. */
3474+
WaitForProcSignalBarrier(EmitProcSignalBarrier(PROCSIGNAL_BARRIER_SMGRRELEASE));
3475+
34733476
/*
34743477
* Force dirty buffers out to disk, to ensure source database is
34753478
* up-to-date for the copy.
34763479
*/
34773480
FlushDatabaseBuffers(xlrec->src_db_id);
34783481

3479-
/* Close all sgmr fds in all backends. */
3480-
WaitForProcSignalBarrier(EmitProcSignalBarrier(PROCSIGNAL_BARRIER_SMGRRELEASE));
3481-
34823482
/*
34833483
* Copy this subdirectory to the new location
34843484
*

src/backend/utils/misc/faultinjector.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,7 @@ FaultInjector_SetFaultInjection(
876876
entryLocal->faultInjectorState != FaultInjectorStateCompleted &&
877877
entryLocal->numTimesTriggered - entryLocal->startOccurrence < entry->extraArg - 1)
878878
{
879+
CHECK_FOR_INTERRUPTS();
879880
pg_usleep(200000); /* 0.2 sec */
880881
retry_count--;
881882
if (!retry_count)

0 commit comments

Comments
 (0)