Unexpected "could not open relation with OID X" error when dropping citus due to having columnar tables
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
**To workaround this issue**, users should first drop their columnar tables before dropping citus, or before dropping the schema that contains citus.
----
This doesn't apply to master yet, but will do after merging #5456.
On #5456, we started having "could not open relation with OID XXXX" error when dropping citus.
Looking into the stack trace of the error, we realized that postgres somehow first decides dropping toast relation of `columnar.chunk`, then user's columnar table (say `columnar_table`), then `columnar.chunk` itself.
However, when deleting records from `columnar.chunk` for `columnar_table` when dropping it, we get that^ error when trying to delete corresponding entries from toast relation.
We don't think it affects the fix done in #5456 for pg upgrades, so we are commenting out that tests for now.
Opening this issue to not forget fixing that later.
Contributor guide
Assessment
This issue has not been assessed yet.