Re: Hard problem with concurrency - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Hard problem with concurrency
Date
Msg-id 01af01c2d631$580a5950$6500a8c0@fhp.internal
Whole thread Raw
In response to Hard problem with concurrency  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: Hard problem with concurrency
Re: Hard problem with concurrency
List pgsql-hackers
> Do the update, then try to insert if the update found nothing, and put
> a retry loop around the whole transaction in case you fail because of
> concurrent inserts.
>
> Realistically you will need a retry loop in all but the most trivial
> cases anyway --- certainly so if you want to use serializable
> transaction mode.  So I don't think this solution is unworkably complex.

I guess that will work, but it will not prevent our log from being spammed
up with error messages.  Also, this is a somewhat simplified case.  Some
transactions, such as our login transaction have rather large numbers of
operations in them and we don't want to have to rollback the whole thing.
I guess we'll have to live with it.

REPLACE INTO anyone? ;)

Chris




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Hard problem with concurrency
Next
From: Kevin Brown
Date:
Subject: Re: location of the configuration files