Re: Performance question - Mailing list pgsql-general

From Tom Lane
Subject Re: Performance question
Date
Msg-id 25365.1057129284@sss.pgh.pa.us
Whole thread Raw
In response to Re: Performance question  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List pgsql-general
Jean-Christian Imbeault <jc@mega-bucks.co.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Still trouble reindexing
Next
From: Harry Yau
Date:
Subject: Which Schema I am working on??