Re: Testing with concurrent sessions

Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>

From: Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
To: Craig Ringer <craig@postnewspapers.com.au>
Cc: Robert Haas <robertmhaas@gmail.com>, Kevin Grittner <Kevin.Grittner@wicourts.gov>, Peter Eisentraut <peter_e@gmx.net>, "David E. Wheeler" <david@kineticode.com>, pgsql-hackers@postgresql.org
Date: 2010-01-07T16:27:15Z
Lists: pgsql-hackers
On 2010-01-07 18:13 +0200, Marko Tiikkaja wrote:
> I had a similar syntax in mind, but instead of using threads, just
> execute the file in order using asynchronous connections.

I completely failed to make the point here which was to somehow mark 
which statements will (or, should) block.  So here we go:

A=> BEGIN;
B=> BEGIN;
A=> UPDATE foo ..;
&B=> UPDATE foo ..; -- this will block
A=> COMMIT;
B=> SELECT * FROM foo;
B=> COMMIT;

[expected output here]


Regards,
Marko Tiikkaja