pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #5809: bigserial duplicate value
7+ messages / 6 participants
[nested] [flat]

* BUG #5809: bigserial duplicate value
@ 2011-01-02 11:40  mahmoud elzaiady <melzaiady@yahoo.co.uk>
  0 siblings, 1 reply; 7+ messages in thread

From: mahmoud elzaiady @ 2011-01-02 11:40 UTC (permalink / raw)
  To: pgsql-bugs


The following bug has been logged online:

Bug reference:      5809
Logged by:          mahmoud elzaiady
Email address:      melzaiady@yahoo.co.uk
PostgreSQL version: 8.4
Operating system:   windows xp
Description:        bigserial duplicate value
Details: 

I have problem today 
i have table and colum type bigserial
and insert data automatic number
but i found the value duplicate 
i ask ,bigserial must not duplicate the value ?
how solve this problem



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5809: bigserial duplicate value
@ 2011-01-03 19:04  Jeff Davis <pgsql@j-davis.com>
  parent: mahmoud elzaiady <melzaiady@yahoo.co.uk>
  0 siblings, 1 reply; 7+ messages in thread

From: Jeff Davis @ 2011-01-03 19:04 UTC (permalink / raw)
  To: mahmoud elzaiady <melzaiady@yahoo.co.uk>; +Cc: pgsql-bugs

On Sun, 2011-01-02 at 11:40 +0000, mahmoud elzaiady wrote:
> The following bug has been logged online:
> 
> Bug reference:      5809
> Logged by:          mahmoud elzaiady
> Email address:      melzaiady@yahoo.co.uk
> PostgreSQL version: 8.4
> Operating system:   windows xp
> Description:        bigserial duplicate value
> Details: 
> 
> I have problem today 
> i have table and colum type bigserial
> and insert data automatic number
> but i found the value duplicate 
> i ask ,bigserial must not duplicate the value ?
> how solve this problem

This is probably due to the sequence being reset somehow. Have you
dumped/reloaded recently? Did you manually back up or copy the table?

What is the exact error message that you see? If it tells you the
duplicated value, is it very old, perhaps 1 (indicating a reset of the
sequence)?

Note that, by "reset", I do not mean "overflow". I mean that the
sequence might have been recreated somehow.

Try to provide more detail in your bug report. See:
http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

Regards,
	Jeff Davis




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5809: bigserial duplicate value
@ 2011-01-04 16:34  Joshua Tolley <eggyknap@gmail.com>
  parent: Jeff Davis <pgsql@j-davis.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Joshua Tolley @ 2011-01-04 16:34 UTC (permalink / raw)
  To: Jeff Davis <pgsql@j-davis.com>; +Cc: mahmoud elzaiady <melzaiady@yahoo.co.uk>; pgsql-bugs

On Mon, Jan 03, 2011 at 11:04:17AM -0800, Jeff Davis wrote:
> On Sun, 2011-01-02 at 11:40 +0000, mahmoud elzaiady wrote:
> > i ask ,bigserial must not duplicate the value ?
> > how solve this problem
> 
> This is probably due to the sequence being reset somehow. Have you
> dumped/reloaded recently? Did you manually back up or copy the table?

Alternatively, perhaps at some point you've added data to that column, rather
than relying on PostgreSQL to supply a default value.

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com

Attachments:

  signature.asc (application/pgp-signature, 196B) download

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5809: bigserial duplicate value
@ 2011-01-05 05:38  Melzaiady <melzaiady@yahoo.co.uk>
  parent: Joshua Tolley <eggyknap@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Melzaiady @ 2011-01-05 05:38 UTC (permalink / raw)
  To: Joshua Tolley <eggyknap@gmail.com>; Jeff Davis <pgsql@j-davis.com>; +Cc: pgsql-bugs

 i relying on PostgreSQL to supply a default value,
i  have application at  hospital and application appear error about duplicate 
value. 

