Distributed types cause a distributed deadlock when dropped and recreated in the same transaction
Open
bug
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
```sql
CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');
CREATE TABLE people_mood (user_id int, b mood);
SELECT create_distributed_table('people_mood', 'user_id');
BEGIN;
-- should switch to sequential mode
DROP TYPE mood CASCADE;
-- should only see user_id
SELECT * FROM people_mood;
CREATE TYPE mood AS ENUM ('super_sad', 'sad', 'ok', 'happy', 'super_happy');
ALTER TABLE people_mood ADD COLUMN mood_of_user mood;
ERROR: canceling the transaction since it was involved in a distributed deadlock
```
Contributor guide
Assessment
This issue has not been assessed yet.