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

From Andres Freund
Subject Re: Pg_upgrade and toast tables bug discovered
Date
Msg-id 20140716142431.GA1471@alap3.anarazel.de
Whole thread Raw
In response to Re: Pg_upgrade and toast tables bug discovered  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On 2014-07-16 10:19:05 -0400, Bruce Momjian wrote:
> > > What would be nice is if I could mark just the tables that will need
> > > toast tables created in that later phase (those tables that didn't have
> > > a toast table in the old cluster, but need one in the new cluster). 
> > > However, I can't see where to store that or how to pass that back into
> > > pg_upgrade.  I don't see a logical place in pg_class to put it.
> > 
> > This seems overengineered. Why not just do
> > SELECT pg_upgrade.maintain_toast(oid) FROM pg_class WHERE relkind = 'r';
> > 
> > and in maintain_toast() just call AlterTableCreateToastTable()?
> 
> I didn't think you could call into backend functions like that, and if I
> did, it might break something in the future.

Why not? Pg_upgrade is already intimately linked into to the way the
backend works.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Pg_upgrade and toast tables bug discovered
Next
From: Tom Lane
Date:
Subject: Re: Unwanted LOG during recovery of DROP TABLESPACE REDO