There was a primary key on this columns but i found error form my application 
about duplicate value and can`t insert value then i remove the primary key 
constraint to try  to find problem and try again i found bigserial  put 
duplicate value on fields .
 

________________________________

Mahmoud El Zaiady
Bachelor of Information Systems
Faculty of Computers & Information Sciences
Mansoura University
 
 





________________________________
From: Joshua Tolley <eggyknap@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: mahmoud elzaiady <melzaiady@yahoo.co.uk>; pgsql-bugs@postgresql.org
Sent: Tue, January 4, 2011 6:34:57 PM
Subject: Re: [BUGS] BUG #5809: bigserial duplicate value

On Mon, Jan 03, 2011 at 11:04:17AM -0800, Jeff Davis wrote:
> On Sun, 2011-01-02 at 11:40 +0000, mahmoud elzaiady wrote:
> > i ask ,bigserial must not duplicate the value ?
> > how solve this problem
> 
> This is probably due to the sequence being reset somehow. Have you
> dumped/reloaded recently? Did you manually back up or copy the table?

Alternatively, perhaps at some point you've added data to that column, rather
than relying on PostgreSQL to supply a default value.

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com



      

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5809: bigserial duplicate value
@ 2011-01-06 22:48  Robert Haas <robertmhaas@gmail.com>
  parent: Melzaiady <melzaiady@yahoo.co.uk>
  0 siblings, 1 reply; 7+ messages in thread

From: Robert Haas @ 2011-01-06 22:48 UTC (permalink / raw)
  To: Melzaiady <melzaiady@yahoo.co.uk>; +Cc: Joshua Tolley <eggyknap@gmail.com>; Jeff Davis <pgsql@j-davis.com>; pgsql-bugs

On Wed, Jan 5, 2011 at 12:38 AM, Melzaiady <melzaiady@yahoo.co.uk> wrote:
>  i relying on PostgreSQL to supply a default value,
> i  have application at  hospital and application appear error about
> duplicate value.
> There was a primary key on this columns but i found error form my
> application about duplicate value and can`t insert value then i remove the
> primary key constraint to try  to find problem and try again i found
> bigserial  put duplicate value on fields .

I'm pretty sure there isn't a bug that's making the sequence return
duplicate values, because if there were, a lot more people would have
complained about it by now.  I think there's probably a bug in your
application logic, but you haven't provided enough detail to figure
out what it is.  I'd suggest examining your log files for clues, and
perhaps posting relevant sections of them here.

It's not surprising that if you're getting duplicate key errors and
you drop the index, you would then get actual duplicate keys...

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5809: bigserial duplicate value
@ 2011-01-08 11:10  melzaiady <melzaiady@yahoo.co.uk>
  parent: Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: melzaiady @ 2011-01-08 11:10 UTC (permalink / raw)
  To: pgsql-bugs


http://postgresql.1045698.n5.nabble.com/file/n3332998/data1.jpg 

this picture of screen you can new sequence of value. 

now how can i slove this problem and this field dont start new squences in
any time ?
-- 
View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-5809-bigserial-duplicate-value-tp3325115p3332998.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5809: bigserial duplicate value
@ 2011-01-12 16:00  Robert Haas <robertmhaas@gmail.com>
  parent: melzaiady <melzaiady@yahoo.co.uk>
  0 siblings, 0 replies; 7+ messages in thread

From: Robert Haas @ 2011-01-12 16:00 UTC (permalink / raw)
  To: melzaiady <melzaiady@yahoo.co.uk>; +Cc: pgsql-bugs

On Sat, Jan 8, 2011 at 6:10 AM, melzaiady <melzaiady@yahoo.co.uk> wrote:
>
> http://postgresql.1045698.n5.nabble.com/file/n3332998/data1.jpg
>
> this picture of screen you can new sequence of value.
>
> now how can i slove this problem and this field dont start new squences in
> any time ?

It's pretty hard to tell what's actually going on here, but your
original complaint is that you're getting duplicate values, and there
are no duplicate values shown in this picture.  It's not even clear
that the sequence is resetting itself -- it might just be that the
values are sorted as strings rather than integers.  But if it is
getting reset, it's not happening magically behind the scenes - some
human being or program is resetting it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2011-01-12 16:00 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-01-02 11:40 BUG #5809: bigserial duplicate value mahmoud elzaiady <melzaiady@yahoo.co.uk>
2011-01-03 19:04 ` Jeff Davis <pgsql@j-davis.com>
2011-01-04 16:34   ` Joshua Tolley <eggyknap@gmail.com>
2011-01-05 05:38     ` Melzaiady <melzaiady@yahoo.co.uk>
2011-01-06 22:48       ` Robert Haas <robertmhaas@gmail.com>
2011-01-08 11:10         ` melzaiady <melzaiady@yahoo.co.uk>
2011-01-12 16:00           ` Robert Haas <robertmhaas@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox