Re: Performance question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance question
Date: 2003-07-02 07:01:24
Message-ID: 25365.1057129284@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp> writes:
> 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.

Well, if that's how your application logic works then you're done.
I was envisioning a case where you'd prefer to generate a new key
value and try the insert again.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Harry Yau 2003-07-02 07:06:01 Which Schema I am working on??
Previous Message Tom Lane 2003-07-02 06:57:32 Re: Still trouble reindexing