Skip to content

Commit 3a21422

Browse files
committed
2 parents 6814ed1 + 8937e40 commit 3a21422

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

contrib/mmts/multimaster.c

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,18 +1150,19 @@ void MtmHandleApplyError(void)
11501150
{
11511151
ErrorData *edata = CopyErrorData();
11521152
switch (edata->sqlerrcode) {
1153-
case ERRCODE_DISK_FULL:
1154-
case ERRCODE_INSUFFICIENT_RESOURCES:
1155-
case ERRCODE_IO_ERROR:
1156-
case ERRCODE_DATA_CORRUPTED:
1157-
case ERRCODE_INDEX_CORRUPTED:
1158-
case ERRCODE_SYSTEM_ERROR:
1159-
case ERRCODE_INTERNAL_ERROR:
1160-
case ERRCODE_OUT_OF_MEMORY:
1161-
elog(WARNING, "Node is excluded from cluster because of non-recoverable error %d", edata->sqlerrcode);
1162-
MtmSwitchClusterMode(MTM_OUT_OF_SERVICE);
1163-
kill(PostmasterPid, SIGQUIT);
1164-
break;
1153+
case ERRCODE_DISK_FULL:
1154+
case ERRCODE_INSUFFICIENT_RESOURCES:
1155+
case ERRCODE_IO_ERROR:
1156+
case ERRCODE_DATA_CORRUPTED:
1157+
case ERRCODE_INDEX_CORRUPTED:
1158+
case ERRCODE_SYSTEM_ERROR:
1159+
case ERRCODE_INTERNAL_ERROR:
1160+
case ERRCODE_OUT_OF_MEMORY:
1161+
elog(WARNING, "Node is excluded from cluster because of non-recoverable error %d, %s, pid=%u",
1162+
edata->sqlerrcode, edata->message, getpid());
1163+
MtmSwitchClusterMode(MTM_OUT_OF_SERVICE);
1164+
kill(PostmasterPid, SIGQUIT);
1165+
break;
11651166
}
11661167
FreeErrorData(edata);
11671168
}
@@ -3182,7 +3183,8 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
31823183
{
31833184
/* Do not replicate temp tables */
31843185
CreateStmt *stmt = (CreateStmt *) parsetree;
3185-
skipCommand = stmt->relation->relpersistence == RELPERSISTENCE_TEMP;
3186+
skipCommand = stmt->relation->relpersistence == RELPERSISTENCE_TEMP ||
3187+
(stmt->relation->schemaname && strcmp(stmt->relation->schemaname, "pg_temp") == 0);
31863188
}
31873189
break;
31883190
case T_IndexStmt:

contrib/mmts/pglogical_apply.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,9 +701,8 @@ process_remote_insert(StringInfo s, Relation rel)
701701
MTM_LOG3("%d: Execute utility statement %s", MyProcPid, ddl);
702702
rc = SPI_execute(ddl, false, 0);
703703
SPI_finish();
704-
if (rc != SPI_OK_UTILITY) {
704+
if (rc < 0)
705705
elog(ERROR, "Failed to execute utility statement %s", ddl);
706-
}
707706
} else if (strcmp(relname, MULTIMASTER_LOCAL_TABLES_TABLE) == 0) {
708707
char* schema = TextDatumGetCString(new_tuple.values[Anum_mtm_local_tables_rel_schema-1]);
709708
char* name = TextDatumGetCString(new_tuple.values[Anum_mtm_local_tables_rel_name-1]);

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