mirror of https://github.com/citusdata/citus.git
Don't call PostProcessUtility for local commands
It is intended only to aid in processing of distributed DDL commands, but as written could execute during local CREATE INDEX CONCURRENTLY commands.pull/1457/head
parent
0f284c9adf
commit
294aeff2ed
|
@ -395,7 +395,11 @@ multi_ProcessUtility(Node *parsetree,
|
|||
standard_ProcessUtility(parsetree, queryString, context,
|
||||
params, dest, completionTag);
|
||||
|
||||
/* don't run post-process code for local commands */
|
||||
if (ddlJobs != NIL)
|
||||
{
|
||||
PostProcessUtility(parsetree);
|
||||
}
|
||||
|
||||
if (commandMustRunAsOwner)
|
||||
{
|
||||
|
|
|
@ -92,6 +92,10 @@ CREATE INDEX IF NOT EXISTS lineitem_orderkey_index on index_test_hash(a);
|
|||
NOTICE: relation "lineitem_orderkey_index" already exists, skipping
|
||||
-- Verify that we can create indexes concurrently
|
||||
CREATE INDEX CONCURRENTLY lineitem_concurrently_index ON lineitem (l_orderkey);
|
||||
-- Verify that no-name local CREATE INDEX CONCURRENTLY works
|
||||
CREATE TABLE local_table (id integer, name text);
|
||||
CREATE INDEX CONCURRENTLY ON local_table(id);
|
||||
DROP TABLE local_table;
|
||||
-- Verify that all indexes got created on the master node and one of the workers
|
||||
SELECT * FROM pg_indexes WHERE tablename = 'lineitem' or tablename like 'index_test_%' ORDER BY indexname;
|
||||
schemaname | tablename | indexname | tablespace | indexdef
|
||||
|
|
|
@ -66,6 +66,11 @@ CREATE INDEX IF NOT EXISTS lineitem_orderkey_index on index_test_hash(a);
|
|||
-- Verify that we can create indexes concurrently
|
||||
CREATE INDEX CONCURRENTLY lineitem_concurrently_index ON lineitem (l_orderkey);
|
||||
|
||||
-- Verify that no-name local CREATE INDEX CONCURRENTLY works
|
||||
CREATE TABLE local_table (id integer, name text);
|
||||
CREATE INDEX CONCURRENTLY ON local_table(id);
|
||||
DROP TABLE local_table;
|
||||
|
||||
-- Verify that all indexes got created on the master node and one of the workers
|
||||
SELECT * FROM pg_indexes WHERE tablename = 'lineitem' or tablename like 'index_test_%' ORDER BY indexname;
|
||||
\c - - - :worker_1_port
|
||||
|
|
Loading…
Reference in New Issue