Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite34ee99

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 somecommentary in the meanwhile.Discussion:https://postgr.es/m/15150.1557257111@sss.pgh.pa.us
1 parent9b42e71 commite34ee99

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
staticbool
102107
is_publishable_class(Oidrelid,Form_pg_classreltuple)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp