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 200907181558.n6IFwRC10882@momjian.us
Whole thread Raw
In response to Re: [GENERAL] pg_migrator not setting values of sequences?  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: [GENERAL] pg_migrator not setting values of sequences?
List pgsql-hackers
Alvaro Herrera wrote:
> Bruce Momjian wrote:
> 
> > Something is certainly wrong.  Did we change sequence table format from
> > 8.3 to 8.4?
> 
> 8.3 does not have start_value.

Looking at an invalidly-migrated sequence's columns:
regression=> \d serialtest_f2_foo      Sequence "public.serialtest_f2_foo"    Column     |  Type   |
Value---------------+---------+---------------------sequence_name | name    | serialtest_f2_foo last_value    | bigint
|3 start_value   | bigint  | 1 increment_by  | bigint  | 9223372036854775807 max_value     | bigint  | 1 min_value
|bigint  | 1 cache_value   | bigint  | 0 log_cnt       | bigint  | 25387551686912 is_cycled     | boolean | f is_called
   | boolean |
 

Should pg_migrator just pull the misaligned values and do an ALTER
SEQUENCE/seval() to fix it, or create a script to do that?

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: GEQO vs join order restrictions
Next
From: David Fetter
Date:
Subject: SE-PostgreSQL?