From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tory M Blue <tmblue@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Huge tables, trying to delete OID's taking 6+hours per table
Date: Tue, 19 May 2020 09:40:43 -0400
Message-ID: <27067.1589895643@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEaSS0Yzm0F9w+tWPOX5OHWRq44-s1Tn0kKsEV0hjniYeWDC_A@mail.gmail.com>
References: <CAEaSS0YMuvA_J8LOLWwxFaxVAFhgezekB3vQycywQdiiDud2Hg@mail.gmail.com>
<CAEaSS0Yzm0F9w+tWPOX5OHWRq44-s1Tn0kKsEV0hjniYeWDC_A@mail.gmail.com>
Tory M Blue <tmblue@gmail.com> writes:
> The command i'm using is
> ALTER TABLE tablename SET WITHOUT OIDS;
> Would a drop column oid be better?
Unfortunately, you're kind of stuck. OIDs are not like regular columns
(at least before v12) --- they are integrated into the tuple header in
a hackish way, and so there's no way to get rid of them without a table
rewrite.
regards, tom lane
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: tgl@sss.pgh.pa.us, tmblue@gmail.com
Subject: Re: Huge tables, trying to delete OID's taking 6+hours per table
In-Reply-To: <27067.1589895643@sss.pgh.pa.us>
References: <CAEaSS0YMuvA_J8LOLWwxFaxVAFhgezekB3vQycywQdiiDud2Hg@mail.gmail.com> <CAEaSS0Yzm0F9w+tWPOX5OHWRq44-s1Tn0kKsEV0hjniYeWDC_A@mail.gmail.com> <27067.1589895643@sss.pgh.pa.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