Skip to content

Commit 66fca42

Browse files
committed
Restore apply memory context after SPI call
1 parent e8a6e91 commit 66fca42

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

contrib/mmts/pglogical_apply.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ process_remote_message(StringInfo s)
403403
if (rc < 0) {
404404
MTM_ELOG(ERROR, "Failed to execute utility statement %s", messageBody);
405405
} else {
406+
MemoryContextSwitchTo(MtmApplyContext);
406407
PushActiveSnapshot(GetTransactionSnapshot());
407408

408409
if (MtmVacuumStmt != NULL) {

contrib/mmts/pglogical_receiver.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,8 @@ pglogical_receiver_main(Datum main_arg)
550550
if (stmt[0] == 'Z' || (stmt[0] == 'M' && (stmt[1] == 'L' || stmt[1] == 'A' || stmt[1] == 'C'))) {
551551
MTM_LOG3("Process '%c' message from %d", stmt[1], nodeId);
552552
if (stmt[0] == 'M' && stmt[1] == 'C') { /* concurrent DDL should be executed by parallel workers */
553-
MtmExecute(stmt, msg_len);
553+
//MtmExecute(stmt, msg_len);
554+
MtmExecutor(stmt, msg_len);
554555
} else {
555556
MtmExecutor(stmt, msg_len); /* all other messages can be processed by receiver itself */
556557
}

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