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

Cannot drop a column from a reference table on the coordinator #3279

Closed
marcocitus opened this issue Dec 10, 2019 · 0 comments · Fixed by #3280
Closed

Cannot drop a column from a reference table on the coordinator #3279

marcocitus opened this issue Dec 10, 2019 · 0 comments · Fixed by #3280

Comments

@marcocitus
Copy link
Member

marcocitus commented Dec 10, 2019

The checks for reference + local table joins might be too aggressive as they can show up in the drop trigger.

SELECT master_add_node('localhost', 5432, groupid := 0);
CREATE TABLE ref (a int, b int);
SELECT create_reference_table('ref');
ALTER TABLE ref DROP COLUMN z;
ERROR:  cannot join local tables and reference tables in a transaction block
CONTEXT:  while executing command on 127.0.0.1:5432
SQL statement "SELECT master_unmark_object_distributed(v_obj.classid, v_obj.objid, v_obj.objsubid)"
PL/pgSQL function citus_drop_trigger() line 28 at PERFORM
SELECT worker_apply_shard_ddl_command (102040, 'public', 'ALTER TABLE ref DROP COLUMN z;');
ERROR:  cannot join local tables and reference tables in a transaction block
CONTEXT:  SQL statement "SELECT master_unmark_object_distributed(v_obj.classid, v_obj.objid, v_obj.objsubid)"
PL/pgSQL function citus_drop_trigger() line 28 at PERFORM
@marcocitus marcocitus added the bug label Dec 10, 2019
@marcocitus marcocitus changed the title Strange cannot join local tables and reference tables error Cannot drop a column from a reference table on the coordinator Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant