Very Urgent : Sequences Problem - Mailing list pgsql-admin

From Kranti™ K K Parisa
Subject Very Urgent : Sequences Problem
Date
Msg-id 4478b4ac0811190754n42d9539v4bd42350fac24d1@mail.gmail.com
Whole thread Raw
Responses Re: [PERFORM] Very Urgent : Sequences Problem  (Tino Wildenhain <tino@wildenhain.de>)
Re: [PERFORM] Very Urgent : Sequences Problem  (Josh Berkus <josh@agliodbs.com>)
Re: [PERFORM] Very Urgent : Sequences Problem  ("Merlin Moncure" <mmoncure@gmail.com>)
List pgsql-admin
Hi,

I have defined sequence on a table something like this


CREATE SEQUENCE items_unqid_seq
  INCREMENT 1
  MINVALUE 0
  MAXVALUE 9223372036854775807
  START 7659
  CACHE 1;

this is on a table called items. where i have currently the max(unq_id) as 7659.

and in the stored procedure when i am inserting values into the items table for the unq_id column i am using the sequence as follows:

nextval('items_unqid_seq'::text)


it seems to be working some times. and the sequences are not getting updated sometime. which is casuing primary key exceptions.

please advise as soon as possible.

is there any trivial problem with sequences in postgresql??

thanks in advance.

--
Kranti
           

pgsql-admin by date:

Previous
From: Abdul Rahman
Date:
Subject: Scheduling backup via PgAgent
Next
From: ethan@757.org
Date:
Subject: Question, WAL file sequence on standby database? Always starts at 00?