Large amount of serialization errors in transactions

From: Vegard Bønes <vegard(dot)bones(at)met(dot)no>
To: pgsql-general(at)postgresql(dot)org
Subject: Large amount of serialization errors in transactions
Date: 2013-05-10 07:33:14
Message-ID: 933406002.21776.1368171194398.JavaMail.root@imap1b
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

I have a problem understanding how transactions with serializable isolation level works in postgresql. What exactly may cause a serialization error?

My problem is a system where process one adds data to a database. Shortly afterwards, process two reads and possibly modifies the same data (keys are not touched). When large amounts of data arrives at about the same time, I get loads of serialization errors in process two. In a perfect world this should not happen, since data that is entered by process one is almost always different from the data that at the same time is being read and written by process two.

I have tried increasing max_pred_locks_per_transaction, but it seems to have no effect.

I do retry the transactions, and eventually they succeed, but my concern here is the amount of errors I get at certain periods. Am I expecting too much of serializable isolation level transactions, or is there anyting else that I am missing?

- Vegard

--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eduardo Morras 2013-05-10 07:59:17 Re: Storing small image files
Previous Message sumita 2013-05-10 07:13:11 Re: FATAL: database "a/system_data" does not exist