citusdata / citusdata/citus

Cannot use Citus local table in a prepared transaction

Open
#4,509 3 comments 0 reactions 1 assignee Claimed by @onderkalaci View on GitHub
bug
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

We currently decide whether to allow 2PC based on whether we're in a "coordinated transaction", but we should check whether the transaction actually involves other nodes (e.g. requires 2PC).
```sql
CREATE TABLE local (x int, y int);
SELECT create_citus_local_table('local');
BEGIN;
INSERT INTO local VALUES (1,2);
PREPARE TRANSACTION 'foo';
ERROR: cannot use 2PC in transactions involving multiple servers
```

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.