Skip to content

Commit e34ee99

Browse files
committed
Improve commentary about hack in is_publishable_class().
The FirstNormalObjectId test here is a kluge that needs to go away, but the only substitute we can think of is to add a column to pg_class, which will take more work than can be handled right now. Add some commentary in the meanwhile. Discussion: https://postgr.es/m/15150.1557257111@sss.pgh.pa.us
1 parent 9b42e71 commit e34ee99

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/backend/catalog/pg_publication.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,17 @@ check_publication_add_relation(Relation targetrel)
9191
* Does same checks as the above, but does not need relation to be opened
9292
* and also does not throw errors.
9393
*
94-
* Note this also excludes all tables with relid < FirstNormalObjectId,
94+
* XXX This also excludes all tables with relid < FirstNormalObjectId,
9595
* ie all tables created during initdb. This mainly affects the preinstalled
96-
* information_schema. (IsCatalogRelationOid() only excludes tables with
97-
* relid < FirstBootstrapObjectId, making that test rather redundant, but
98-
* really we should get rid of the FirstNormalObjectId test not
99-
* IsCatalogRelationOid.)
96+
* information_schema. IsCatalogRelationOid() only excludes tables with
97+
* relid < FirstBootstrapObjectId, making that test rather redundant,
98+
* but really we should get rid of the FirstNormalObjectId test not
99+
* IsCatalogRelationOid. We can't do so today because we don't want
100+
* information_schema tables to be considered publishable; but this test
101+
* is really inadequate for that, since the information_schema could be
102+
* dropped and reloaded and then it'll be considered publishable. The best
103+
* long-term solution may be to add a "relispublishable" bool to pg_class,
104+
* and depend on that instead of OID checks.
100105
*/
101106
static bool
102107
is_publishable_class(Oid relid, Form_pg_class reltuple)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy