citus
citus copied to clipboard
Keep temp reloid for columnar cases (Backport #8235 to release-13.2)
Backporting #8235 to release-13.2
PG18 and PG latest minors ignore temporary relations in RelidByRelfilenumber (RelidByRelfilenode in PG15) Relevant PG commit:
https://github.com/postgres/postgres/commit/86831952
Here we are keeping temp reloids instead of getting it with RelidByRelfilenumber, for example, in some cases, we can directly get reloid from relations, in other cases we keep it in some structures.
Note: there is still an outstanding issue with columnar temp tables in concurrent sessions, that will be fixed in PR https://github.com/citusdata/citus/pull/8252
(cherry picked from commit daa69bec8ff00ff6415b85d8602601d1b820cf51)