Re: [GENERAL] pg_migrator not setting values of sequences? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [GENERAL] pg_migrator not setting values of sequences?
Date
Msg-id 200907140237.n6E2b2x27210@momjian.us
Whole thread Raw
In response to Re: [GENERAL] pg_migrator not setting values of sequences?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [GENERAL] pg_migrator not setting values of sequences?
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Tilmann Singer wrote:
> >> However, all of the sequences were at the initial values and not
> >> bumped up to the last used value as I would have expected. The first
> >> nextval call on any sequence in the migrated 8.4 database always
> >> returned 1.
>
> > Wow, that is also surprising.  I am going to have to run some tests to
> > find the cause, but it certainly is not intended.
>
> Looks like pg_migrator neglects to include relkind 'S' in the set of
> tables that it needs to physically migrate.

Thanks, I have fixed pg_migrator with the attached patch.  Once we find
the cause of the lovacuum problem, I will make a new pg_migrator release.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: info.c
===================================================================
RCS file: /cvsroot/pg-migrator/pg_migrator/src/info.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -c -c -r1.17 -r1.18
*** info.c    30 Jun 2009 22:01:12 -0000    1.17
--- info.c    14 Jul 2009 02:34:59 -0000    1.18
***************
*** 343,349 ****
                              STRINGIFY(FirstNormalObjectId) " "
                              "    AND "
                              "    (relkind = 'r' OR relkind = 't' OR "
!                             "     relkind = 'i') "
                              "GROUP BY  c.oid, n.nspname, c.relname, c.relfilenode,"
                              "            c.reltoastrelid, t.spclocation, "
                              "            n.nspname "
--- 343,349 ----
                              STRINGIFY(FirstNormalObjectId) " "
                              "    AND "
                              "    (relkind = 'r' OR relkind = 't' OR "
!                             "     relkind = 'i' OR relkind = 'S') "
                              "GROUP BY  c.oid, n.nspname, c.relname, c.relfilenode,"
                              "            c.reltoastrelid, t.spclocation, "
                              "            n.nspname "

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] large object does not exist after pg_migrator
Next
From: Tom Lane
Date:
Subject: Re: Upgrading our minimum required flex version for 8.5