Remove citus-tools submodule

m3hm3t/pg18_columnar_access_temp_err
Mehmet Yilmaz 2025-10-24 12:45:15 +00:00
parent f77667857c
commit 5fd40f9b60
2 changed files with 16 additions and 16 deletions

@ -1 +0,0 @@
Subproject commit 3376bd6845f0614908ed304f5033bd644c82d3bf

View File

@ -2025,23 +2025,24 @@ columnar_relation_storageid(PG_FUNCTION_ARGS)
{
Oid relationId = PG_GETARG_OID(0);
/* Keep in sync with columnar.storage view filter (exclude other sessions' temps). */
#if PG_VERSION_NUM >= PG_VERSION_18
/*
* PG18+: avoid relation_open() on other sessions' temp tables.
* Return NULL so callers/views just skip them (function is STRICT).
*/
HeapTuple classtup = SearchSysCache1(RELOID, ObjectIdGetDatum(relationId));
if (!HeapTupleIsValid(classtup))
PG_RETURN_NULL();
Form_pg_class cls = (Form_pg_class) GETSTRUCT(classtup);
if (cls->relpersistence == RELPERSISTENCE_TEMP &&
isOtherTempNamespace(cls->relnamespace))
{
ReleaseSysCache(classtup);
PG_RETURN_NULL();
}
ReleaseSysCache(classtup);
/* PG18+: avoid relation_open() on other sessions' temp tables. */
HeapTuple classtup = SearchSysCache1(RELOID, ObjectIdGetDatum(relationId));
if (!HeapTupleIsValid(classtup))
{
PG_RETURN_NULL(); /* invalid/gone OID */
}
Form_pg_class cls = (Form_pg_class) GETSTRUCT(classtup);
bool reject = (cls->relpersistence == RELPERSISTENCE_TEMP) &&
isOtherTempNamespace(cls->relnamespace);
ReleaseSysCache(classtup);
if (reject)
{
PG_RETURN_NULL(); /* function is STRICT; callers just skip */
}
#endif
Relation relation = relation_open(relationId, AccessShareLock);