Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropping the schema in which Citus has been created fails if the schema was marked as distributed #6901

Open
onurctirtir opened this issue May 3, 2023 · 1 comment
Labels

Comments

@onurctirtir
Copy link
Member

Documenting a probably known/old issue:

SELECT citus_add_node('localhost', 9701);

-- create a Citus table in public schema to mark public as a distributed object
create table l1 (a int unique);
SELECT create_reference_table('l1');

drop schema public cascade;
NOTICE:  drop cascades to 2 other objects
DETAIL:  drop cascades to extension citus
drop cascades to table l1
ERROR:  cache lookup failed for pg_dist_local_group, called too early?
@onurctirtir onurctirtir added the bug label May 3, 2023
@onderkalaci
Copy link
Member

might be related #5780

onurctirtir added a commit that referenced this issue May 16, 2023
We mark objects as distributed objects in Citus metadata only if we need
to propagate given the command that creates it to worker nodes. For this
reason, we were not doing this for the objects that are created while
pg_dist_node is empty.

One implication of doing so is that we defer the schema propagation to
the time when user creates the first distributed table in the schema.
However, this doesn't help for schema-based sharding (#6866) because we
want to sync pg_dist_tenant_schema to the worker nodes even for empty
schemas too.

* Support test dependencies for isolation tests without a schedule

* Comment out a test due to a known issue (#6901)

* Also, reduce the verbosity for some log messages and make some
   tests compatible with run_test.py.
emelsimsek pushed a commit that referenced this issue May 24, 2023
We mark objects as distributed objects in Citus metadata only if we need
to propagate given the command that creates it to worker nodes. For this
reason, we were not doing this for the objects that are created while
pg_dist_node is empty.

One implication of doing so is that we defer the schema propagation to
the time when user creates the first distributed table in the schema.
However, this doesn't help for schema-based sharding (#6866) because we
want to sync pg_dist_tenant_schema to the worker nodes even for empty
schemas too.

* Support test dependencies for isolation tests without a schedule

* Comment out a test due to a known issue (#6901)

* Also, reduce the verbosity for some log messages and make some
   tests compatible with run_test.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants