Skip site navigation (1) Skip section navigation (2)

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

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-15 16:04:29
Message-ID: 4A5DFE0D.5000604@sun.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
Dne 14.07.09 04:37, Bruce Momjian napsal(a):
> Tom Lane wrote:
>   
>> Bruce Momjian <bruce(at)momjian(dot)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.
>
>   
I think you don't need transfer sequence table, because pg_dump should 
create DDL command (CREATE SEQUENCE) which should create new nice 
sequence relation.

       Zdenek

In response to

Responses

pgsql-hackers by date

Next:From: David BlewettDate: 2009-07-15 16:08:32
Subject: Re: Add encoding support to COPY
Previous:From: Tom LaneDate: 2009-07-15 16:04:15
Subject: Re: Add encoding support to COPY

pgsql-general by date

Next:From: Tom LaneDate: 2009-07-15 16:05:38
Subject: Re: initdb --locale=LATIN1 fails on Windows
Previous:From: Stuart BishopDate: 2009-07-15 15:38:39
Subject: Connection pool or load balancer supporting ident authentication

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group