Skip to content

Commit 2c332a2

Browse files
committed
Adapt mmts for commit ef94805096
Due to ef94805096 'Restore the portal-level snapshot after procedure COMMIT/ROLLBACK.' there should be ActiveSnapshot set. Otherwise EnsurePortalSnapshotExists will assert on ActivePortal->portalSnapshot == NULL since current portal has snapshot in outer transaction. Tags: multimaster
1 parent 029970c commit 2c332a2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ddl.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,9 +1401,18 @@ MtmApplyDDLMessage(const char *messageBody, bool transactional)
14011401

14021402
DDLApplyInProgress = transactional ? MTM_DDL_IN_PROGRESS_TX :
14031403
MTM_DDL_IN_PROGRESS_NONTX;
1404+
1405+
/*
1406+
* Due to ef94805096 'Restore the portal-level snapshot after procedure COMMIT/ROLLBACK.'
1407+
* there should be ActiveSnapshot set. Otherwise EnsurePortalSnapshotExists
1408+
* will assert on ActivePortal->portalSnapshot == NULL since current
1409+
* portal has snapshot in outer transaction.
1410+
*/
1411+
PushActiveSnapshot(GetTransactionSnapshot());
14041412
SPI_connect();
14051413
rc = SPI_execute(messageBody, false, 0);
14061414
SPI_finish();
1415+
PopActiveSnapshot();
14071416

14081417
if (rc < 0)
14091418
elog(ERROR, "Failed to execute utility statement %s", messageBody);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy