Skip to content

Commit 31cd179

Browse files
committed
do not replicate EXPLAIN ANALYZE for now as it case bigger problems than a possible DDL-side effects
1 parent cb86819 commit 31cd179

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

multimaster.c

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4740,6 +4740,7 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
47404740
case T_LockStmt:
47414741
case T_CheckPointStmt:
47424742
case T_ReindexStmt:
4743+
case T_ExplainStmt:
47434744
skipCommand = true;
47444745
break;
47454746

@@ -4795,25 +4796,25 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
47954796
}
47964797
break;
47974798

4798-
case T_ExplainStmt:
4799-
/*
4800-
* EXPLAIN ANALYZE can create side-effects.
4801-
* Better to catch that by some general mechanism of detecting
4802-
* catalog and heap writes.
4803-
*/
4804-
{
4805-
ExplainStmt *stmt = (ExplainStmt *) parsetree;
4806-
ListCell *lc;
4807-
4808-
skipCommand = true;
4809-
foreach(lc, stmt->options)
4810-
{
4811-
DefElem *opt = (DefElem *) lfirst(lc);
4812-
if (strcmp(opt->defname, "analyze") == 0)
4813-
skipCommand = false;
4814-
}
4815-
}
4816-
break;
4799+
// case T_ExplainStmt:
4800+
// /*
4801+
// * EXPLAIN ANALYZE can create side-effects.
4802+
// * Better to catch that by some general mechanism of detecting
4803+
// * catalog and heap writes.
4804+
// */
4805+
// {
4806+
// ExplainStmt *stmt = (ExplainStmt *) parsetree;
4807+
// ListCell *lc;
4808+
4809+
// skipCommand = true;
4810+
// foreach(lc, stmt->options)
4811+
// {
4812+
// DefElem *opt = (DefElem *) lfirst(lc);
4813+
// if (strcmp(opt->defname, "analyze") == 0)
4814+
// skipCommand = false;
4815+
// }
4816+
// }
4817+
// break;
48174818

48184819
/* Save GUC context for consequent DDL execution */
48194820
case T_DiscardStmt:

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