mirror of https://github.com/citusdata/citus.git
{*,}create_distributed_table doesn't emit OID (#1710)
parent
ebcb2b65e9
commit
91ff8cd2d5
|
@ -133,7 +133,13 @@ master_create_distributed_table(PG_FUNCTION_ARGS)
|
||||||
* sense of this table until we've committed, and we don't want multiple
|
* sense of this table until we've committed, and we don't want multiple
|
||||||
* backends manipulating this relation.
|
* backends manipulating this relation.
|
||||||
*/
|
*/
|
||||||
relation = relation_open(relationId, ExclusiveLock);
|
relation = try_relation_open(relationId, ExclusiveLock);
|
||||||
|
|
||||||
|
if (relation == NULL)
|
||||||
|
{
|
||||||
|
ereport(ERROR, (errmsg("could not create distributed table: "
|
||||||
|
"relation does not exist")));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We should do this check here since the codes in the following lines rely
|
* We should do this check here since the codes in the following lines rely
|
||||||
|
@ -191,7 +197,13 @@ create_distributed_table(PG_FUNCTION_ARGS)
|
||||||
* sense of this table until we've committed, and we don't want multiple
|
* sense of this table until we've committed, and we don't want multiple
|
||||||
* backends manipulating this relation.
|
* backends manipulating this relation.
|
||||||
*/
|
*/
|
||||||
relation = relation_open(relationId, ExclusiveLock);
|
relation = try_relation_open(relationId, ExclusiveLock);
|
||||||
|
|
||||||
|
if (relation == NULL)
|
||||||
|
{
|
||||||
|
ereport(ERROR, (errmsg("could not create distributed table: "
|
||||||
|
"relation does not exist")));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We should do this check here since the codes in the following lines rely
|
* We should do this check here since the codes in the following lines rely
|
||||||
|
|
|
@ -213,7 +213,7 @@ step s1-drop: DROP TABLE drop_hash;
|
||||||
step s2-distribute-table: SELECT create_distributed_table('drop_hash', 'id'); <waiting ...>
|
step s2-distribute-table: SELECT create_distributed_table('drop_hash', 'id'); <waiting ...>
|
||||||
step s1-commit: COMMIT;
|
step s1-commit: COMMIT;
|
||||||
step s2-distribute-table: <... completed>
|
step s2-distribute-table: <... completed>
|
||||||
error in steps s1-commit s2-distribute-table: ERROR: could not open relation with OID 23249
|
error in steps s1-commit s2-distribute-table: ERROR: could not create distributed table: relation does not exist
|
||||||
step s2-commit: COMMIT;
|
step s2-commit: COMMIT;
|
||||||
step s1-select-count: SELECT COUNT(*) FROM drop_hash;
|
step s1-select-count: SELECT COUNT(*) FROM drop_hash;
|
||||||
ERROR: relation "drop_hash" does not exist
|
ERROR: relation "drop_hash" does not exist
|
||||||
|
|
|
@ -213,7 +213,7 @@ step s1-drop: DROP TABLE drop_hash;
|
||||||
step s2-distribute-table: SELECT create_distributed_table('drop_hash', 'id'); <waiting ...>
|
step s2-distribute-table: SELECT create_distributed_table('drop_hash', 'id'); <waiting ...>
|
||||||
step s1-commit: COMMIT;
|
step s1-commit: COMMIT;
|
||||||
step s2-distribute-table: <... completed>
|
step s2-distribute-table: <... completed>
|
||||||
error in steps s1-commit s2-distribute-table: ERROR: could not open relation with OID 22205
|
error in steps s1-commit s2-distribute-table: ERROR: could not create distributed table: relation does not exist
|
||||||
step s2-commit: COMMIT;
|
step s2-commit: COMMIT;
|
||||||
step s1-select-count: SELECT COUNT(*) FROM drop_hash;
|
step s1-select-count: SELECT COUNT(*) FROM drop_hash;
|
||||||
ERROR: relation "drop_hash" does not exist
|
ERROR: relation "drop_hash" does not exist
|
||||||
|
|
Loading…
Reference in New Issue