Re: Fuzzy thinking in is_publishable_class
От | Tom Lane |
---|---|
Тема | Re: Fuzzy thinking in is_publishable_class |
Дата | |
Msg-id | 3957.1557411617@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Fuzzy thinking in is_publishable_class (Petr Jelinek <petr.jelinek@2ndquadrant.com>) |
Список | pgsql-hackers |
Petr Jelinek <petr.jelinek@2ndquadrant.com> writes: > I think we need a better way of identifying what's part of system and > what's user created in general. The FirstNormalObjectId seems somewhat > okay approximation, but then we have plenty of other ways for checking, > maybe it's time to consolidate it into some extra column in pg_class? I'd be on board with adding "bool relpublishable" or the like to pg_class. We'd also need infrastructure for setting that, of course, so it's not a five-minute fix. In the meantime I guess we have to leave the is_publishable_class test like it is. I am thinking though that the replication code's tests of type OIDs against FirstNormalObjectId are broken. The essential property that those are after, IIUC, is "will the remote server certainly have the same definition of this type as the local one?" That is *absolutely not guaranteed* for types defined in information_schema, because their OIDs aren't locked down and could plausibly be different across installations. I forget whether we load collations before or after information_schema, so this might or might not be a live bug today, but it's certainly something waiting to bite us on the rear. Actually --- that's for logical replication, isn't it? And we allow logical replication across versions, don't we? If so, it is a live bug. Only hand-assigned type OIDs should be trusted to hold still across major versions. In short I think we'd better s/FirstNormalObjectId/FirstGenbkiObjectId/ in logical/relation.c and pgoutput/pgoutput.c, and I think that's probably a back-patchable bug fix of some urgency. regards, tom lane
В списке pgsql-hackers по дате отправления: