Re: Testing of MVCC - Mailing list pgsql-hackers

From Matt Miller
Subject Re: Testing of MVCC
Date
Msg-id 1124142074.3361.34.camel@dbamm01-linux
Whole thread Raw
In response to Re: [GENERAL] Testing of MVCC  (Matt Miller <mattm@epx.com>)
Responses Re: Testing of MVCC
List pgsql-hackers
On Mon, 2005-08-08 at 16:59 -0400, Tom Lane wrote:
> Matt Miller <mattm@epx.com> writes:
> > I want to write some regression tests that confirm the behavior of
> > multiple connections simultaneously going at the same tables/rows.  Is
> > there something like this already, e.g. in src/test/regress?
>
> No. ... but surely we need one.

The attached patch allows src/test/regress/pg_regress.sh to recognize
lines that begin with "curr_test:" in the schedule file.  Tests named on
such a line are run concurrently across multiple connections.  To make
use of this facility each test in the group must begin with the line:

select * from concurrency_test where key = '<test_name>' for update;

where <test_name> is replace by the name of that test.  This will enable
pg_regress to start this test at the same time as the other tests in the
group.

Is this a reasonable starting point for a concurrent testing framework?

This does not address the issue of how to interpret the test output.
Maybe the simplest solution is to force test writers to generate output
that does not depend on the relative progress of any concurrent tests.
Or, maybe the "ignore:" directive in the schedule file could be employed
somehow.

Attachment

pgsql-hackers by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: pl/Ruby, deprecating plPython and Core
Next
From: Tom Lane
Date:
Subject: Re: Testing of MVCC