summaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/ipc')
-rw-r--r--src/backend/storage/ipc/standby.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c
index 5acb4508f85..7fa8d9247e0 100644
--- a/src/backend/storage/ipc/standby.c
+++ b/src/backend/storage/ipc/standby.c
@@ -31,6 +31,7 @@
#include "storage/sinvaladt.h"
#include "storage/standby.h"
#include "utils/hsearch.h"
+#include "utils/injection_point.h"
#include "utils/ps_status.h"
#include "utils/timeout.h"
#include "utils/timestamp.h"
@@ -1287,6 +1288,17 @@ LogStandbySnapshot(void)
Assert(XLogStandbyInfoActive());
+#ifdef USE_INJECTION_POINTS
+ if (IS_INJECTION_POINT_ATTACHED("skip-log-running-xacts"))
+ {
+ /*
+ * This record could move slot's xmin forward during decoding, leading
+ * to unpredictable results, so skip it when requested by the test.
+ */
+ return GetInsertRecPtr();
+ }
+#endif
+
/*
* Get details of any AccessExclusiveLocks being held at the moment.
*/