| From: | Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Performance question | 
| Date: | 2003-07-02 06:56:52 | 
| Message-ID: | 3F028234.7070309@mega-bucks.co.jp | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Tom Lane wrote:
> 
> Fair enough, it would do that.  But you still need the surrounding retry
> logic to cope when a collision does happen.
Why retry logic? I thought that if there was a collision one of the
insert attempts would necessarily succeed and all the others fails. So
no need for a retry since the record (pk) was inserted.
What I am trying to duplicate is if an inserts into a primary key field
is a duplicate it fails silently. If it isn't or there are multiple
attempts at the same time to insert the *same* new primary key, the new
pk is inserted.
The suggested method does guarantee an insert if it there is a collision
right? If not I need to find a new solution :(
Jean-Christian Imbeault
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-07-02 06:57:32 | Re: Still trouble reindexing | 
| Previous Message | S.Peppe | 2003-07-02 06:56:22 | Re: ERROR: Relation "pg_user" does not exist |