Re: Pg_upgrade and toast tables bug discovered - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Pg_upgrade and toast tables bug discovered
Date
Msg-id CA+TgmoaYhD8KNfwB_ZgHy7aBQ=YtxBLboJDWwHJmV7sNKimrKA@mail.gmail.com
Whole thread Raw
In response to Re: Pg_upgrade and toast tables bug discovered  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Pg_upgrade and toast tables bug discovered  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Wed, Jul 9, 2014 at 12:09 PM, Bruce Momjian <bruce@momjian.us> wrote:
>> To me, that sounds vastly more complicated and error-prone than
>> forcing the TOAST tables to be added in a second pass as Andres
>> suggested.
>>
>> But I just work here.
>
> Agreed.  I am now thinking we could harness the code that already exists
> to optionally add a TOAST table as part of ALTER TABLE ADD COLUMN.  We
> would just need an entry point to call it from pg_upgrade, either via an
> SQL command that checks (and hopefully doesn't do anything else), or a C
> function that does it, e.g. VACUUM would be trivial to run on every
> database, but I don't think it tests that;  is _could_ in binary_upgrade
> mode.  However, the idea of having a C function plug into the guts of
> the server and call internal functions makes me uncomforable.

Well, pg_upgrade_support's charter is basically to provide access to
the guts of the server in ways we wouldn't normally allow; all that
next-OID stuff is basically exactly that.  So I don't think this is
such a big deal.  It needs to be properly commented, of course.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: IMPORT FOREIGN SCHEMA statement
Next
From: Robert Haas
Date:
Subject: Re: FW: [postgres-discuss] Insert query hangs