471,073 Members | 1,299 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

Problem with sequences on a reload of a pg_dump file

To all,

We dumped our instance from a 7.4.2 instance compiled with a block size
of 32k running on OSX 10.3.3 server.. We loaded this dump on Fedora
2.6.5-1.358smp running postgresql 7.4.2 compiled with the standard 8k
blocks size.

My problem is that all the sequences were reset to start a 1. :-( Did
I do something wrong as this has never happened before? Also, can I
simply figure out what the next value should be and manually update the
last_value column in each affected sequence?

Thanks.

--sean

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #1
3 1632
Sean Shanny <sh**************@earthlink.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

Nov 23 '05 #2
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 <sh**************@earthlink.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


Nov 23 '05 #3
non non c plus possible
va falloir penser à arreter tout de même !!!!
Sean Shanny wrote:
To all,

We dumped our instance from a 7.4.2 instance compiled with a block
size of 32k running on OSX 10.3.3 server.. We loaded this dump on
Fedora 2.6.5-1.358smp running postgresql 7.4.2 compiled with the
standard 8k blocks size.

My problem is that all the sequences were reset to start a 1. :-(
Did I do something wrong as this has never happened before? Also,
can I simply figure out what the next value should be and manually
update the last_value column in each affected sequence?

Thanks.

--sean

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Rory Campbell-Lange | last post: by
2 posts views Thread by D. Dante Lorenso | last post: by
20 posts views Thread by Development - multi.art.studio | last post: by
4 posts views Thread by Philip | last post: by
1 post views Thread by Ben-Nes Michael | last post: by
1 post views Thread by Plant Thomas | last post: by
6 posts views Thread by Ilia Chipitsine | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.