diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2020-07-07 18:10:42 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2020-07-07 18:10:42 -0400 |
commit | 3f96af4619c8b129ec8d5f4fb961df4310999383 (patch) | |
tree | a4e3ff14186b3da63d651319e2e54af70aca5e43 /src/backend/access/gist/gistxlog.c | |
parent | f3faf35f370f558670c8213a08f2683f3811ffc7 (diff) | |
download | postgresql-3f96af4619c8b129ec8d5f4fb961df4310999383.tar.gz postgresql-3f96af4619c8b129ec8d5f4fb961df4310999383.zip |
Un-break pg_upgrade from pre-v12 servers.
I neglected to test this scenario while preparing commit f3faf35f3,
so of course it was broken, thanks to some very obscure and undocumented
code in pg_dump. Pre-v12 databases might have toast tables attached to
partitioned tables, which we need to ignore since newer servers never
create such useless toast tables. There was a filter for this case in
binary_upgrade_set_type_oids_by_rel_oid(), which appeared to just
prevent the pg_type OID from being copied. But actually it managed to
prevent the toast table from being created at all --- or it did before
I took out that logic. But that was a fundamentally bizarre place to be
making the test in the first place. The place where the filter should
have been, one would think, is binary_upgrade_set_pg_class_oids(), so
add it there.
While at it, reorganize binary_upgrade_set_pg_class_oids() so that it
doesn't make a completely useless query when it knows it's being
invoked for an index. And correct a comment that mis-described the
scenario where we need to force creation of a TOAST table.
Per buildfarm.
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
0 files changed, 0 insertions, 0 deletions