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

Re: Problem with sequences on a reload of a pg_dump file

From: Sean Shanny <shannyconsulting(at)earthlink(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with sequences on a reload of a pg_dump file
Date: 2004-05-26 22:12:15
Message-ID: 40B5163F.7030406@earthlink.net (view raw or flat)
Thread:
Lists: pgsql-general
Tom,

It  looks like I probably caused this.  :-(  I was not paying attention 
and rebooted the machine while it was doing the index building. :-(  
This is about an 1/2 TB warehouse instance so I am going to  look at the 
last several thousand lines of the dump file to see if I can replay what 
I need to correct the situation.  Not a good day.

--sean

Tom Lane wrote:

>Sean Shanny <shannyconsulting(at)earthlink(dot)net> writes:
>  
>
>>My problem is that all the sequences were reset to start a 1. :-(   Did  
>>I do something wrong as this has never happened before?
>>    
>>
>
>Did the reload actually complete, or did it fail partway through?
>
>  
>
>>Also, can I 
>>simply figure out what the  next value should be and manually update the 
>>last_value column in each affected sequence?
>>    
>>
>
>No, but you could use setval().
>
>			regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: the planner will ignore your desire to choose an index scan if your
>      joining column's datatypes do not match
>
>  
>

In response to

pgsql-general by date

Next:From: Dennis GearonDate: 2004-05-26 22:25:22
Subject: One more time on ONE-TO-MANY
Previous:From: Alvaro HerreraDate: 2004-05-26 22:10:45
Subject: Re: temas del comando COPY

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