diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index bf3dbda901..bdfc92cd6e 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -6126,6 +6126,19 @@ StartupXLOG(void) Insert->fullPageWrites = lastFullPageWrites; UpdateFullPageWrites(); + /* + * Code below is for test purposes only to reveal possible timeline issue. + */ + { + struct stat st; + + elog(LOG, "Start delay in StartupXLOG()"); + + while (stat("delay_recovery.signal", &st) == 0) + pg_usleep(10000L); /* sleep for 10 ms*/ + + elog(LOG, "Stop delay in StartupXLOG()"); + } /* * Emit checkpoint or end-of-recovery record in XLOG, if required. */