On Thu, Oct 12, 2023 at 2:58 PM Nikita Malakhov <huku...@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 implemented
> for 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
> oids
> from 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.

Reply via email to