citusdata / citusdata/citus

When local execution is disabled, Citus might fail for complex transactions

Open
#4,863 1 comment 0 reactions 0 assignees View on GitHub
bug single node
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

Steps to repro, where `run_maintenance_proc` is a complex function:

```SQL
DROP TABLE IF EXISTS github_events, template_github_events;

CREATE TABLE github_events (
batch_hour timestamptz,
event_id bigserial,
data jsonb
)
PARTITION BY RANGE (batch_hour);

SELECT create_distributed_table('github_events', 'event_id');

CREATE TABLE template_github_events (LIKE github_events);
CREATE INDEX github_event_id ON template_github_events USING brin (event_id);

TRUNCATE partman.part_config CASCADE;
SELECT partman.create_parent(
p_parent_table := 'public.github_events',
p_control := 'batch_hour',
p_type := 'native',
p_interval := '1 day',
p_start_partition := '2021-03-20',
p_template_table := 'public.template_github_events'
);
DROP TABLE github_events_default;

BEGIN;
SET citus.enable_local_execution TO off;
CALL partman.run_maintenance_proc();
ERROR: invalid transaction termination
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.