diff options
author | Pavan Deolasee | 2014-10-21 09:10:01 +0000 |
---|---|---|
committer | Pavan Deolasee | 2015-04-15 05:46:37 +0000 |
commit | 082424b0258bc1708aa90ccfd5c5910fa1c0acfe (patch) | |
tree | 5ba4b03174d06d432cfd9773f966abfadde329ab /src/backend/tcop/postgres.c | |
parent | 8cf5471b6288ff1268b6d05f8ab7dea5e6c8f6c5 (diff) |
Let CLUSTER get XID directly from GTM.
Just like VACUUM, CLUSTER command also needs to start transactions internally.
So we allow them to get XIDs directly from the GTM
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 137bc4fe33..43d37f927c 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -1205,8 +1205,9 @@ exec_simple_query(const char *query_string) #ifdef PGXC /* PGXC_DATANODE */ - /* Force getting Xid from GTM if not autovacuum, but a vacuum */ - if (IS_PGXC_DATANODE && IsA(parsetree, VacuumStmt) && IsPostmasterEnvironment) + /* Force getting Xid from GTM for vacuum and cluster. */ + if (IS_PGXC_DATANODE && IsPostmasterEnvironment && + (IsA(parsetree, VacuumStmt) || IsA(parsetree, ClusterStmt))) SetForceXidFromGTM(true); #endif |