Re: Corrupted sequences

From: Francisco Reyes <lists(at)natserv(dot)com>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: pgsql General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Corrupted sequences
Date: 2003-03-14 21:02:36
Message-ID: 20030314155635.M31492-100000@zoraida.natserv.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 14 Mar 2003, scott.marlowe wrote:

> The first could be a problem. Are you sure the sequence was being used to
> update the table you were inserting it into?

Yes. This site has been working for some time. I got a note from the ISP
that they were moving databases. I think it has to do with that. Opened a
ticket with them asking if that domain's DB was moved.

> bulk load, so the sequence was set right? or has it been updated properly
> by "insert into table (field1,field2,id) values ('a','b',DEFAULT)"

I am leaning towards the thought that they moved the database and did it
wrong somehow. Did a 'select currval()' for every sequence and all, except
the ones I have fixed, gave the error 'is not yet defined in this
session'.

All these sequences are from primary keys. I am thinking maybe the easiest
way to fix it may be to drop and re-create the constraint. It's only 25
tables and have only fixed 4 manually so I am just looking for a way to
automate the rest.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-03-14 21:08:54 Re: The folding of unquoted names to lower case in PostgreSQL
Previous Message Tom Lane 2003-03-14 20:57:02 Re: The folding of unquoted names to lower case in PostgreSQL