pg_upgrade and regclass

Started by Bruce Momjianover 14 years ago3 messageshackers
Jump to latest
#1Bruce Momjian
bruce@momjian.us

In Postgres 8.4, pg_upgrade preserved pg_class relfilenodes by creating
files in the file system. In Postgres 9.0, we changed this by creating
pg_upgrade_support functions which allow us to directly preserve
pg_class.oids.

Unfortunately, check.c was not updated to reflect this and clusters
using regclass were prevented from being upgraded by pg_upgrade.

I have developed the attached patch to allow clusters using regclass to
be upgraded. I plan to apply it to PG 9.0, 9.1, and HEAD.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachments:

/rtmp/pg_upgradetext/x-diffDownload+20-20
#2Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#1)
Re: pg_upgrade and regclass

Bruce Momjian wrote:

In Postgres 8.4, pg_upgrade preserved pg_class relfilenodes by creating
files in the file system. In Postgres 9.0, we changed this by creating
pg_upgrade_support functions which allow us to directly preserve
pg_class.oids.

Unfortunately, check.c was not updated to reflect this and clusters
using regclass were prevented from being upgraded by pg_upgrade.

I have developed the attached patch to allow clusters using regclass to
be upgraded. I plan to apply it to PG 9.0, 9.1, and HEAD.

I have applied the attached patch to all relevant releases. I did a
more modest single-line code change for back branches.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachments:

/rtmp/pg_upgradetext/x-diffDownload+22-22
#3Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#2)
Re: pg_upgrade and regclass

Bruce Momjian wrote:

Bruce Momjian wrote:

In Postgres 8.4, pg_upgrade preserved pg_class relfilenodes by creating
files in the file system. In Postgres 9.0, we changed this by creating
pg_upgrade_support functions which allow us to directly preserve
pg_class.oids.

Unfortunately, check.c was not updated to reflect this and clusters
using regclass were prevented from being upgraded by pg_upgrade.

I have developed the attached patch to allow clusters using regclass to
be upgraded. I plan to apply it to PG 9.0, 9.1, and HEAD.

I have applied the attached patch to all relevant releases. I did a
more modest single-line code change for back branches.

Oh, I forgot to mention that this bug report came to me privately via
EntepriseDB testing.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +