Cannot use Citus local table in a prepared transaction
Open
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
Assessment
This issue has not been assessed yet.