Content-Length: 283239 | pFad | http://github.com/postgrespro/postgres_cluster/commit/e1647b957524599da17cd93e8153d81eb664cf4f

E9 Restore apply memory context after SPI call · postgrespro/postgres_cluster@e1647b9 · GitHub
Skip to content

Commit e1647b9

Browse files
knizhnikkelvich
authored andcommitted
Restore apply memory context after SPI call
1 parent f644229 commit e1647b9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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) {

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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/e1647b957524599da17cd93e8153d81eb664cf4f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy