Skip to content

Commit 7e54475

Browse files
knizhnikkelvich
authored andcommitted
Support local COPY ultility
1 parent feaff21 commit 7e54475

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

multimaster.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5110,6 +5110,7 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
51105110
CopyStmt *copyStatement = (CopyStmt *) parsetree;
51115111
skipCommand = true;
51125112
if (copyStatement->is_from) {
5113+
ListCell *opt;
51135114
RangeVar *relation = copyStatement->relation;
51145115

51155116
if (relation != NULL)
@@ -5124,6 +5125,17 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
51245125
heap_close(rel, ShareLock);
51255126
}
51265127
}
5128+
5129+
foreach(opt, copyStatement->options)
5130+
{
5131+
DefElem *elem = lfirst(opt);
5132+
if (strcmp("local", elem->defname) == 0) {
5133+
MtmTx.isDistributed = false; /* Skip */
5134+
MtmTx.snapshot = INVALID_CSN;
5135+
MtmTx.containsDML = false;
5136+
break;
5137+
}
5138+
}
51275139
}
51285140
case T_CreateFunctionStmt:
51295141
{

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