From: | Robert Perry <rlperry(at)lodestonetechnologies(dot)com> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Duplicate Key -- Have I missed something |
Date: | 2005-08-07 03:18:38 |
Message-ID: | 92CA7CD7-C3CB-4E01-B3BD-D1E21B1A605F@lodestonetechnologies.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Michael
Thanks for taking the blinders off me! This table is new to the
database and it seems that the script that I ran to populate it with
its' initial data was VERY wrong. I know it seems very odd that I
would forget a script I ran less than a week ago regarding a brand
new table, but it is just one of those panic things I guess.
Making a longs story short. Yes, the problem is existing data
and not that new data.
Thanks
Robert Perry
On Aug 6, 2005, at 10:47 PM, Michael Fuhr wrote:
> On Sat, Aug 06, 2005 at 10:00:10PM -0400, Robert Perry wrote:
>
>> I have a production environment that is running the code that
>> caused this problem about once every 30 seconds or so, with two
>> clients. It normally runs very well, but I was suddenly hit with a
>> duplicate key violation for a table where the primary key is
>> generated in part from sequence.
>>
>> How might this have happen?
>>
>
> Have any values been inserted that weren't obtained from the sequence?
> What are the results of the following queries?
>
> SELECT max(tid) FROM game_pay_cash_coupon_trans;
> SELECT * FROM game_pay_cash_coupon_trans_seq;
>
> (You already showed the second query, but let's see it again run at
> the same time as the first).
>
> --
> Michael Fuhr
>
From | Date | Subject | |
---|---|---|---|
Next Message | Mario Soto Cordones - Venezuela | 2005-08-07 12:36:18 | postgresql Secure Mode |
Previous Message | Michael Fuhr | 2005-08-07 02:47:02 | Re: Duplicate Key -- Have I missed something |