Exponential processing time for multiple SELECT FOR UPDATE / UPDATE in a single transaction with PostgreSQL 9.x ? - Mailing list pgsql-odbc

From Nathanael Terrien
Subject Exponential processing time for multiple SELECT FOR UPDATE / UPDATE in a single transaction with PostgreSQL 9.x ?
Date
Msg-id 52dd07051f6b42b09328c339c7b9c5d4@EXCH2013.mustinformatique.fr
Whole thread Raw
Responses Re: Exponential processing time for multiple SELECT FOR UPDATE / UPDATE in a single transaction with PostgreSQL 9.x ?
Re: Exponential processing time for multiple SELECT FOR UPDATE / UPDATE in a single transaction with PostgreSQL 9.x ?
List pgsql-odbc
Hi List.

Our application does something like this, through psqlodbc :
------------------------------------------------------------------------------
Open transaction (« BEGIN »)
FOR x TO y STEP 1
   Do Stuff
   « SELECT col1 FROM table1 WHERE condition1 FOR UPDATE ; »
  Do Stuff
  « UPDATE table1 SET col1=z WHERE condition1 ; »
  Do Stuff
NEXT x
End transaction (« COMMIT »)
------------------------------------------------------------------------------

Against PostgreSQL 8.4 : no problem.
Against PostgreSQL 9.x : starting at about a few hundred loops (locks), the process slows down, and continues to slow
downexponentially, until the COMMIT happens. 

We tried with different languages (C#, Omnis Studio, plain plpgsql ...), different versions of psqlodbc (8.4.2 to
9.3.x),different versions of PostgreSQL (8.4, 9.3, 9.4 RC1) , without psqlODBC ... and it all comes down to this :  
The slow-down only happens with psqlodbc and PostgreSQL 9.x

So we guess it's abug ?

Regards,
Nathanael TERRIEN
Must  Informatique



pgsql-odbc by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Pgodbc is thread safe?
Next
From: Heikki Linnakangas
Date:
Subject: Re: Exponential processing time for multiple SELECT FOR UPDATE / UPDATE in a single transaction with PostgreSQL 9.x ?