Serialization errors on single threaded request stream - Mailing list pgsql-bugs

From Kevin Grittner
Subject Serialization errors on single threaded request stream
Date
Msg-id s30ef291.043@gwmta.wicourts.gov
Whole thread Raw
Responses Re: Serialization errors on single threaded request stream
List pgsql-bugs
I have an odd one here.  I was unable to find it with a search of the maili=
ng lists.  I've spent a few hours trying to create a simple test case, but =
so far these simple cases aren't showing the problem.  I want to make sure =
this isn't a know problem before investing more time trying to come up with=
 a test case suffiently complex to expose the problem.
=20
The problem is this:  a single thread is submitting database updates throug=
h a middle tier which has a pool of connections.  There are no guarantees o=
f which connection will be used for any request.  Each request is commited =
as its own database transaction before the middle tier responds to the requ=
ester, which then immediately submits the next request.  Nothing else it hi=
tting the database.  We are getting serialization errors.
=20
If we add a 1 ms delay on the client side between requests to the middle ti=
er, the frequency of these errors drops by about two orders of magnitude.  =
With a 100 ms delay, we haven't seen any.
=20
The pattern of activity which causes the problem involves a single database=
 transaction with inserts and updates to many tables, including one with a =
potentially large blob, followed by an update to a numeric column in a row =
which tracks progress.  The serialization errors are happening on this fina=
l update.  My simple test cases use a single thread on two JDBC connection =
emulating just this final update, and the problem does not show up.
=20
We have the same behavior on 8.0.3 and the develpment snapshot from yesterd=
ay.  (I haven't gotten a test run from today's beta release yet -- I need t=
o coordinate the test with someone else who's not here right now.  I'll fol=
low up if the beta release changes this behavior.)
=20
The server is SuSE 9.3 with dual xeons and xfs on a SAN.  The client and mi=
ddle tier for these tests have been on Windows XP.  The requests are going =
through JDBC.
=20
Does this behavior sound familiar to anyone?
=20
-Kevin
=20

pgsql-bugs by date:

Previous
From: "Bernard Henry Voynet"
Date:
Subject: BUG #1849: Is PgOleDb still alive ?
Next
From: Tom Lane
Date:
Subject: Re: Serialization errors on single threaded request stream