From: Bruce Momjian <bruce@momjian.us>
To: Venkata B Nagothi <nag1010@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Postgres upgrade 12 - issues with OIDs
Date: Tue, 4 May 2021 19:22:12 -0400
Message-ID: <20210504232212.GE27412@momjian.us> (raw)
In-Reply-To: <CAEyp7J-zwbRqR7P64ik6VmO1fqYa4z-QwfQVnNP7LcxDA3XwKA@mail.gmail.com>
References: <CAEyp7J-zwbRqR7P64ik6VmO1fqYa4z-QwfQVnNP7LcxDA3XwKA@mail.gmail.com>
On Wed, May 5, 2021 at 07:49:29AM +1000, Venkata B Nagothi wrote:
> Hi There,
>
> We are attempting to upgrade our Postgres databases from 9.5 to 12.5 using
> pg_upgrade link mode and are facing issues with OIDs.
>
> ALTER TABLE... SET WITHOUT OIDs on the larger tables is taking very long and is
> locking up the table as well. We do have tables of more than 1 TB of size.
> Is there any way to make this complete faster ? Any suggestions would be
> great.
Uh, I see this on our code:
pg_fatal("Your installation contains tables declared WITH OIDS, which is not\n"
"supported anymore. Consider removing the oid column using\n"
" ALTER TABLE ... SET WITHOUT OIDS;\n"
"A list of tables with the problem is in the file:\n"
" %s\n\n", output_path);
Uh, I don't know of any way to speed that up, though it might be faster
if it was done while no one else was accessing the table. I see this
comment in our PG 11 code:
/*
* If we dropped the OID column, must adjust pg_class.relhasoids and tell
* Phase 3 to physically get rid of the column. We formerly left the
* column in place physically, but this caused subtle problems. See
* http://archives.postgresql.org/pgsql-hackers/2009-02/msg00363.php
*/
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: bruce@momjian.us, nag1010@gmail.com
Subject: Re: Postgres upgrade 12 - issues with OIDs
In-Reply-To: <20210504232212.GE27412@momjian.us>
References: <CAEyp7J-zwbRqR7P64ik6VmO1fqYa4z-QwfQVnNP7LcxDA3XwKA@mail.gmail.com> <20210504232212.GE27412@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox