Re: Pro et contra of preserving pg_proc oids during pg_upgrade
От | David G. Johnston |
---|---|
Тема | Re: Pro et contra of preserving pg_proc oids during pg_upgrade |
Дата | |
Msg-id | CAKFQuwYworUX1DCkc3WB82Ld2mkB+HB_uasnqkN0DWwc7zCBdg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Pro et contra of preserving pg_proc oids during pg_upgrade (Nikita Malakhov <hukutoc@gmail.com>) |
Список | pgsql-hackers |
On Thu, Oct 12, 2023 at 2:58 PM Nikita Malakhov <hukutoc@gmail.com> wrote:
Why pg_upgrade cannot be used?
We document both a pg_dump/pg_restore migration and a pg_upgrade one (not to mention that logical backup and restore would cause the oids to change). It seems odd to have a feature that requires pg_upgrade to be the chosen one. pg_upgrade is an option, not a requirement. Same goes for pg_basebackup.
pg_upgrade itself warns that should the on-disk file format change then it would be unusable - though I suspect that we'd end up with some kind of hybrid approach in that case.
OID preservation logic is already implementedfor several OIDs in catalog tables, like pg_class, type, relfilenode, enum...
We are allowed to preserve oids if we wish but that doesn't mean we must, nor does doing so constitute a declaration that such oids are part of the public API. And I don't see us making OIDs part of the public API unless we modify pg_dump to include them in its output.
Actually, I've asked here because there are several references to PG_PROC oidsfrom other tables in the system catalog
Of course there are, e.g., views depending on functions would result is those. But pg_upgrade et al. recomputes the views so the changing of oids isn't a problem.
Long text fields are common in databases; and if there are concerns with parsing/interpretation we can add functions to make doing that simpler.
David J.
В списке pgsql-hackers по дате отправления: