Re: Corrupted sequences

From: Francisco Reyes <lists(at)natserv(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Corrupted sequences
Date: 2003-03-14 20:21:21
Message-ID: 20030314151833.L31492-100000@zoraida.natserv.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 14 Mar 2003, Tom Lane wrote:

> Francisco Reyes <lists(at)natserv(dot)com> writes:
> > Got 2 corrupted sequences, that I have discovered so far, and fixed them
> > with 'setval'. Is there a way to check all sequences in a database?
>
> ?? Define "corrupted" ...

One returned a number, 12, much lower than the next value it should have
used 3,706.

Another set of sequences are returning
sequence_name.currval is not yet defined in this session.

If I use setcurrval(sequence,nextvalue) it fixes the problem.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Reyes 2003-03-14 20:30:24 Re: Corrupted sequences
Previous Message scott.marlowe 2003-03-14 20:18:19 Re: Corrupted sequences