8000 Explain max_prepared_transactions requirement in isolation tests' REA… · omgwtfun/postgres@6a42b29 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 6a42b29

Browse files
committed
Explain max_prepared_transactions requirement in isolation tests' README.
Now that we have a test that requires nondefault settings to pass, it seems like we'd better mention that detail in the directions about how to run the tests. Also do some very minor copy-editing.
1 parent b936d92 commit 6a42b29

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

src/test/isolation/README

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,27 @@ Isolation tests
55

66
This directory contains a set of tests for the serializable isolation level.
77
Testing isolation requires running multiple overlapping transactions,
8-
which requires multiple concurrent connections, and can't therefore be
8+
which requires multiple concurrent connections, and therefore can't be
99
tested using the normal pg_regress program.
1010

11+
To run the tests, you need to have a server running at the default port
12+
expected by libpq. (You can set PGPORT and so forth in your environment
13+
to control this.) Then run
14+
gmake installcheck
15+
Note that the prepared-transactions test will not pass unless you have
16+
the server's max_prepared_transactions parameter set to at least 3.
17+
1118
To represent a test with overlapping transactions, we use a test specification
12-
file with a custom syntax, described in the next section.
19+
file with a custom syntax, which is described in the next section.
1320

14-
isolationtester is program that uses libpq to open multiple connections,
21+
isolationtester is a program that uses libpq to open multiple connections,
1522
and executes a test specified by a spec file. A libpq connection string
1623
specifies the server and database to connect to; defaults derived from
1724
environment variables are used otherwise.
1825

1926
pg_isolation_regress is a tool similar to pg_regress, but instead of using
2027
psql to execute a test, it uses isolationtester.
2128

22-
To run the tests, you need to have a server up and running. Run
23-
gmake installcheck
2429

2530
Test specification
2631
==================
@@ -63,3 +68,16 @@ permutation "<step name>" ...
6368
all possible overlapping orderings of the given sessions.
6469

6570
Lines beginning with a # are considered comments.
71+
72+
73+
Support for blocking commands
74+
=============================
75+
76+
Each spec may contain commands that block until further action has been taken
77+
(most likely, some other session runs a step that unblocks it or causes a
78+
deadlock). Such a spec needs to be careful to manually specify valid
79+
permutations, i.e. those that would not expect a blocked session to execute a
80+
command. If the spec fails to follow that rule, the spec is aborted.
81+
82+
Only one command can be waiting at a time. As long as one command is waiting,
83+
other commands are run to completion synchronously.

0 commit comments

Comments
 (0)
0