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

Drop distributed hypertable within procedure doesn't drop remote tables #3663

Closed
phemmer opened this issue Oct 7, 2021 · 0 comments · Fixed by #3673
Closed

Drop distributed hypertable within procedure doesn't drop remote tables #3663

phemmer opened this issue Oct 7, 2021 · 0 comments · Fixed by #3673
Assignees

Comments

@phemmer
Copy link

phemmer commented Oct 7, 2021

Relevant system information:

  • OS: Debian 10/Buster
  • PostgreSQL version (output of postgres --version): postgres (PostgreSQL) 13.4 (Debian 13.4-1.pgdg100+1)
  • TimescaleDB version (output of \dx in psql): 2.4.1
  • Installation method: apt

Describe the bug
When dropping a distributed hypertable within a procedure, only the table on the access node is dropped, while the table(s) on the data node(s) remain.

To Reproduce
Steps to reproduce the behavior:

create table test (time timestamp, v int);
select create_distributed_hypertable('test','time');
create procedure test_drop() language plpgsql as $$
begin
    drop table test;
end
$$;
call test_drop();
create table test (time timestamp, v int);
select create_distributed_hypertable('test','time');

Expected behavior
success

Actual behavior

[42P07] ERROR: [datanode1]: relation "test" already exists

Additional context
I thought I saw another similar issue recently where someone reported problems running a DDL statement inside a procedure/function and it not distributing to data nodes properly. But now I can't find it :-/

@pmwkaa pmwkaa self-assigned this Oct 7, 2021
pmwkaa added a commit to pmwkaa/timescaledb that referenced this issue Oct 9, 2021
When DROP being executed inside procedure ddl_command_start
was not handled which lead to ignoring this operation on the
data nodes.

Fix timescale#3663
pmwkaa added a commit to pmwkaa/timescaledb that referenced this issue Oct 9, 2021
When DROP being executed inside procedure ddl_command_start
was not handled which lead to ignoring this operation on the
data nodes.

Fix timescale#3663
pmwkaa added a commit to pmwkaa/timescaledb that referenced this issue Oct 12, 2021
When DROP being executed inside procedure ddl_command_start
was not handled which lead to ignoring this operation on the
data nodes.

Fix timescale#3663
pmwkaa added a commit that referenced this issue Oct 12, 2021
When DROP being executed inside procedure ddl_command_start
was not handled which lead to ignoring this operation on the
data nodes.

Fix #3663
pmwkaa added a commit to pmwkaa/timescaledb that referenced this issue Oct 16, 2021
Make sure `ALTER TABLE SET (timescaledb.compress)` command properly
propagated to the data nodes when executed within a procedure.

This includes only test a case, actual fix was done in timescale#3663.

Fix timescale#3705
pmwkaa added a commit to pmwkaa/timescaledb that referenced this issue Oct 16, 2021
Make sure `ALTER TABLE SET (timescaledb.compress)` command properly
propagated to the data nodes when executed within a procedure.

This includes only test a case, actual fix was done in timescale#3663.

Fix timescale#3705
pmwkaa added a commit to pmwkaa/timescaledb that referenced this issue Nov 22, 2021
Make sure ALTER TABLE SET (timescaledb.compress) command properly
propagated to the data nodes when executed within a procedure.

This includes only test a case, actual fix was done in timescale#3663.

Fix timescale#3705
pmwkaa added a commit to pmwkaa/timescaledb that referenced this issue Nov 22, 2021
Make sure ALTER TABLE SET (timescaledb.compress) command properly
propagated to the data nodes when executed within a procedure.

This includes only test a case, actual fix was done in timescale#3663.

Fix timescale#3705
pmwkaa added a commit to pmwkaa/timescaledb that referenced this issue Nov 22, 2021
Make sure ALTER TABLE SET (timescaledb.compress) command properly
propagated to the data nodes when executed within a procedure.

This includes only test a case, actual fix was done in timescale#3663.

Fix timescale#3705
pmwkaa added a commit to pmwkaa/timescaledb that referenced this issue Nov 22, 2021
Make sure ALTER TABLE SET (timescaledb.compress) command properly
propagated to the data nodes when executed within a procedure.

This includes only test a case, actual fix was done in timescale#3663.

Fix timescale#3705
pmwkaa added a commit that referenced this issue Nov 22, 2021
Make sure ALTER TABLE SET (timescaledb.compress) command properly
propagated to the data nodes when executed within a procedure.

This includes only test a case, actual fix was done in #3663.

Fix #3705
duncan-tsdb pushed a commit that referenced this issue Dec 2, 2021
Make sure ALTER TABLE SET (timescaledb.compress) command properly
propagated to the data nodes when executed within a procedure.

This includes only test a case, actual fix was done in #3663.

Fix #3705
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.

2 participants