Re: [GENERAL] pg_migrator not setting values of sequences?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>, Tilmann Singer <tils(at)tils(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] pg_migrator not setting values of sequences?
Date: 2009-07-16 04:11:19
Message-ID: 200907160411.n6G4BJH09905@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


A larger question is what do we do with pg_migrator now. I am
embarrassed I didn't find these errors before, but now that they are
known, and will probably need an 8.4.1 to fix, should I remove the
pg_migrator 8.4 source code from pgfoundry?

---------------------------------------------------------------------------

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Tom Lane wrote:
> >> The most effective solution might be to revert the change in pg_migrator
> >> and instead have pg_dump interpret --binary-upgrade --schema-only to
> >> include the data for sequences. It seems ugly as sin though :-(
>
> > It seems cleaner to have a pg_dump --dump-all-sequences or some such.
>
> Well, that's assuming that we think there's any point in having a
> "clean" definition.
>
> I have been poking at the pg_largeobject problem previously mentioned,
> and have found out that there are actually two bugs:
> * pg_largeobject_loid_pn_index is not transferred
> * large object comments are not transferred
>
> The first of these is clearly pg_migrator's responsibility to fix,
> but I think we have to get pg_dump to handle the second one. Again,
> the problem here is that the dividing line between "schema" and "data"
> isn't drawn in a place that suits pg_migrator's needs --- pg_dump
> thinks that both LOs and their comments are "data".
>
> Do you really want to propose that we invent, and document, two new
> switches to expose these behaviors? I think just hacking the behavior
> on the basis of --binary-upgrade is the thing to do. In fact, I'm
> thinking that we should remove the --schema-only switch from
> pg_migrator's call of pg_dump, and just have --binary-upgrade
> automatically know which things it is supposed to dump or not.
>
> [ pokes at it some more... ] Oooh, there's another issue:
> the backend rejects COMMENT ON LARGE OBJECT if the specified OID
> doesn't exist in pg_largeobject. This is gonna be a problem.
> pg_migrator wants to import the pg_dump output before it's moved
> any tables.
>
> I wonder if it's sane to do the physical move of pg_largeobject
> before we import the dump?
>
> regards, tom lane

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2009-07-16 04:13:14 Re: [GENERAL] pg_migrator not setting values of sequences?
Previous Message Bruce Momjian 2009-07-16 04:09:22 Re: [GENERAL] pg_migrator not setting values of sequences?

Browse pgsql-hackers by date

  From Date Subject
Next Message KaiGai Kohei 2009-07-16 04:12:49 Re: [PATCH] SE-PgSQL/tiny rev.2193
Previous Message Bruce Momjian 2009-07-16 04:09:22 Re: [GENERAL] pg_migrator not setting values of sequences?