Skip to content

Commit 7ede347

Browse files
committed
Ignore concurrent option in create index and enable user two-phase transactions
1 parent cf4758e commit 7ede347

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

contrib/mmts/multimaster.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3777,6 +3777,16 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
37773777
MTM_LOG3("%d: Process utility statement %s", MyProcPid, queryString);
37783778
switch (nodeTag(parsetree))
37793779
{
3780+
case T_IndexStmt:
3781+
{
3782+
IndexStmt* stmt = (IndexStmt*) parsetree;
3783+
if (stmt->concurrent) {
3784+
stmt->concurrent = false;
3785+
elog(WARNING, "Disable concurrent option for index creation");
3786+
}
3787+
break;
3788+
}
3789+
37803790
case T_TransactionStmt:
37813791
{
37823792
TransactionStmt *stmt = (TransactionStmt *) parsetree;
@@ -3792,7 +3802,7 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
37923802
}
37933803
break;
37943804
case TRANS_STMT_PREPARE:
3795-
elog(ERROR, "Two phase commit is not supported by multimaster");
3805+
//elog(ERROR, "Two phase commit is not supported by multimaster");
37963806
break;
37973807
case TRANS_STMT_COMMIT_PREPARED:
37983808
case TRANS_STMT_ROLLBACK_PREPARED:

regress.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
create extension multimaster;
2-
ALTER DATABASE "postgres" SET lc_messages TO 'C';
3-
ALTER DATABASE "postgres" SET lc_monetary TO 'C';
4-
ALTER DATABASE "postgres" SET lc_numeric TO 'C';
5-
ALTER DATABASE "postgres" SET lc_time TO 'C';
6-
ALTER DATABASE "postgres" SET timezone_abbreviations TO 'Default';
2+
ALTER DATABASE "regression" SET lc_messages TO 'C';
3+
ALTER DATABASE "regression" SET lc_monetary TO 'C';
4+
ALTER DATABASE "regression" SET lc_numeric TO 'C';
5+
ALTER DATABASE "regression" SET lc_time TO 'C';
6+
ALTER DATABASE "regression" SET timezone_abbreviations TO 'Default';
77

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