Re: pg_migrator and an 8.3-compatible tsvector data type

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Greg Stark <stark(at)enterprisedb(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: pg_migrator and an 8.3-compatible tsvector data type
Date: 2009-06-01 15:03:46
Message-ID: 603c8f070906010803hbe749ffra61e0e20836ace23@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, May 31, 2009 at 11:49 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> (At the risk of beating a dead horse, note if we were upgrading the
>> catalog tables directly via SQL, this type of scenario could be
>> handled cleanly without hacking pg_dump; I repeat my earlier critique
>> that the pg_migrator approach consigns us to a never-ending series of
>> pg_dump hacks, that or having it not work very well.)
>
> "Updating the catalog tables directly via SQL"?  Good luck making that
> work.  If you ever get it to work at all, it'll require a pile of hacks
> that will make pg_migrator look like paradise.

For clarity, I really mean "from a standalone backend", but ideally
I'd like it to be SQL.

> (Which is not to say that pg_migrator isn't a hack; it surely is.
> But it looks like the least painful approach available.)

Maybe. It seems that we don't have a good way of handling datatype
conversions. The approaches that have been proposed for tsvector
wouldn't work at all but for the fact that the new output function can
handle the old internal representation, which is not something that we
can guarantee in every case. And, even so, they leave the database in
a broken state until the post-migration scripts have been run. The
good news is that tsvector is not a datatype that everyone uses, and
those who do probably don't use it in every table, but what happens
when we want to change numeric incompatibly?

We really need to figure out an approach that lets us keep the old
datatypes around under a different name while making the original name
be the new version of the datatype. That way people can migrate and
be up, and deal with the need to rewrite their tables at a later time.
Having the database come up quickly but in a state where queries may
return wrong answers is a fairly poor excuse for in-place upgrade.
This is not to say that I don't appreciate the work Bruce is putting
into it, but I fear that without some more engineering it's just going
to be a hack used only by the desperate.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-06-01 15:08:34 Re: Patch: AdjustIntervalForTypmod shouldn't discard high-order data
Previous Message Heikki Linnakangas 2009-06-01 14:55:53 Re: pg_standby -l might destory the archived file