aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xact.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r--src/backend/access/transam/xact.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 4cc38f0d85e..d96881c0de5 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -46,6 +46,7 @@
#include "replication/logical.h"
#include "replication/logicallauncher.h"
#include "replication/origin.h"
+#include "replication/snapbuild.h"
#include "replication/syncrep.h"
#include "replication/walsender.h"
#include "storage/condition_variable.h"
@@ -2698,6 +2699,9 @@ AbortTransaction(void)
/* Reset logical streaming state. */
ResetLogicalStreamingState();
+ /* Reset snapshot export state. */
+ SnapBuildResetExportedSnapshotState();
+
/* If in parallel mode, clean up workers and exit parallel mode. */
if (IsInParallelMode())
{
@@ -5010,6 +5014,11 @@ AbortSubTransaction(void)
/* Reset logical streaming state. */
ResetLogicalStreamingState();
+ /*
+ * No need for SnapBuildResetExportedSnapshotState() here, snapshot
+ * exports are not supported in subtransactions.
+ */
+
/* Exit from parallel mode, if necessary. */
if (IsInParallelMode())
{