StatisticsObjIsVisibleExt lacks "do not look in temp namespace"
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: pgsql-hackers@postgresql.org
Date: 2025-09-20T16:21:16Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix StatisticsObjIsVisibleExt() for pg_temp.
- afb2cce743d4 13.23 landed
- 5816baa9bcf3 14.20 landed
- d202ec1fb29d 15.15 landed
- ab16418ee0ec 16.11 landed
- 6778fbca63c9 17.7 landed
- d024160fffc8 18.1 landed
- a95393ecdb23 19 (unreleased) landed
Attachments
- stats-ext-visible-v1.patch (text/plain) patch v1
StatisticsObjIsVisibleExt() lacks the "do not look in temp namespace" code of the rest of the non-relation, non-type namespace searches. Patch attached. See its log messages for the consequences. Incidentally, stats on temp tables do default to a permanent schema. That seems fine, though: set search_path = public; CREATE TEMP TABLE ab1 (a INTEGER, b INTEGER, c INTEGER); CREATE STATISTICS s ON a, b FROM ab1; -- creates public.s \dX *.*