Re: Pg_upgrade and toast tables bug discovered

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Pg_upgrade and toast tables bug discovered
Date: 2014-07-16 14:24:31
Message-ID: 20140716142431.GA1471@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-07-16 14:33:16 Re: Unwanted LOG during recovery of DROP TABLESPACE REDO
Previous Message Bruce Momjian 2014-07-16 14:19:05 Re: Pg_upgrade and toast tables bug discovered