diff options
Diffstat (limited to 'src/test/isolation')
225 files changed, 94736 insertions, 0 deletions
diff --git a/src/test/isolation/.gitignore b/src/test/isolation/.gitignore new file mode 100644 index 0000000..870dac4 --- /dev/null +++ b/src/test/isolation/.gitignore @@ -0,0 +1,12 @@ +# Local binaries +/isolationtester +/pg_isolation_regress + +# Local generated source files +/specparse.c +/specscanner.c + +# Generated subdirectories +/results/ +/output_iso/ +/tmp_check_iso/ diff --git a/src/test/isolation/Makefile b/src/test/isolation/Makefile new file mode 100644 index 0000000..0d452c8 --- /dev/null +++ b/src/test/isolation/Makefile @@ -0,0 +1,73 @@ +# +# Makefile for isolation tests +# + +PGFILEDESC = "pg_isolation_regress/isolationtester - multi-client test driver" +PGAPPICON = win32 + +subdir = src/test/isolation +top_builddir = ../../.. +include $(top_builddir)/src/Makefile.global + +override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) \ + -I$(srcdir)/../regress $(CPPFLAGS) + +OBJS = \ + $(WIN32RES) \ + isolationtester.o \ + specparse.o + +all: isolationtester$(X) pg_isolation_regress$(X) + +install: all installdirs + $(INSTALL_PROGRAM) pg_isolation_regress$(X) '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_isolation_regress$(X)' + $(INSTALL_PROGRAM) isolationtester$(X) '$(DESTDIR)$(pgxsdir)/$(subdir)/isolationtester$(X)' + +installdirs: + $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)' + +uninstall: + rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_isolation_regress$(X)' + rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/isolationtester$(X)' + +submake-regress: + $(MAKE) -C $(top_builddir)/src/test/regress pg_regress.o + +pg_regress.o: | submake-regress + rm -f $@ && $(LN_S) $(top_builddir)/src/test/regress/pg_regress.o . + +pg_isolation_regress$(X): isolation_main.o pg_regress.o $(WIN32RES) + $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ + +isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport + $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ + +distprep: specparse.c specscanner.c + +# specscanner is compiled as part of specparse +specparse.o: specscanner.c + +# specparse.c and specscanner.c are in the distribution tarball, +# so do not clean them here +clean distclean: + rm -f isolationtester$(X) pg_isolation_regress$(X) $(OBJS) isolation_main.o + rm -f pg_regress.o + rm -rf $(pg_regress_clean_files) + +maintainer-clean: distclean + rm -f specparse.c specscanner.c + +installcheck: all + $(pg_isolation_regress_installcheck) --schedule=$(srcdir)/isolation_schedule + +check: all + $(pg_isolation_regress_check) --schedule=$(srcdir)/isolation_schedule + +# Non-default tests. It only makes sense to run these if set up to use +# prepared transactions, via TEMP_CONFIG for the check case, or via the +# postgresql.conf for the installcheck case. +installcheck-prepared-txns: all temp-install + $(pg_isolation_regress_installcheck) --schedule=$(srcdir)/isolation_schedule prepared-transactions prepared-transactions-cic + +check-prepared-txns: all temp-install + $(pg_isolation_regress_check) --schedule=$(srcdir)/isolation_schedule prepared-transactions prepared-transactions-cic diff --git a/src/test/isolation/README b/src/test/isolation/README new file mode 100644 index 0000000..8457a56 --- /dev/null +++ b/src/test/isolation/README @@ -0,0 +1,214 @@ +src/test/isolation/README + +Isolation tests +=============== + +This directory contains a set of tests for concurrent behaviors in +PostgreSQL. These tests require running multiple interacting transactions, +which requires management of multiple concurrent connections, and therefore +can't be tested using the normal pg_regress program. The name "isolation" +comes from the fact that the original motivation was to test the +serializable isolation level; but tests for other sorts of concurrent +behaviors have been added as well. + +You can run the tests against the current build tree by typing + make check +Alternatively, you can run against an existing installation by typing + make installcheck +(This will contact a server at the default port expected by libpq. +You can set PGPORT and so forth in your environment to control this.) + +To run just specific test(s) against an installed server, +you can do something like + ./pg_isolation_regress fk-contention fk-deadlock +(look into the specs/ subdirectory to see the available tests). + +Certain tests require the server's max_prepared_transactions parameter to be +set to at least 3; therefore they are not run by default. To include them in +the test run, use + make check-prepared-txns +or + make installcheck-prepared-txns +after making sure the server configuration is correct (see TEMP_CONFIG +to adjust this in the "check" case). + +To define tests with overlapping transactions, we use test specification +files with a custom syntax, which is described in the next section. To add +a new test, place a spec file in the specs/ subdirectory, add the expected +output in the expected/ subdirectory, and add the test's name to the +isolation_schedule file. + +isolationtester is a program that uses libpq to open multiple connections, +and executes a test specified by a spec file. A libpq connection string +specifies the server and database to connect to; defaults derived from +environment variables are used otherwise. + +pg_isolation_regress is a tool similar to pg_regress, but instead of using +psql to execute a test, it uses isolationtester. It accepts all the same +command-line arguments as pg_regress. + +By default, isolationtester will wait at most 300 seconds (5 minutes) +for any one test step to complete. If you need to adjust this, set +the environment variable PGISOLATIONTIMEOUT to the desired timeout +in seconds. + + +Test specification +================== + +Each isolation test is defined by a specification file, stored in the specs +subdirectory. A test specification defines some SQL "steps", groups them +into "sessions" (where all the steps of one session will be run in the +same backend), and specifies the "permutations" or orderings of the steps +that are to be run. + +A test specification consists of four parts, in this order: + +setup { <SQL> } + + The given SQL block is executed once (per permutation) before running + the test. Create any test tables or other required objects here. This + part is optional. Multiple setup blocks are allowed if needed; each is + run separately, in the given order. (The reason for allowing multiple + setup blocks is that each block is run as a single PQexec submission, + and some statements such as VACUUM cannot be combined with others in such + a block.) + +teardown { <SQL> } + + The teardown SQL block is executed once after the test is finished. Use + this to clean up in preparation for the next permutation, e.g dropping + any test tables created by setup. This part is optional. + +session <name> + + There are normally several "session" parts in a spec file. Each + session is executed in its own connection. A session part consists + of three parts: setup, teardown and one or more "steps". The per-session + setup and teardown parts have the same syntax as the per-test setup and + teardown described above, but they are executed in each session. The setup + part might, for example, contain a "BEGIN" command to begin a transaction. + + Each step has the syntax + + step <name> { <SQL> } + + where <name> is a name identifying this step, and <SQL> is a SQL statement + (or statements, separated by semicolons) that is executed in the step. + Step names must be unique across the whole spec file. + +permutation <step name> ... + + A permutation line specifies a list of steps that are run in that order. + Any number of permutation lines can appear. If no permutation lines are + given, the test program automatically runs all possible interleavings + of the steps from each session (running the steps of any one session in + order). Note that the list of steps in a manually specified + "permutation" line doesn't actually have to be a permutation of the + available steps; it could for instance repeat some steps more than once, + or leave others out. Also, each step name can be annotated with some + parenthesized markers, which are described below. + +Session and step names are SQL identifiers, either plain or double-quoted. +A difference from standard SQL is that no case-folding occurs, so that +FOO and "FOO" are the same name while FOO and Foo are different, +whether you quote them or not. You must use quotes if you want to use +an isolation test keyword (such as "permutation") as a name. + +A # character begins a comment, which extends to the end of the line. +(This does not work inside <SQL> blocks, however. Use the usual SQL +comment conventions there.) + +There is no way to include a "}" character in an <SQL> block. + +For each permutation of the session steps (whether these are manually +specified in the spec file, or automatically generated), the isolation +tester runs the main setup part, then per-session setup parts, then +the selected session steps, then per-session teardown, then the main +teardown script. Each selected step is sent to the connection associated +with its session. The main setup and teardown scripts are run in a +separate "control" session. + + +Support for blocking commands +============================= + +Each step may contain commands that block until further action has been taken +(most likely, some other session runs a step that unblocks it or causes a +deadlock). A test that uses this ability must manually specify valid +permutations, i.e. those that would not expect a blocked session to execute a +command. If a test fails to follow that rule, isolationtester will cancel it +after PGISOLATIONTIMEOUT seconds. If the cancel doesn't work, isolationtester +will exit uncleanly after a total of twice PGISOLATIONTIMEOUT. Testing +invalid permutations should be avoided because they can make the isolation +tests take a very long time to run, and they serve no useful testing purpose. + +Note that isolationtester recognizes that a command has blocked by looking +to see if it is shown as waiting in the pg_locks view; therefore, only +blocks on heavyweight locks will be detected. + + +Dealing with race conditions +============================ + +In some cases, the isolationtester's output for a test script may vary +due to timing issues. One way to deal with that is to create variant +expected-files, which follow the usual PG convention that variants for +foo.spec are named foo_1.out, foo_2.out, etc. However, this method is +discouraged since the extra files are a nuisance for maintenance. +Instead, it's usually possible to stabilize the test output by applying +special markers to some of the step names listed in a permutation line. + +The general form of a permutation entry is + + <step name> [ ( <marker> [ , <marker> ... ] ) ] + +where each marker defines a "blocking condition". The step will not be +reported as completed before all the blocking conditions are satisfied. +The possible markers are: + + * + <other step name> + <other step name> notices <n> + +An asterisk marker, such as mystep(*), forces the isolationtester to +report the step as "waiting" as soon as it's been launched, regardless of +whether it would have been detected as waiting later. This is useful for +stabilizing cases that are sometimes reported as waiting and other times +reported as immediately completing, depending on the relative speeds of +the step and the isolationtester's status-monitoring queries. + +A marker consisting solely of a step name indicates that this step may +not be reported as completing until that other step has completed. +This allows stabilizing cases where two queries might be seen to complete +in either order. Note that this step can be *launched* before the other +step has completed. (If the other step is used more than once in the +current permutation, this step cannot complete while any of those +instances is active.) + +A marker of the form "<other step name> notices <n>" (where <n> is a +positive integer) indicates that this step may not be reported as +completing until the other step's session has returned at least <n> +NOTICE messages, counting from when this step is launched. This is useful +for stabilizing cases where a step can return NOTICE messages before it +actually completes, and those messages must be synchronized with the +completions of other steps. + +Notice that these markers can only delay reporting of the completion +of a step, not the launch of a step. The isolationtester will launch +the next step in a permutation as soon as (A) all prior steps of the +same session are done, and (B) the immediately preceding step in the +permutation is done or deemed blocked. For this purpose, "deemed +blocked" means that it has been seen to be waiting on a database lock, +or that it is complete but the report of its completion is delayed by +one of these markers. + +In some cases it is important not to launch a step until after the +completion of a step in another session that could have been deemed +blocked. An example is that if step s1 in session A is issuing a +cancel for step s2 in session B, we'd better not launch B's next step +till we're sure s1 is done. If s1 is blockable, trouble could ensue. +The best way to prevent that is to create an empty step in session A +and run it, without any markers, just before the next session B step. +The empty step cannot be launched until s1 is done, and in turn the +next session B step cannot be launched until the empty step finishes. diff --git a/src/test/isolation/expected/aborted-keyrevoke.out b/src/test/isolation/expected/aborted-keyrevoke.out new file mode 100644 index 0000000..a035426 --- /dev/null +++ b/src/test/isolation/expected/aborted-keyrevoke.out @@ -0,0 +1,272 @@ +Parsed test spec with 2 sessions + +starting permutation: s1s s1u s1r s1l s1c s2l s2c +step s1s: SAVEPOINT f; +step s1u: UPDATE foo SET key = 2; +step s1r: ROLLBACK TO f; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; +step s2l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; + +starting permutation: s1s s1u s1r s1l s2l s1c s2c +step s1s: SAVEPOINT f; +step s1u: UPDATE foo SET key = 2; +step s1r: ROLLBACK TO f; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; + +starting permutation: s1s s1u s1r s1l s2l s2c s1c +step s1s: SAVEPOINT f; +step s1u: UPDATE foo SET key = 2; +step s1r: ROLLBACK TO f; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; +step s1c: COMMIT; + +starting permutation: s1s s1u s1r s2l s1l s1c s2c +step s1s: SAVEPOINT f; +step s1u: UPDATE foo SET key = 2; +step s1r: ROLLBACK TO f; +step s2l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; + +starting permutation: s1s s1u s1r s2l s1l s2c s1c +step s1s: SAVEPOINT f; +step s1u: UPDATE foo SET key = 2; +step s1r: ROLLBACK TO f; +step s2l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; +step s1c: COMMIT; + +starting permutation: s1s s1u s1r s2l s2c s1l s1c +step s1s: SAVEPOINT f; +step s1u: UPDATE foo SET key = 2; +step s1r: ROLLBACK TO f; +step s2l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; + +starting permutation: s1s s1u s2l s1r s1l s1c s2c +step s1s: SAVEPOINT f; +step s1u: UPDATE foo SET key = 2; +step s2l: SELECT * FROM foo FOR KEY SHARE; <waiting ...> +step s1r: ROLLBACK TO f; +step s2l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; + +starting permutation: s1s s1u s2l s1r s1l s2c s1c +step s1s: SAVEPOINT f; +step s1u: UPDATE foo SET key = 2; +step s2l: SELECT * FROM foo FOR KEY SHARE; <waiting ...> +step s1r: ROLLBACK TO f; +step s2l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; +step s1c: COMMIT; + +starting permutation: s1s s1u s2l s1r s2c s1l s1c +step s1s: SAVEPOINT f; +step s1u: UPDATE foo SET key = 2; +step s2l: SELECT * FROM foo FOR KEY SHARE; <waiting ...> +step s1r: ROLLBACK TO f; +step s2l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; + +starting permutation: s1s s2l s1u s2c s1r s1l s1c +step s1s: SAVEPOINT f; +step s2l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1u: UPDATE foo SET key = 2; <waiting ...> +step s2c: COMMIT; +step s1u: <... completed> +step s1r: ROLLBACK TO f; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; + +starting permutation: s1s s2l s2c s1u s1r s1l s1c +step s1s: SAVEPOINT f; +step s2l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; +step s1u: UPDATE foo SET key = 2; +step s1r: ROLLBACK TO f; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; + +starting permutation: s2l s1s s1u s2c s1r s1l s1c +step s2l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1s: SAVEPOINT f; +step s1u: UPDATE foo SET key = 2; <waiting ...> +step s2c: COMMIT; +step s1u: <... completed> +step s1r: ROLLBACK TO f; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; + +starting permutation: s2l s1s s2c s1u s1r s1l s1c +step s2l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1s: SAVEPOINT f; +step s2c: COMMIT; +step s1u: UPDATE foo SET key = 2; +step s1r: ROLLBACK TO f; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; + +starting permutation: s2l s2c s1s s1u s1r s1l s1c +step s2l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; +step s1s: SAVEPOINT f; +step s1u: UPDATE foo SET key = 2; +step s1r: ROLLBACK TO f; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; diff --git a/src/test/isolation/expected/alter-table-1.out b/src/test/isolation/expected/alter-table-1.out new file mode 100644 index 0000000..5e88174 --- /dev/null +++ b/src/test/isolation/expected/alter-table-1.out @@ -0,0 +1,3326 @@ +Parsed test spec with 2 sessions + +starting permutation: s1 at1 sc1 s2 at2 sc2 rx1 wx rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 sc1 s2 at2 rx1 sc2 wx rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc2: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 sc1 s2 at2 rx1 wx sc2 rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 sc1 s2 at2 rx1 wx rx3 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 sc1 s2 at2 rx1 wx rx3 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 s2 rx1 at2 sc2 wx rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 sc1 s2 rx1 at2 wx sc2 rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 sc1 s2 rx1 at2 wx rx3 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 sc1 s2 rx1 at2 wx rx3 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 s2 rx1 wx at2 sc2 rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 sc1 s2 rx1 wx at2 rx3 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 sc1 s2 rx1 wx at2 rx3 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 s2 rx1 wx rx3 at2 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 sc1 s2 rx1 wx rx3 at2 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 s2 rx1 wx rx3 c2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 s2 at2 sc2 wx rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 s2 at2 wx sc2 rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 s2 at2 wx rx3 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 s2 at2 wx rx3 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 s2 wx at2 sc2 rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 s2 wx at2 rx3 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 s2 wx at2 rx3 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 s2 wx rx3 at2 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 s2 wx rx3 at2 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 s2 wx rx3 c2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 wx s2 at2 sc2 rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 wx s2 at2 rx3 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 wx s2 at2 rx3 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 wx s2 rx3 at2 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 wx s2 rx3 at2 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 wx s2 rx3 c2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 wx rx3 s2 at2 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 wx rx3 s2 at2 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 wx rx3 s2 c2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 at1 sc1 rx1 wx rx3 c2 s2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 s2 at2 sc2 wx rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 s2 at2 wx sc2 rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 s2 at2 wx rx3 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 s2 at2 wx rx3 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 s2 wx at2 sc2 rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 s2 wx at2 rx3 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 s2 wx at2 rx3 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 s2 wx rx3 at2 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 s2 wx rx3 at2 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 s2 wx rx3 c2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 wx s2 at2 sc2 rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 wx s2 at2 rx3 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 wx s2 at2 rx3 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 wx s2 rx3 at2 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 wx s2 rx3 at2 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 wx s2 rx3 c2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 wx rx3 s2 at2 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 wx rx3 s2 at2 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 wx rx3 s2 c2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 sc1 wx rx3 c2 s2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 wx sc1 s2 at2 sc2 rx3 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 at1 rx1 wx sc1 s2 at2 rx3 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 rx1 wx sc1 s2 at2 rx3 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 wx sc1 s2 rx3 at2 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 rx1 wx sc1 s2 rx3 at2 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 wx sc1 s2 rx3 c2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 wx sc1 rx3 s2 at2 sc2 c2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 at1 rx1 wx sc1 rx3 s2 at2 c2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 wx sc1 rx3 s2 c2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 at1 rx1 wx sc1 rx3 c2 s2 at2 sc2 +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 s2 at2 sc2 wx rx3 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 s2 at2 wx sc2 rx3 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 s2 at2 wx rx3 sc2 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 s2 at2 wx rx3 c2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 s2 wx at2 sc2 rx3 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 s2 wx at2 rx3 sc2 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 s2 wx at2 rx3 c2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 s2 wx rx3 at2 sc2 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 s2 wx rx3 at2 c2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 s2 wx rx3 c2 at2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 wx s2 at2 sc2 rx3 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 wx s2 at2 rx3 sc2 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 wx s2 at2 rx3 c2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 wx s2 rx3 at2 sc2 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 wx s2 rx3 at2 c2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 wx s2 rx3 c2 at2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 wx rx3 s2 at2 sc2 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 wx rx3 s2 at2 c2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 wx rx3 s2 c2 at2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 sc1 wx rx3 c2 s2 at2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 wx sc1 s2 at2 sc2 rx3 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: s1 rx1 at1 wx sc1 s2 at2 rx3 sc2 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 rx1 at1 wx sc1 s2 at2 rx3 c2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 wx sc1 s2 rx3 at2 sc2 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 rx1 at1 wx sc1 s2 rx3 at2 c2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 wx sc1 s2 rx3 c2 at2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 wx sc1 rx3 s2 at2 sc2 c2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: s1 rx1 at1 wx sc1 rx3 s2 at2 c2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 wx sc1 rx3 s2 c2 at2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 rx1 at1 wx sc1 rx3 c2 s2 at2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 rx1 wx at1 rx3 c2 sc1 s2 at2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at1: <... completed> +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 rx1 wx rx3 at1 c2 sc1 s2 at2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step c2: COMMIT; +step at1: <... completed> +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: s1 rx1 wx rx3 c2 at1 sc1 s2 at2 sc2 +step s1: BEGIN; +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 s2 at2 sc2 wx rx3 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 s2 at2 wx sc2 rx3 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 s2 at2 wx rx3 sc2 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 s2 at2 wx rx3 c2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 s2 wx at2 sc2 rx3 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 s2 wx at2 rx3 sc2 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 s2 wx at2 rx3 c2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 s2 wx rx3 at2 sc2 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 s2 wx rx3 at2 c2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 s2 wx rx3 c2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 wx s2 at2 sc2 rx3 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 wx s2 at2 rx3 sc2 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 wx s2 at2 rx3 c2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 wx s2 rx3 at2 sc2 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 wx s2 rx3 at2 c2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 wx s2 rx3 c2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 wx rx3 s2 at2 sc2 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 wx rx3 s2 at2 c2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 wx rx3 s2 c2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 sc1 wx rx3 c2 s2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 wx sc1 s2 at2 sc2 rx3 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; + +starting permutation: rx1 s1 at1 wx sc1 s2 at2 rx3 sc2 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: rx1 s1 at1 wx sc1 s2 at2 rx3 c2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 wx sc1 s2 rx3 at2 sc2 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: rx1 s1 at1 wx sc1 s2 rx3 at2 c2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 wx sc1 s2 rx3 c2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step s2: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 wx sc1 rx3 s2 at2 sc2 c2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; +step c2: COMMIT; + +starting permutation: rx1 s1 at1 wx sc1 rx3 s2 at2 c2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step c2: COMMIT; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 wx sc1 rx3 s2 c2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s2: BEGIN; +step c2: COMMIT; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 s1 at1 wx sc1 rx3 c2 s2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step wx: INSERT INTO b VALUES (0); <waiting ...> +step sc1: COMMIT; +step wx: <... completed> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 s1 wx at1 rx3 c2 sc1 s2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step wx: INSERT INTO b VALUES (0); +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at1: <... completed> +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 s1 wx rx3 at1 c2 sc1 s2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step c2: COMMIT; +step at1: <... completed> +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 s1 wx rx3 c2 at1 sc1 s2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step s1: BEGIN; +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 wx s1 at1 rx3 c2 sc1 s2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at1: <... completed> +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 wx s1 rx3 at1 c2 sc1 s2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step s1: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step c2: COMMIT; +step at1: <... completed> +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 wx s1 rx3 c2 at1 sc1 s2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step s1: BEGIN; +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 wx rx3 s1 at1 c2 sc1 s2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step c2: COMMIT; +step at1: <... completed> +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 wx rx3 s1 c2 at1 sc1 s2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step s1: BEGIN; +step c2: COMMIT; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; + +starting permutation: rx1 wx rx3 c2 s1 at1 sc1 s2 at2 sc2 +step rx1: SELECT * FROM b WHERE a_id = 1 LIMIT 1; +a_id +---- + 1 +(1 row) + +step wx: INSERT INTO b VALUES (0); +step rx3: SELECT * FROM b WHERE a_id = 3 LIMIT 3; +a_id +---- + 3 + 3 + 3 +(3 rows) + +step c2: COMMIT; +step s1: BEGIN; +step at1: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step sc1: COMMIT; +step s2: BEGIN; +step at2: ALTER TABLE b VALIDATE CONSTRAINT bfk; +step sc2: COMMIT; diff --git a/src/test/isolation/expected/alter-table-2.out b/src/test/isolation/expected/alter-table-2.out new file mode 100644 index 0000000..819bc33 --- /dev/null +++ b/src/test/isolation/expected/alter-table-2.out @@ -0,0 +1,1030 @@ +Parsed test spec with 2 sessions + +starting permutation: s1a s1b s1c s2a s2b s2c s2d s2e s2f +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s1b s2a s1c s2b s2c s2d s2e s2f +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2a: BEGIN; +step s1c: COMMIT; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s1b s2a s2b s1c s2c s2d s2e s2f +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: COMMIT; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s1b s2a s2b s2c s1c s2d s2e s2f +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1c: COMMIT; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s1b s2a s2b s2c s2d s1c s2e s2f +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s2a s1b s1c s2b s2c s2d s2e s2f +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s2a s1b s2b s1c s2c s2d s2e s2f +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: COMMIT; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s2a s1b s2b s2c s1c s2d s2e s2f +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1c: COMMIT; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s2a s1b s2b s2c s2d s1c s2e s2f +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s2a s2b s1b s1c s2c s2d s2e s2f +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s2a s2b s1b s2c s1c s2d s2e s2f +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1c: COMMIT; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s2a s2b s1b s2c s2d s1c s2e s2f +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s2a s2b s2c s1b s1c s2d s2e s2f +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s2a s2b s2c s1b s2d s1c s2e s2f +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2d: INSERT INTO b VALUES (0); <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s1a s2a s2b s2c s2d s1b s2e s2f s1c +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s1a s2a s2b s2c s2d s2e s1b s2f s1c +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step s2f: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s1a s2a s2b s2c s2d s2e s2f s1b s1c +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; + +starting permutation: s2a s1a s1b s1c s2b s2c s2d s2e s2f +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s1a s1b s2b s1c s2c s2d s2e s2f +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: COMMIT; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s1a s1b s2b s2c s1c s2d s2e s2f +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1c: COMMIT; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s1a s1b s2b s2c s2d s1c s2e s2f +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s1a s2b s1b s1c s2c s2d s2e s2f +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s1a s2b s1b s2c s1c s2d s2e s2f +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1c: COMMIT; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s1a s2b s1b s2c s2d s1c s2e s2f +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s1a s2b s2c s1b s1c s2d s2e s2f +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s1a s2b s2c s1b s2d s1c s2e s2f +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2d: INSERT INTO b VALUES (0); <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s1a s2b s2c s2d s1b s2e s2f s1c +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s1a s2b s2c s2d s2e s1b s2f s1c +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step s2f: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s1a s2b s2c s2d s2e s2f s1b s1c +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; + +starting permutation: s2a s2b s1a s1b s1c s2c s2d s2e s2f +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s2b s1a s1b s2c s1c s2d s2e s2f +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1c: COMMIT; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s2b s1a s1b s2c s2d s1c s2e s2f +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s2b s1a s2c s1b s1c s2d s2e s2f +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s2b s1a s2c s1b s2d s1c s2e s2f +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2d: INSERT INTO b VALUES (0); <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s2b s1a s2c s2d s1b s2e s2f s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s2b s1a s2c s2d s2e s1b s2f s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step s2f: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s2b s1a s2c s2d s2e s2f s1b s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s1a s1b s1c s2d s2e s2f +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s2b s2c s1a s1b s2d s1c s2e s2f +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s2d: INSERT INTO b VALUES (0); <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; + +starting permutation: s2a s2b s2c s1a s2d s1b s2e s2f s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1a: BEGIN; +step s2d: INSERT INTO b VALUES (0); +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s1a s2d s2e s1b s2f s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1a: BEGIN; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step s2f: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s1a s2d s2e s2f s1b s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s1a: BEGIN; +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s2d s1a s1b s2e s2f s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s2d s1a s2e s1b s2f s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s1a: BEGIN; +step s2e: INSERT INTO a VALUES (4); +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step s2f: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s2d s1a s2e s2f s1b s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s1a: BEGIN; +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s2d s2e s1a s1b s2f s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; <waiting ...> +step s2f: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s2d s2e s1a s2f s1b s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s1a: BEGIN; +step s2f: COMMIT; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s2d s2e s2f s1a s1b s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; +a_id +---- + 3 +(1 row) + +step s2d: INSERT INTO b VALUES (0); +step s2e: INSERT INTO a VALUES (4); +step s2f: COMMIT; +step s1a: BEGIN; +step s1b: ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; +step s1c: COMMIT; diff --git a/src/test/isolation/expected/alter-table-3.out b/src/test/isolation/expected/alter-table-3.out new file mode 100644 index 0000000..427364e --- /dev/null +++ b/src/test/isolation/expected/alter-table-3.out @@ -0,0 +1,785 @@ +Parsed test spec with 2 sessions + +starting permutation: s1a s1b s1c s1d s2a s2b s2c s2d +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s1b s1c s2a s1d s2b s2c s2d +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2a: BEGIN; +step s1d: COMMIT; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s1b s1c s2a s2b s1d s2c s2d +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1d: COMMIT; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s1b s1c s2a s2b s2c s1d s2d +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s1b s2a s1c s1d s2b s2c s2d +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2a: BEGIN; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s1b s2a s1c s2b s1d s2c s2d +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2a: BEGIN; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1d: COMMIT; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s1b s2a s1c s2b s2c s1d s2d +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2a: BEGIN; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s1b s2a s2b s1c s1d s2c s2d +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s1b s2a s2b s1c s2c s1d s2d +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s1b s2a s2b s2c s1c s1d s2d +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s2a s1b s1c s1d s2b s2c s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s2a s1b s1c s2b s1d s2c s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1d: COMMIT; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s2a s1b s1c s2b s2c s1d s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s2a s1b s2b s1c s1d s2c s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s2a s1b s2b s1c s2c s1d s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s2a s1b s2b s2c s1c s1d s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s2a s2b s1b s1c s1d s2c s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s2a s2b s1b s1c s2c s1d s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s2a s2b s1b s2c s1c s1d s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s1a s2a s2b s2c s1b s1c s1d s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2d: COMMIT; + +starting permutation: s1a s2a s2b s2c s1b s1c s2d s1d +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2d: COMMIT; +step s1d: COMMIT; + +starting permutation: s1a s2a s2b s2c s1b s2d s1c s1d +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2d: COMMIT; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; + +starting permutation: s1a s2a s2b s2c s2d s1b s1c s1d +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; + +starting permutation: s2a s1a s1b s1c s1d s2b s2c s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s1a s1b s1c s2b s1d s2c s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1d: COMMIT; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s1a s1b s1c s2b s2c s1d s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s1a s1b s2b s1c s1d s2c s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s1a s1b s2b s1c s2c s1d s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s1a s1b s2b s2c s1c s1d s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s1a s2b s1b s1c s1d s2c s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s1a s2b s1b s1c s2c s1d s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s1a s2b s1b s2c s1c s1d s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s1a s2b s2c s1b s1c s1d s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2d: COMMIT; + +starting permutation: s2a s1a s2b s2c s1b s1c s2d s1d +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2d: COMMIT; +step s1d: COMMIT; + +starting permutation: s2a s1a s2b s2c s1b s2d s1c s1d +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2d: COMMIT; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; + +starting permutation: s2a s1a s2b s2c s2d s1b s1c s1d +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; + +starting permutation: s2a s2b s1a s1b s1c s1d s2c s2d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s2b s1a s1b s1c s2c s1d s2d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s2b s1a s1b s2c s1c s1d s2d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2c: INSERT INTO a VALUES (0); <waiting ...> +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2c: <... completed> +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; + +starting permutation: s2a s2b s1a s2c s1b s1c s1d s2d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2d: COMMIT; + +starting permutation: s2a s2b s1a s2c s1b s1c s2d s1d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2d: COMMIT; +step s1d: COMMIT; + +starting permutation: s2a s2b s1a s2c s1b s2d s1c s1d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2d: COMMIT; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; + +starting permutation: s2a s2b s1a s2c s2d s1b s1c s1d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; + +starting permutation: s2a s2b s2c s1a s1b s1c s1d s2d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; +step s2d: COMMIT; + +starting permutation: s2a s2b s2c s1a s1b s1c s2d s1d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s2d: COMMIT; +step s1d: COMMIT; + +starting permutation: s2a s2b s2c s1a s1b s2d s1c s1d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s2d: COMMIT; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; + +starting permutation: s2a s2b s2c s1a s2d s1b s1c s1d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s1a: BEGIN; +step s2d: COMMIT; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; + +starting permutation: s2a s2b s2c s2d s1a s1b s1c s1d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: INSERT INTO a VALUES (0); +ERROR: duplicate key value violates unique constraint "a_pkey" +step s2d: COMMIT; +step s1a: BEGIN; +step s1b: ALTER TABLE a DISABLE TRIGGER t; +step s1c: ALTER TABLE a ENABLE TRIGGER t; +step s1d: COMMIT; diff --git a/src/test/isolation/expected/alter-table-4.out b/src/test/isolation/expected/alter-table-4.out new file mode 100644 index 0000000..fc57910 --- /dev/null +++ b/src/test/isolation/expected/alter-table-4.out @@ -0,0 +1,71 @@ +Parsed test spec with 2 sessions + +starting permutation: s1b s1delc1 s2sel s1c s2sel +step s1b: BEGIN; +step s1delc1: ALTER TABLE c1 NO INHERIT p; +step s2sel: SELECT SUM(a) FROM p; <waiting ...> +step s1c: COMMIT; +step s2sel: <... completed> +sum +--- + 11 +(1 row) + +step s2sel: SELECT SUM(a) FROM p; +sum +--- + 1 +(1 row) + + +starting permutation: s1b s1delc1 s1addc2 s2sel s1c s2sel +step s1b: BEGIN; +step s1delc1: ALTER TABLE c1 NO INHERIT p; +step s1addc2: ALTER TABLE c2 INHERIT p; +step s2sel: SELECT SUM(a) FROM p; <waiting ...> +step s1c: COMMIT; +step s2sel: <... completed> +sum +--- + 11 +(1 row) + +step s2sel: SELECT SUM(a) FROM p; +sum +--- +101 +(1 row) + + +starting permutation: s1b s1dropc1 s2sel s1c s2sel +step s1b: BEGIN; +step s1dropc1: DROP TABLE c1; +step s2sel: SELECT SUM(a) FROM p; <waiting ...> +step s1c: COMMIT; +step s2sel: <... completed> +sum +--- + 1 +(1 row) + +step s2sel: SELECT SUM(a) FROM p; +sum +--- + 1 +(1 row) + + +starting permutation: s1b s1delc1 s1modc1a s2sel s1c s2sel +step s1b: BEGIN; +step s1delc1: ALTER TABLE c1 NO INHERIT p; +step s1modc1a: ALTER TABLE c1 ALTER COLUMN a TYPE float; +step s2sel: SELECT SUM(a) FROM p; <waiting ...> +step s1c: COMMIT; +step s2sel: <... completed> +ERROR: attribute "a" of relation "c1" does not match parent's type +step s2sel: SELECT SUM(a) FROM p; +sum +--- + 1 +(1 row) + diff --git a/src/test/isolation/expected/async-notify.out b/src/test/isolation/expected/async-notify.out new file mode 100644 index 0000000..556e180 --- /dev/null +++ b/src/test/isolation/expected/async-notify.out @@ -0,0 +1,127 @@ +Parsed test spec with 3 sessions + +starting permutation: listenc notify1 notify2 notify3 notifyf +step listenc: LISTEN c1; LISTEN c2; +step notify1: NOTIFY c1; +notifier: NOTIFY "c1" with payload "" from notifier +step notify2: NOTIFY c2, 'payload'; +notifier: NOTIFY "c2" with payload "payload" from notifier +step notify3: NOTIFY c3, 'payload3'; +step notifyf: SELECT pg_notify('c2', NULL); +pg_notify +--------- + +(1 row) + +notifier: NOTIFY "c2" with payload "" from notifier + +starting permutation: listenc notifyd1 notifyd2 notifys1 +step listenc: LISTEN c1; LISTEN c2; +step notifyd1: NOTIFY c2, 'payload'; NOTIFY c1; NOTIFY "c2", 'payload'; +notifier: NOTIFY "c2" with payload "payload" from notifier +notifier: NOTIFY "c1" with payload "" from notifier +step notifyd2: NOTIFY c1; NOTIFY c1; NOTIFY c1, 'p1'; NOTIFY c1, 'p2'; +notifier: NOTIFY "c1" with payload "" from notifier +notifier: NOTIFY "c1" with payload "p1" from notifier +notifier: NOTIFY "c1" with payload "p2" from notifier +step notifys1: + BEGIN; + NOTIFY c1, 'payload'; NOTIFY "c2", 'payload'; + NOTIFY c1, 'payload'; NOTIFY "c2", 'payload'; + SAVEPOINT s1; + NOTIFY c1, 'payload'; NOTIFY "c2", 'payload'; + NOTIFY c1, 'payloads'; NOTIFY "c2", 'payloads'; + NOTIFY c1, 'payload'; NOTIFY "c2", 'payload'; + NOTIFY c1, 'payloads'; NOTIFY "c2", 'payloads'; + RELEASE SAVEPOINT s1; + SAVEPOINT s2; + NOTIFY c1, 'rpayload'; NOTIFY "c2", 'rpayload'; + NOTIFY c1, 'rpayloads'; NOTIFY "c2", 'rpayloads'; + NOTIFY c1, 'rpayload'; NOTIFY "c2", 'rpayload'; + NOTIFY c1, 'rpayloads'; NOTIFY "c2", 'rpayloads'; + ROLLBACK TO SAVEPOINT s2; + COMMIT; + +notifier: NOTIFY "c1" with payload "payload" from notifier +notifier: NOTIFY "c2" with payload "payload" from notifier +notifier: NOTIFY "c1" with payload "payloads" from notifier +notifier: NOTIFY "c2" with payload "payloads" from notifier + +starting permutation: llisten notify1 notify2 notify3 notifyf lcheck +step llisten: LISTEN c1; LISTEN c2; +step notify1: NOTIFY c1; +step notify2: NOTIFY c2, 'payload'; +step notify3: NOTIFY c3, 'payload3'; +step notifyf: SELECT pg_notify('c2', NULL); +pg_notify +--------- + +(1 row) + +step lcheck: SELECT 1 AS x; +x +- +1 +(1 row) + +listener: NOTIFY "c1" with payload "" from notifier +listener: NOTIFY "c2" with payload "payload" from notifier +listener: NOTIFY "c2" with payload "" from notifier + +starting permutation: listenc llisten notify1 notify2 notify3 notifyf lcheck +step listenc: LISTEN c1; LISTEN c2; +step llisten: LISTEN c1; LISTEN c2; +step notify1: NOTIFY c1; +notifier: NOTIFY "c1" with payload "" from notifier +step notify2: NOTIFY c2, 'payload'; +notifier: NOTIFY "c2" with payload "payload" from notifier +step notify3: NOTIFY c3, 'payload3'; +step notifyf: SELECT pg_notify('c2', NULL); +pg_notify +--------- + +(1 row) + +notifier: NOTIFY "c2" with payload "" from notifier +step lcheck: SELECT 1 AS x; +x +- +1 +(1 row) + +listener: NOTIFY "c1" with payload "" from notifier +listener: NOTIFY "c2" with payload "payload" from notifier +listener: NOTIFY "c2" with payload "" from notifier + +starting permutation: l2listen l2begin notify1 lbegins llisten lcommit l2commit l2stop +step l2listen: LISTEN c1; +step l2begin: BEGIN; +step notify1: NOTIFY c1; +step lbegins: BEGIN ISOLATION LEVEL SERIALIZABLE; +step llisten: LISTEN c1; LISTEN c2; +step lcommit: COMMIT; +step l2commit: COMMIT; +listener2: NOTIFY "c1" with payload "" from notifier +step l2stop: UNLISTEN *; + +starting permutation: llisten lbegin usage bignotify usage +step llisten: LISTEN c1; LISTEN c2; +step lbegin: BEGIN; +step usage: SELECT pg_notification_queue_usage() > 0 AS nonzero; +nonzero +------- +f +(1 row) + +step bignotify: SELECT count(pg_notify('c1', s::text)) FROM generate_series(1, 1000) s; +count +----- + 1000 +(1 row) + +step usage: SELECT pg_notification_queue_usage() > 0 AS nonzero; +nonzero +------- +t +(1 row) + diff --git a/src/test/isolation/expected/classroom-scheduling.out b/src/test/isolation/expected/classroom-scheduling.out new file mode 100644 index 0000000..1d7c885 --- /dev/null +++ b/src/test/isolation/expected/classroom-scheduling.out @@ -0,0 +1,379 @@ +Parsed test spec with 2 sessions + +starting permutation: rx1 wy1 c1 ry2 wx2 c2 +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step c1: COMMIT; +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 1 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step c2: COMMIT; + +starting permutation: rx1 wy1 ry2 c1 wx2 c2 +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step c1: COMMIT; +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx1 wy1 ry2 wx2 c1 c2 +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 wy1 ry2 wx2 c2 c1 +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wy1 c1 wx2 c2 +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step c1: COMMIT; +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx1 ry2 wy1 wx2 c1 c2 +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wy1 wx2 c2 c1 +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wx2 wy1 c1 c2 +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wx2 wy1 c2 c1 +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wx2 c2 wy1 c1 +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step c2: COMMIT; +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: ry2 rx1 wy1 c1 wx2 c2 +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step c1: COMMIT; +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: ry2 rx1 wy1 wx2 c1 c2 +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wy1 wx2 c2 c1 +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wx2 wy1 c1 c2 +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wx2 wy1 c2 c1 +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wx2 c2 wy1 c1 +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step c2: COMMIT; +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: ry2 wx2 rx1 wy1 c1 c2 +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 wx2 rx1 wy1 c2 c1 +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 wx2 rx1 c2 wy1 c1 +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 0 +(1 row) + +step c2: COMMIT; +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: ry2 wx2 c2 rx1 wy1 c1 +step ry2: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; +count +----- + 0 +(1 row) + +step wx2: UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; +step c2: COMMIT; +step rx1: SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; +count +----- + 1 +(1 row) + +step wy1: INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); +step c1: COMMIT; diff --git a/src/test/isolation/expected/create-trigger.out b/src/test/isolation/expected/create-trigger.out new file mode 100644 index 0000000..7f98678 --- /dev/null +++ b/src/test/isolation/expected/create-trigger.out @@ -0,0 +1,361 @@ +Parsed test spec with 2 sessions + +starting permutation: s1a s1b s1c s2a s2b s2c s2d +step s1a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s1c: COMMIT; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; + +starting permutation: s1a s1b s2a s1c s2b s2c s2d +step s1a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s2a: BEGIN; +step s1c: COMMIT; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; + +starting permutation: s1a s1b s2a s2b s1c s2c s2d +step s1a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: COMMIT; +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; + +starting permutation: s1a s1b s2a s2b s2c s1c s2d +step s1a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...> +step s1c: COMMIT; +step s2c: <... completed> +step s2d: COMMIT; + +starting permutation: s1a s2a s1b s1c s2b s2c s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s1c: COMMIT; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; + +starting permutation: s1a s2a s1b s2b s1c s2c s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: COMMIT; +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; + +starting permutation: s1a s2a s1b s2b s2c s1c s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...> +step s1c: COMMIT; +step s2c: <... completed> +step s2d: COMMIT; + +starting permutation: s1a s2a s2b s1b s1c s2c s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s1c: COMMIT; +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; + +starting permutation: s1a s2a s2b s1b s2c s1c s2d +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...> +step s1c: COMMIT; +step s2c: <... completed> +step s2d: COMMIT; + +starting permutation: s1a s2a s2b s2c s1b s2d s1c +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...> +step s2d: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s1a s2a s2b s2c s2d s1b s1c +step s1a: BEGIN; +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s1c: COMMIT; + +starting permutation: s2a s1a s1b s1c s2b s2c s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s1c: COMMIT; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; + +starting permutation: s2a s1a s1b s2b s1c s2c s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1c: COMMIT; +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; + +starting permutation: s2a s1a s1b s2b s2c s1c s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...> +step s1c: COMMIT; +step s2c: <... completed> +step s2d: COMMIT; + +starting permutation: s2a s1a s2b s1b s1c s2c s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s1c: COMMIT; +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; + +starting permutation: s2a s1a s2b s1b s2c s1c s2d +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...> +step s1c: COMMIT; +step s2c: <... completed> +step s2d: COMMIT; + +starting permutation: s2a s1a s2b s2c s1b s2d s1c +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...> +step s2d: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s1a s2b s2c s2d s1b s1c +step s2a: BEGIN; +step s1a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s1c: COMMIT; + +starting permutation: s2a s2b s1a s1b s1c s2c s2d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s1c: COMMIT; +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; + +starting permutation: s2a s2b s1a s1b s2c s1c s2d +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s2c: UPDATE a SET i = 4 WHERE i = 3; <waiting ...> +step s1c: COMMIT; +step s2c: <... completed> +step s2d: COMMIT; + +starting permutation: s2a s2b s1a s2c s1b s2d s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...> +step s2d: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s2b s1a s2c s2d s1b s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s1a: BEGIN; +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s1a s1b s2d s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s1a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); <waiting ...> +step s2d: COMMIT; +step s1b: <... completed> +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s1a s2d s1b s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s1a: BEGIN; +step s2d: COMMIT; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s2d s1a s1b s1c +step s2a: BEGIN; +step s2b: SELECT * FROM a WHERE i = 1 FOR UPDATE; +i +- +1 +(1 row) + +step s2c: UPDATE a SET i = 4 WHERE i = 3; +step s2d: COMMIT; +step s1a: BEGIN; +step s1b: CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +step s1c: COMMIT; diff --git a/src/test/isolation/expected/deadlock-hard.out b/src/test/isolation/expected/deadlock-hard.out new file mode 100644 index 0000000..460653f --- /dev/null +++ b/src/test/isolation/expected/deadlock-hard.out @@ -0,0 +1,36 @@ +Parsed test spec with 8 sessions + +starting permutation: s1a1 s2a2 s3a3 s4a4 s5a5 s6a6 s7a7 s8a8 s1a2 s2a3 s3a4 s4a5 s5a6 s6a7 s7a8 s8a1 s8c s7c s6c s5c s4c s3c s2c s1c +step s1a1: LOCK TABLE a1; +step s2a2: LOCK TABLE a2; +step s3a3: LOCK TABLE a3; +step s4a4: LOCK TABLE a4; +step s5a5: LOCK TABLE a5; +step s6a6: LOCK TABLE a6; +step s7a7: LOCK TABLE a7; +step s8a8: LOCK TABLE a8; +step s1a2: LOCK TABLE a2; <waiting ...> +step s2a3: LOCK TABLE a3; <waiting ...> +step s3a4: LOCK TABLE a4; <waiting ...> +step s4a5: LOCK TABLE a5; <waiting ...> +step s5a6: LOCK TABLE a6; <waiting ...> +step s6a7: LOCK TABLE a7; <waiting ...> +step s7a8: LOCK TABLE a8; <waiting ...> +step s8a1: LOCK TABLE a1; <waiting ...> +step s8a1: <... completed> +ERROR: deadlock detected +step s7a8: <... completed> +step s8c: COMMIT; +step s7c: COMMIT; +step s6a7: <... completed> +step s6c: COMMIT; +step s5a6: <... completed> +step s5c: COMMIT; +step s4a5: <... completed> +step s4c: COMMIT; +step s3a4: <... completed> +step s3c: COMMIT; +step s2a3: <... completed> +step s2c: COMMIT; +step s1a2: <... completed> +step s1c: COMMIT; diff --git a/src/test/isolation/expected/deadlock-parallel.out b/src/test/isolation/expected/deadlock-parallel.out new file mode 100644 index 0000000..6fe5e24 --- /dev/null +++ b/src/test/isolation/expected/deadlock-parallel.out @@ -0,0 +1,68 @@ +Parsed test spec with 4 sessions + +starting permutation: d1a1 d2a2 e1l e2l d1a2 d2a1 d1c e1c d2c e2c +step d1a1: SELECT lock_share(1,x), lock_excl(3,x) FROM bigt LIMIT 1; +lock_share|lock_excl +----------+--------- + 1| 1 +(1 row) + +step d2a2: select lock_share(2,x) FROM bigt LIMIT 1; +lock_share +---------- + 1 +(1 row) + +step e1l: SELECT lock_excl(1,x) FROM bigt LIMIT 1; <waiting ...> +step e2l: SELECT lock_excl(2,x) FROM bigt LIMIT 1; <waiting ...> +step d1a2: SET force_parallel_mode = on; + SET parallel_setup_cost = 0; + SET parallel_tuple_cost = 0; + SET min_parallel_table_scan_size = 0; + SET parallel_leader_participation = off; + SET max_parallel_workers_per_gather = 3; + SELECT sum(lock_share(2,x)) FROM bigt; <waiting ...> +step d2a1: SET force_parallel_mode = on; + SET parallel_setup_cost = 0; + SET parallel_tuple_cost = 0; + SET min_parallel_table_scan_size = 0; + SET parallel_leader_participation = off; + SET max_parallel_workers_per_gather = 3; + SELECT sum(lock_share(1,x)) FROM bigt; + SET force_parallel_mode = off; + RESET parallel_setup_cost; + RESET parallel_tuple_cost; + SELECT lock_share(3,x) FROM bigt LIMIT 1; <waiting ...> +step d1a2: <... completed> + sum +----- +10000 +(1 row) + +step d1c: COMMIT; +step e1l: <... completed> +lock_excl +--------- + 1 +(1 row) + +step d2a1: <... completed> + sum +----- +10000 +(1 row) + +lock_share +---------- + 1 +(1 row) + +step e1c: COMMIT; +step d2c: COMMIT; +step e2l: <... completed> +lock_excl +--------- + 1 +(1 row) + +step e2c: COMMIT; diff --git a/src/test/isolation/expected/deadlock-simple.out b/src/test/isolation/expected/deadlock-simple.out new file mode 100644 index 0000000..8be1538 --- /dev/null +++ b/src/test/isolation/expected/deadlock-simple.out @@ -0,0 +1,11 @@ +Parsed test spec with 2 sessions + +starting permutation: s1as s2as s1ae s2ae s1c s2c +step s1as: LOCK TABLE a1 IN ACCESS SHARE MODE; +step s2as: LOCK TABLE a1 IN ACCESS SHARE MODE; +step s1ae: LOCK TABLE a1 IN ACCESS EXCLUSIVE MODE; <waiting ...> +step s2ae: LOCK TABLE a1 IN ACCESS EXCLUSIVE MODE; +ERROR: deadlock detected +step s1ae: <... completed> +step s1c: COMMIT; +step s2c: COMMIT; diff --git a/src/test/isolation/expected/deadlock-soft-2.out b/src/test/isolation/expected/deadlock-soft-2.out new file mode 100644 index 0000000..14b0343 --- /dev/null +++ b/src/test/isolation/expected/deadlock-soft-2.out @@ -0,0 +1,17 @@ +Parsed test spec with 4 sessions + +starting permutation: s1a s2a s2b s3a s4a s1b s1c s2c s3c s4c +step s1a: LOCK TABLE a1 IN SHARE UPDATE EXCLUSIVE MODE; +step s2a: LOCK TABLE a2 IN ACCESS SHARE MODE; +step s2b: LOCK TABLE a1 IN SHARE UPDATE EXCLUSIVE MODE; <waiting ...> +step s3a: LOCK TABLE a2 IN ACCESS EXCLUSIVE MODE; <waiting ...> +step s4a: LOCK TABLE a2 IN ACCESS EXCLUSIVE MODE; <waiting ...> +step s1b: LOCK TABLE a2 IN SHARE UPDATE EXCLUSIVE MODE; <waiting ...> +step s1b: <... completed> +step s1c: COMMIT; +step s2b: <... completed> +step s2c: COMMIT; +step s3a: <... completed> +step s3c: COMMIT; +step s4a: <... completed> +step s4c: COMMIT; diff --git a/src/test/isolation/expected/deadlock-soft.out b/src/test/isolation/expected/deadlock-soft.out new file mode 100644 index 0000000..24a35da --- /dev/null +++ b/src/test/isolation/expected/deadlock-soft.out @@ -0,0 +1,17 @@ +Parsed test spec with 4 sessions + +starting permutation: d1a1 d2a2 e1l e2l d1a2 d2a1 d1c e1c d2c e2c +step d1a1: LOCK TABLE a1 IN ACCESS SHARE MODE; +step d2a2: LOCK TABLE a2 IN ACCESS SHARE MODE; +step e1l: LOCK TABLE a1 IN ACCESS EXCLUSIVE MODE; <waiting ...> +step e2l: LOCK TABLE a2 IN ACCESS EXCLUSIVE MODE; <waiting ...> +step d1a2: LOCK TABLE a2 IN ACCESS SHARE MODE; <waiting ...> +step d2a1: LOCK TABLE a1 IN ACCESS SHARE MODE; <waiting ...> +step d1a2: <... completed> +step d1c: COMMIT; +step e1l: <... completed> +step e1c: COMMIT; +step d2a1: <... completed> +step d2c: COMMIT; +step e2l: <... completed> +step e2c: COMMIT; diff --git a/src/test/isolation/expected/delete-abort-savept-2.out b/src/test/isolation/expected/delete-abort-savept-2.out new file mode 100644 index 0000000..6fc991a --- /dev/null +++ b/src/test/isolation/expected/delete-abort-savept-2.out @@ -0,0 +1,100 @@ +Parsed test spec with 2 sessions + +starting permutation: s1l s1svp s1d s1r s2l s1c s2c +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1svp: SAVEPOINT f; +step s1d: SELECT * FROM foo FOR NO KEY UPDATE; +key|value +---+----- + 1| 1 +(1 row) + +step s1r: ROLLBACK TO f; +step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...> +step s1c: COMMIT; +step s2l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; + +starting permutation: s1l s1svp s1d s2l s1r s1c s2c +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1svp: SAVEPOINT f; +step s1d: SELECT * FROM foo FOR NO KEY UPDATE; +key|value +---+----- + 1| 1 +(1 row) + +step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...> +step s1r: ROLLBACK TO f; +step s1c: COMMIT; +step s2l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; + +starting permutation: s1l s1svp s1d s1r s2l2 s1c s2c +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1svp: SAVEPOINT f; +step s1d: SELECT * FROM foo FOR NO KEY UPDATE; +key|value +---+----- + 1| 1 +(1 row) + +step s1r: ROLLBACK TO f; +step s2l2: SELECT * FROM foo FOR NO KEY UPDATE; +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; + +starting permutation: s1l s1svp s1d s2l2 s1r s1c s2c +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1svp: SAVEPOINT f; +step s1d: SELECT * FROM foo FOR NO KEY UPDATE; +key|value +---+----- + 1| 1 +(1 row) + +step s2l2: SELECT * FROM foo FOR NO KEY UPDATE; <waiting ...> +step s1r: ROLLBACK TO f; +step s2l2: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; diff --git a/src/test/isolation/expected/delete-abort-savept.out b/src/test/isolation/expected/delete-abort-savept.out new file mode 100644 index 0000000..8f70bab --- /dev/null +++ b/src/test/isolation/expected/delete-abort-savept.out @@ -0,0 +1,139 @@ +Parsed test spec with 2 sessions + +starting permutation: s1l s1svp s1d s1r s1c s2l s2c +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1svp: SAVEPOINT f; +step s1d: DELETE FROM foo; +step s1r: ROLLBACK TO f; +step s1c: COMMIT; +step s2l: SELECT * FROM foo FOR UPDATE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; + +starting permutation: s1l s1svp s1d s1r s2l s1c s2c +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1svp: SAVEPOINT f; +step s1d: DELETE FROM foo; +step s1r: ROLLBACK TO f; +step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...> +step s1c: COMMIT; +step s2l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; + +starting permutation: s1l s1svp s1d s2l s1r s1c s2c +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1svp: SAVEPOINT f; +step s1d: DELETE FROM foo; +step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...> +step s1r: ROLLBACK TO f; +step s1c: COMMIT; +step s2l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; + +starting permutation: s1l s1svp s2l s1d s1r s1c s2c +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1svp: SAVEPOINT f; +step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...> +step s1d: DELETE FROM foo; +step s1r: ROLLBACK TO f; +step s1c: COMMIT; +step s2l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; + +starting permutation: s1l s2l s1svp s1d s1r s1c s2c +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2l: SELECT * FROM foo FOR UPDATE; <waiting ...> +step s1svp: SAVEPOINT f; +step s1d: DELETE FROM foo; +step s1r: ROLLBACK TO f; +step s1c: COMMIT; +step s2l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; + +starting permutation: s2l s1l s2c s1svp s1d s1r s1c +step s2l: SELECT * FROM foo FOR UPDATE; +key|value +---+----- + 1| 1 +(1 row) + +step s1l: SELECT * FROM foo FOR KEY SHARE; <waiting ...> +step s2c: COMMIT; +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s1svp: SAVEPOINT f; +step s1d: DELETE FROM foo; +step s1r: ROLLBACK TO f; +step s1c: COMMIT; + +starting permutation: s2l s2c s1l s1svp s1d s1r s1c +step s2l: SELECT * FROM foo FOR UPDATE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s1svp: SAVEPOINT f; +step s1d: DELETE FROM foo; +step s1r: ROLLBACK TO f; +step s1c: COMMIT; diff --git a/src/test/isolation/expected/detach-partition-concurrently-1.out b/src/test/isolation/expected/detach-partition-concurrently-1.out new file mode 100644 index 0000000..bae53dd --- /dev/null +++ b/src/test/isolation/expected/detach-partition-concurrently-1.out @@ -0,0 +1,288 @@ +Parsed test spec with 3 sessions + +starting permutation: s1b s1s s2detach s1s s1c s1s +step s1b: BEGIN; +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1s: SELECT * FROM d_listp; +a +- +1 +(1 row) + +step s1c: COMMIT; +step s2detach: <... completed> +step s1s: SELECT * FROM d_listp; +a +- +1 +(1 row) + + +starting permutation: s1b s1s s2detach s1s s3s s3i s1c s3i s2drop s1s +step s1b: BEGIN; +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1s: SELECT * FROM d_listp; +a +- +1 +(1 row) + +step s3s: SELECT * FROM d_listp; +a +- +1 +(1 row) + +step s3i: SELECT relpartbound IS NULL FROM pg_class where relname = 'd_listp2'; +?column? +-------- +f +(1 row) + +step s1c: COMMIT; +step s2detach: <... completed> +step s3i: SELECT relpartbound IS NULL FROM pg_class where relname = 'd_listp2'; +?column? +-------- +t +(1 row) + +step s2drop: DROP TABLE d_listp2; +step s1s: SELECT * FROM d_listp; +a +- +1 +(1 row) + + +starting permutation: s1b s1s s2detach s1ins s1s s1c +step s1b: BEGIN; +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1ins: INSERT INTO d_listp VALUES (1); +step s1s: SELECT * FROM d_listp; +a +- +1 +1 +(2 rows) + +step s1c: COMMIT; +step s2detach: <... completed> + +starting permutation: s1b s1s s1ins2 s2detach s1ins s1s s1c +step s1b: BEGIN; +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s1ins2: INSERT INTO d_listp VALUES (2); +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1ins: INSERT INTO d_listp VALUES (1); +step s1s: SELECT * FROM d_listp; +a +- +1 +1 +(2 rows) + +step s1c: COMMIT; +step s2detach: <... completed> + +starting permutation: s1brr s1s s2detach s1ins s1s s1c +step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1ins: INSERT INTO d_listp VALUES (1); +step s1s: SELECT * FROM d_listp; +a +- +1 +1 +2 +(3 rows) + +step s1c: COMMIT; +step s2detach: <... completed> + +starting permutation: s1brr s1s s2detach s1s s1c +step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s1c: COMMIT; +step s2detach: <... completed> + +starting permutation: s1b s1ins2 s2detach s3ins2 s1c +step s1b: BEGIN; +step s1ins2: INSERT INTO d_listp VALUES (2); +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s3ins2: INSERT INTO d_listp VALUES (2); +ERROR: no partition of relation "d_listp" found for row +step s1c: COMMIT; +step s2detach: <... completed> + +starting permutation: s1brr s1prep s1s s2detach s1s s1exec1 s3s s1dealloc s1c +step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1prep: PREPARE f(int) AS INSERT INTO d_listp VALUES ($1); +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s1exec1: EXECUTE f(1); +step s3s: SELECT * FROM d_listp; +a +- +1 +(1 row) + +step s1dealloc: DEALLOCATE f; +step s1c: COMMIT; +step s2detach: <... completed> + +starting permutation: s1brr s1prep s1exec2 s2detach s1s s1exec2 s3s s1c s1dealloc +step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1prep: PREPARE f(int) AS INSERT INTO d_listp VALUES ($1); +step s1exec2: EXECUTE f(2); +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +2 +(3 rows) + +step s1exec2: EXECUTE f(2); +step s3s: SELECT * FROM d_listp; +a +- +1 +(1 row) + +step s1c: COMMIT; +step s2detach: <... completed> +step s1dealloc: DEALLOCATE f; + +starting permutation: s1brr s1prep s1s s2detach s1s s1exec2 s1c s1dealloc +step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1prep: PREPARE f(int) AS INSERT INTO d_listp VALUES ($1); +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s1exec2: EXECUTE f(2); +step s1c: COMMIT; +step s2detach: <... completed> +step s1dealloc: DEALLOCATE f; + +starting permutation: s1brr s1prep s2detach s1s s1exec2 s1c s1dealloc +step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1prep: PREPARE f(int) AS INSERT INTO d_listp VALUES ($1); +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s1exec2: EXECUTE f(2); +step s1c: COMMIT; +step s2detach: <... completed> +step s1dealloc: DEALLOCATE f; + +starting permutation: s1brr s1prep1 s2detach s1s s1exec2 s1c s1dealloc +step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1prep1: PREPARE f(int) AS INSERT INTO d_listp VALUES (1); +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s1exec2: EXECUTE f(2); +step s1c: COMMIT; +step s2detach: <... completed> +step s1dealloc: DEALLOCATE f; + +starting permutation: s1brr s1prep2 s2detach s1s s1exec2 s1c s1dealloc +step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1prep2: PREPARE f(int) AS INSERT INTO d_listp VALUES (2); +step s2detach: ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; <waiting ...> +step s1s: SELECT * FROM d_listp; +a +- +1 +2 +(2 rows) + +step s1exec2: EXECUTE f(2); +step s1c: COMMIT; +step s2detach: <... completed> +step s1dealloc: DEALLOCATE f; diff --git a/src/test/isolation/expected/detach-partition-concurrently-2.out b/src/test/isolation/expected/detach-partition-concurrently-2.out new file mode 100644 index 0000000..6f025d8 --- /dev/null +++ b/src/test/isolation/expected/detach-partition-concurrently-2.out @@ -0,0 +1,76 @@ +Parsed test spec with 3 sessions + +starting permutation: s1b s1s s2d s3i1 s1c +step s1b: BEGIN; +step s1s: SELECT * FROM d_lp_fk; +a +- +1 +2 +(2 rows) + +step s2d: ALTER TABLE d_lp_fk DETACH PARTITION d_lp_fk_1 CONCURRENTLY; <waiting ...> +step s3i1: INSERT INTO d_lp_fk_r VALUES (1); +ERROR: insert or update on table "d_lp_fk_r" violates foreign key constraint "d_lp_fk_r_a_fkey" +step s1c: COMMIT; +step s2d: <... completed> + +starting permutation: s1b s1s s2d s3i2 s3i2 s1c +step s1b: BEGIN; +step s1s: SELECT * FROM d_lp_fk; +a +- +1 +2 +(2 rows) + +step s2d: ALTER TABLE d_lp_fk DETACH PARTITION d_lp_fk_1 CONCURRENTLY; <waiting ...> +step s3i2: INSERT INTO d_lp_fk_r VALUES (2); +step s3i2: INSERT INTO d_lp_fk_r VALUES (2); +step s1c: COMMIT; +step s2d: <... completed> + +starting permutation: s1b s1s s3i1 s2d s1c +step s1b: BEGIN; +step s1s: SELECT * FROM d_lp_fk; +a +- +1 +2 +(2 rows) + +step s3i1: INSERT INTO d_lp_fk_r VALUES (1); +step s2d: ALTER TABLE d_lp_fk DETACH PARTITION d_lp_fk_1 CONCURRENTLY; +ERROR: removing partition "d_lp_fk_1" violates foreign key constraint "d_lp_fk_r_a_fkey1" +step s1c: COMMIT; + +starting permutation: s1b s1s s3i2 s2d s1c +step s1b: BEGIN; +step s1s: SELECT * FROM d_lp_fk; +a +- +1 +2 +(2 rows) + +step s3i2: INSERT INTO d_lp_fk_r VALUES (2); +step s2d: ALTER TABLE d_lp_fk DETACH PARTITION d_lp_fk_1 CONCURRENTLY; <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> + +starting permutation: s1b s1s s3b s2d s3i1 s1c s3c +step s1b: BEGIN; +step s1s: SELECT * FROM d_lp_fk; +a +- +1 +2 +(2 rows) + +step s3b: BEGIN; +step s2d: ALTER TABLE d_lp_fk DETACH PARTITION d_lp_fk_1 CONCURRENTLY; <waiting ...> +step s3i1: INSERT INTO d_lp_fk_r VALUES (1); +ERROR: insert or update on table "d_lp_fk_r" violates foreign key constraint "d_lp_fk_r_a_fkey" +step s1c: COMMIT; +step s2d: <... completed> +step s3c: COMMIT; diff --git a/src/test/isolation/expected/detach-partition-concurrently-3.out b/src/test/isolation/expected/detach-partition-concurrently-3.out new file mode 100644 index 0000000..f23f46a --- /dev/null +++ b/src/test/isolation/expected/detach-partition-concurrently-3.out @@ -0,0 +1,506 @@ +Parsed test spec with 2 sessions + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1describe s1alter +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s1describe: SELECT 'd3_listp' AS root, * FROM pg_partition_tree('d3_listp') + UNION ALL SELECT 'd3_listp1', * FROM pg_partition_tree('d3_listp1'); +root |relid |parentrelid|isleaf|level +---------+---------+-----------+------+----- +d3_listp |d3_listp | |f | 0 +d3_listp |d3_listp2|d3_listp |t | 1 +d3_listp1|d3_listp1| |t | 0 +(3 rows) + +step s1alter: ALTER TABLE d3_listp1 ALTER a DROP NOT NULL; +ERROR: cannot alter partition "d3_listp1" with an incomplete detach + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1insert s1c +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1insert: INSERT INTO d3_listp VALUES (1); +ERROR: no partition of relation "d3_listp" found for row +step s1c: COMMIT; + +starting permutation: s2snitch s1brr s1s s2detach s1cancel s1insert s1c s1spart +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1insert: INSERT INTO d3_listp VALUES (1); +step s1c: COMMIT; +step s1spart: SELECT * FROM d3_listp1; +a +- +1 +1 +(2 rows) + + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1insertpart +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s1insertpart: INSERT INTO d3_listp1 VALUES (1); + +starting permutation: s2snitch s1b s1s s2detach2 s1cancel s1c s1brr s1insert s1s s1insert s1c +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach2: ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach2: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1insert: INSERT INTO d3_listp VALUES (1); +step s1s: SELECT * FROM d3_listp; +a +- +1 +1 +(2 rows) + +step s1insert: INSERT INTO d3_listp VALUES (1); +step s1c: COMMIT; + +starting permutation: s2snitch s1b s1s s2detach2 s1cancel s1c s1brr s1s s1insert s1s s1c +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach2: ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach2: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s1brr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s1insert: INSERT INTO d3_listp VALUES (1); +step s1s: SELECT * FROM d3_listp; +a +- +1 +1 +(2 rows) + +step s1c: COMMIT; + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1drop s1list +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s1drop: DROP TABLE d3_listp; +step s1list: SELECT relname FROM pg_catalog.pg_class + WHERE relname LIKE 'd3_listp%' ORDER BY 1; +relname +------- +(0 rows) + + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1trunc s1spart +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s1trunc: TRUNCATE TABLE d3_listp; +step s1spart: SELECT * FROM d3_listp1; +a +- +1 +(1 row) + + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1noop s2detach2 s1c +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1noop: +step s2detach2: ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY; +ERROR: partition "d3_listp1" already pending detach in partitioned table "public.d3_listp" +step s1c: COMMIT; + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1noop s2detachfinal s1c s2detach2 +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1noop: +step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE; <waiting ...> +step s1c: COMMIT; +step s2detachfinal: <... completed> +step s2detach2: ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY; + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1droppart s2detach2 +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s1droppart: DROP TABLE d3_listp1; +step s2detach2: ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY; + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s2begin s2drop s1s s2commit +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s2begin: BEGIN; +step s2drop: DROP TABLE d3_listp1; +step s1s: SELECT * FROM d3_listp; <waiting ...> +step s2commit: COMMIT; +step s1s: <... completed> +a +- +(0 rows) + + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1b s1spart s2detachfinal s1c +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s1b: BEGIN; +step s1spart: SELECT * FROM d3_listp1; +a +- +1 +(1 row) + +step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE; <waiting ...> +step s1c: COMMIT; +step s2detachfinal: <... completed> + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1b s1s s2detachfinal s1c +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +(0 rows) + +step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE; +step s1c: COMMIT; + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s1b s1spart s2detachfinal s1c +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s1b: BEGIN; +step s1spart: SELECT * FROM d3_listp1; +a +- +1 +(1 row) + +step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE; <waiting ...> +step s1c: COMMIT; +step s2detachfinal: <... completed> + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s2begin s2detachfinal s2commit +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s2begin: BEGIN; +step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE; +step s2commit: COMMIT; + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s2begin s2detachfinal s1spart s2commit +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s2begin: BEGIN; +step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE; +step s1spart: SELECT * FROM d3_listp1; <waiting ...> +step s2commit: COMMIT; +step s1spart: <... completed> +a +- +1 +(1 row) + + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1c s2begin s2detachfinal s1insertpart s2commit +step s2snitch: INSERT INTO d3_pid SELECT pg_backend_pid(); +step s1b: BEGIN; +step s1s: SELECT * FROM d3_listp; +a +- +1 +(1 row) + +step s2detach: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; <waiting ...> +step s1cancel: SELECT pg_cancel_backend(pid) FROM d3_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: COMMIT; +step s2begin: BEGIN; +step s2detachfinal: ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE; +step s1insertpart: INSERT INTO d3_listp1 VALUES (1); <waiting ...> +step s2commit: COMMIT; +step s1insertpart: <... completed> diff --git a/src/test/isolation/expected/detach-partition-concurrently-4.out b/src/test/isolation/expected/detach-partition-concurrently-4.out new file mode 100644 index 0000000..b652522 --- /dev/null +++ b/src/test/isolation/expected/detach-partition-concurrently-4.out @@ -0,0 +1,426 @@ +Parsed test spec with 3 sessions + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1insert s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s1s: select * from d4_primary; +a +- +1 +2 +(2 rows) + +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1c: commit; + +starting permutation: s2snitch s1b s1s s2detach s1insert s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s1s: select * from d4_primary; +a +- +1 +2 +(2 rows) + +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s2detach: <... completed> +step s1c: commit; + +starting permutation: s2snitch s1brr s1s s2detach s1cancel s1insert s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1brr: begin isolation level repeatable read; +step s1s: select * from d4_primary; +a +- +1 +2 +(2 rows) + +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1c: commit; + +starting permutation: s2snitch s1brr s1s s2detach s1insert s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1brr: begin isolation level repeatable read; +step s1s: select * from d4_primary; +a +- +1 +2 +(2 rows) + +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s2detach: <... completed> +step s1c: commit; + +starting permutation: s2snitch s1b s1declare s2detach s1cancel s1fetchall s1insert s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s1declare: declare f cursor for select * from d4_primary; +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1fetchall: fetch all from f; +a +- +1 +2 +(2 rows) + +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1c: commit; + +starting permutation: s2snitch s1b s1declare s2detach s1fetchall s1insert s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s1declare: declare f cursor for select * from d4_primary; +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1fetchall: fetch all from f; +a +- +1 +2 +(2 rows) + +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s2detach: <... completed> +step s1c: commit; + +starting permutation: s2snitch s1b s1declare s2detach s1cancel s1svpt s1insert s1rollback s1fetchall s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s1declare: declare f cursor for select * from d4_primary; +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1svpt: savepoint f; +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1rollback: rollback to f; +step s1fetchall: fetch all from f; +a +- +1 +2 +(2 rows) + +step s1c: commit; + +starting permutation: s2snitch s1b s1declare s2detach s1svpt s1insert s1rollback s1fetchall s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s1declare: declare f cursor for select * from d4_primary; +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1svpt: savepoint f; +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1rollback: rollback to f; +step s1fetchall: fetch all from f; +a +- +1 +2 +(2 rows) + +step s1c: commit; +step s2detach: <... completed> + +starting permutation: s2snitch s1b s2detach s1declare s1cancel s1fetchall s1insert s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; +step s1declare: declare f cursor for select * from d4_primary; +step s1cancel: select pg_cancel_backend(pid) from d4_pid; +pg_cancel_backend +----------------- +t +(1 row) + +step s1fetchall: fetch all from f; +a +- +2 +(1 row) + +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1c: commit; + +starting permutation: s2snitch s1b s2detach s1declare s1fetchall s1insert s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; +step s1declare: declare f cursor for select * from d4_primary; +step s1fetchall: fetch all from f; +a +- +2 +(1 row) + +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1c: commit; + +starting permutation: s2snitch s1b s2detach s1declare s1cancel s1svpt s1insert s1rollback s1fetchall s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; +step s1declare: declare f cursor for select * from d4_primary; +step s1cancel: select pg_cancel_backend(pid) from d4_pid; +pg_cancel_backend +----------------- +t +(1 row) + +step s1svpt: savepoint f; +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1rollback: rollback to f; +step s1fetchall: fetch all from f; +a +- +2 +(1 row) + +step s1c: commit; + +starting permutation: s2snitch s1b s2detach s1declare s1svpt s1insert s1rollback s1fetchall s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; +step s1declare: declare f cursor for select * from d4_primary; +step s1svpt: savepoint f; +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1rollback: rollback to f; +step s1fetchall: fetch all from f; +a +- +2 +(1 row) + +step s1c: commit; + +starting permutation: s2snitch s1brr s1declare2 s1fetchone s2detach s1cancel s1updcur s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1brr: begin isolation level repeatable read; +step s1declare2: declare f cursor for select * from d4_fk where a = 2; +step s1fetchone: fetch 1 from f; +a +- +2 +(1 row) + +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1updcur: update d4_fk set a = 1 where current of f; +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1c: commit; + +starting permutation: s2snitch s1brr s1declare2 s1fetchone s2detach s1updcur s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1brr: begin isolation level repeatable read; +step s1declare2: declare f cursor for select * from d4_fk where a = 2; +step s1fetchone: fetch 1 from f; +a +- +2 +(1 row) + +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1updcur: update d4_fk set a = 1 where current of f; +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s2detach: <... completed> +step s1c: commit; + +starting permutation: s2snitch s1brr s1declare2 s1fetchone s1updcur s2detach s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1brr: begin isolation level repeatable read; +step s1declare2: declare f cursor for select * from d4_fk where a = 2; +step s1fetchone: fetch 1 from f; +a +- +2 +(1 row) + +step s1updcur: update d4_fk set a = 1 where current of f; +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1c: commit; +step s2detach: <... completed> +ERROR: removing partition "d4_primary1" violates foreign key constraint "d4_fk_a_fkey1" + +starting permutation: s2snitch s1b s1s s2detach s3insert s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s1s: select * from d4_primary; +a +- +1 +2 +(2 rows) + +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s3insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1c: commit; +step s2detach: <... completed> + +starting permutation: s2snitch s1b s1s s2detach s3brr s3insert s3commit s1cancel s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s1s: select * from d4_primary; +a +- +1 +2 +(2 rows) + +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s3brr: begin isolation level repeatable read; +step s3insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s3commit: commit; +step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1c: commit; + +starting permutation: s2snitch s1b s1s s2detach s3brr s3insert s3commit s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s1s: select * from d4_primary; +a +- +1 +2 +(2 rows) + +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s3brr: begin isolation level repeatable read; +step s3insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s3commit: commit; +step s1c: commit; +step s2detach: <... completed> + +starting permutation: s2snitch s1brr s1s s2detach s1cancel s1noop s3vacfreeze s1s s1insert s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1brr: begin isolation level repeatable read; +step s1s: select * from d4_primary; +a +- +1 +2 +(2 rows) + +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1noop: +step s3vacfreeze: vacuum freeze pg_catalog.pg_inherits; +step s1s: select * from d4_primary; +a +- +1 +2 +(2 rows) + +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1c: commit; + +starting permutation: s2snitch s1b s1s s2detach s1cancel s1noop s3vacfreeze s1s s1insert s1c +step s2snitch: insert into d4_pid select pg_backend_pid(); +step s1b: begin; +step s1s: select * from d4_primary; +a +- +1 +2 +(2 rows) + +step s2detach: alter table d4_primary detach partition d4_primary1 concurrently; <waiting ...> +step s1cancel: select pg_cancel_backend(pid) from d4_pid; <waiting ...> +step s2detach: <... completed> +ERROR: canceling statement due to user request +step s1cancel: <... completed> +pg_cancel_backend +----------------- +t +(1 row) + +step s1noop: +step s3vacfreeze: vacuum freeze pg_catalog.pg_inherits; +step s1s: select * from d4_primary; +a +- +2 +(1 row) + +step s1insert: insert into d4_fk values (1); +ERROR: insert or update on table "d4_fk" violates foreign key constraint "d4_fk_a_fkey" +step s1c: commit; diff --git a/src/test/isolation/expected/drop-index-concurrently-1.out b/src/test/isolation/expected/drop-index-concurrently-1.out new file mode 100644 index 0000000..97e1a6e --- /dev/null +++ b/src/test/isolation/expected/drop-index-concurrently-1.out @@ -0,0 +1,56 @@ +Parsed test spec with 3 sessions + +starting permutation: noseq chkiso prepi preps begin explaini explains select2 drop insert2 end2 selecti selects end +step noseq: SET enable_seqscan = false; +step chkiso: SELECT (setting in ('read committed','read uncommitted')) AS is_read_committed FROM pg_settings WHERE name = 'default_transaction_isolation'; +is_read_committed +----------------- +t +(1 row) + +step prepi: PREPARE getrow_idx AS SELECT * FROM test_dc WHERE data=34 ORDER BY id,data; +step preps: PREPARE getrow_seq AS SELECT * FROM test_dc WHERE data::text=34::text ORDER BY id,data; +step begin: BEGIN; +step explaini: EXPLAIN (COSTS OFF) EXECUTE getrow_idx; +QUERY PLAN +---------------------------------------------- +Sort + Sort Key: id + -> Index Scan using test_dc_data on test_dc + Index Cond: (data = 34) +(4 rows) + +step explains: EXPLAIN (COSTS OFF) EXECUTE getrow_seq; +QUERY PLAN +---------------------------------------------- +Sort + Sort Key: id, data + -> Index Scan using test_dc_pkey on test_dc + Filter: ((data)::text = '34'::text) +(4 rows) + +step select2: SELECT * FROM test_dc WHERE data=34 ORDER BY id,data; +id|data +--+---- +34| 34 +(1 row) + +step drop: DROP INDEX CONCURRENTLY test_dc_data; <waiting ...> +step insert2: INSERT INTO test_dc(data) SELECT * FROM generate_series(1, 100); +step end2: COMMIT; +step selecti: EXECUTE getrow_idx; + id|data +---+---- + 34| 34 +134| 34 +(2 rows) + +step selects: EXECUTE getrow_seq; + id|data +---+---- + 34| 34 +134| 34 +(2 rows) + +step end: COMMIT; +step drop: <... completed> diff --git a/src/test/isolation/expected/drop-index-concurrently-1_2.out b/src/test/isolation/expected/drop-index-concurrently-1_2.out new file mode 100644 index 0000000..04612d3 --- /dev/null +++ b/src/test/isolation/expected/drop-index-concurrently-1_2.out @@ -0,0 +1,54 @@ +Parsed test spec with 3 sessions + +starting permutation: noseq chkiso prepi preps begin explaini explains select2 drop insert2 end2 selecti selects end +step noseq: SET enable_seqscan = false; +step chkiso: SELECT (setting in ('read committed','read uncommitted')) AS is_read_committed FROM pg_settings WHERE name = 'default_transaction_isolation'; +is_read_committed +----------------- +f +(1 row) + +step prepi: PREPARE getrow_idx AS SELECT * FROM test_dc WHERE data=34 ORDER BY id,data; +step preps: PREPARE getrow_seq AS SELECT * FROM test_dc WHERE data::text=34::text ORDER BY id,data; +step begin: BEGIN; +step explaini: EXPLAIN (COSTS OFF) EXECUTE getrow_idx; +QUERY PLAN +---------------------------------------------- +Sort + Sort Key: id + -> Index Scan using test_dc_data on test_dc + Index Cond: (data = 34) +(4 rows) + +step explains: EXPLAIN (COSTS OFF) EXECUTE getrow_seq; +QUERY PLAN +---------------------------------------------- +Sort + Sort Key: id, data + -> Index Scan using test_dc_pkey on test_dc + Filter: ((data)::text = '34'::text) +(4 rows) + +step select2: SELECT * FROM test_dc WHERE data=34 ORDER BY id,data; +id|data +--+---- +34| 34 +(1 row) + +step drop: DROP INDEX CONCURRENTLY test_dc_data; <waiting ...> +step insert2: INSERT INTO test_dc(data) SELECT * FROM generate_series(1, 100); +step end2: COMMIT; +step selecti: EXECUTE getrow_idx; +id|data +--+---- +34| 34 +(1 row) + +step selects: EXECUTE getrow_seq; +id|data +--+---- +34| 34 +(1 row) + +step end: COMMIT; +step drop: <... completed> diff --git a/src/test/isolation/expected/eval-plan-qual-trigger.out b/src/test/isolation/expected/eval-plan-qual-trigger.out new file mode 100644 index 0000000..f6714c2 --- /dev/null +++ b/src/test/isolation/expected/eval-plan-qual-trigger.out @@ -0,0 +1,2734 @@ +unused step name: s2_r +unused step name: s3_b_rc +unused step name: s3_c +unused step name: s3_del_a +unused step name: s3_r +unused step name: s3_upd_a_data +Parsed test spec with 4 sessions + +starting permutation: s1_trig_rep_b_u s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s1_c s2_upd_a_data s2_c s0_rep +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +step s1_c: COMMIT; +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1-ups1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-ups2) +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-ups2) +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------------ +key-a|val-a-s1-ups1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------------ +key-a|val-a-s1-ups1-ups2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_u s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s1_r s2_upd_a_data s2_c s0_rep +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +step s1_r: ROLLBACK; +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------- +key-a|val-a-s1-ups2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s1_c s2_del_a s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +step s1_c: COMMIT; +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1-ups1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-a,val-a-s1-ups1) new: <NULL> +s2: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1-ups1) new: <NULL> +step s2_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s1_r s2_del_a s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +step s1_r: ROLLBACK; +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s2_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + + +starting permutation: s1_trig_rep_b_u s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s2_upd_a_data s1_c s2_c s0_rep +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1-ups1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-ups2) +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------------ +key-a|val-a-s1-ups1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------------ +key-a|val-a-s1-ups1-ups2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_u s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s2_upd_a_data s1_r s2_c s0_rep +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------- +key-a|val-a-s1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------- +key-a|val-a-s1-ups2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s2_upd_a_data s1_c s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1-ups1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-ups2) +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------------ +key-a|val-a-s1-ups1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------------ +key-a|val-a-s1-ups1-ups2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s2_upd_a_data s1_r s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------- +key-a|val-a-s1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------- +key-a|val-a-s1-ups2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_del_a s2_upd_a_data s1_c s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-b = text key-a: f +step s2_upd_a_data: <... completed> +key|data +---+---- +(0 rows) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_del_a s2_upd_a_data s1_r s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------- +key-a|val-a-s1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------- +key-a|val-a-s1-ups2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_a_i s1_trig_rep_a_d s1_b_rc s2_b_rc s1_ins_a s2_ins_a s1_c s2_c s0_rep +step s1_trig_rep_b_i: CREATE TRIGGER rep_b_i BEFORE INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_i: CREATE TRIGGER rep_a_i AFTER INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s2) +step s2_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s2') RETURNING *; <waiting ...> +step s1_c: COMMIT; +step s2_ins_a: <... completed> +ERROR: duplicate key value violates unique constraint "trigtest_pkey" +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + + +starting permutation: s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_a_i s1_trig_rep_a_d s1_b_rc s2_b_rc s1_ins_a s2_ins_a s1_r s2_c s0_rep +step s1_trig_rep_b_i: CREATE TRIGGER rep_b_i BEFORE INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_i: CREATE TRIGGER rep_a_i AFTER INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s2) +step s2_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s2') RETURNING *; <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s2) +step s2_ins_a: <... completed> +key |data +-----+-------- +key-a|val-a-s2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-a|val-a-s2 +(1 row) + + +starting permutation: s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s2_upsert_a_data s1_c s2_c s0_rep +step s1_trig_rep_b_i: CREATE TRIGGER rep_b_i BEFORE INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_i: CREATE TRIGGER rep_a_i AFTER INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-b,val-b-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-b,val-b-s1) +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-upss2) +step s2_upsert_a_data: + INSERT INTO trigtest VALUES ('key-a', 'val-a-upss2') + ON CONFLICT (key) + DO UPDATE SET data = trigtest.data || '-upserts2' + WHERE + noisy_oper('upd', trigtest.key, '=', 'key-a') AND + noisy_oper('upk', trigtest.data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1-ups1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-upserts2) +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-upserts2) +step s2_upsert_a_data: <... completed> +key |data +-----+---------------------- +key-a|val-a-s1-ups1-upserts2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+---------------------- +key-a|val-a-s1-ups1-upserts2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s2_upsert_a_data s1_c s2_c s0_rep +step s1_trig_rep_b_i: CREATE TRIGGER rep_b_i BEFORE INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_i: CREATE TRIGGER rep_a_i AFTER INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-b,val-b-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-b,val-b-s1) +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-upss2) +step s2_upsert_a_data: + INSERT INTO trigtest VALUES ('key-a', 'val-a-upss2') + ON CONFLICT (key) + DO UPDATE SET data = trigtest.data || '-upserts2' + WHERE + noisy_oper('upd', trigtest.key, '=', 'key-a') AND + noisy_oper('upk', trigtest.data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1-ups1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-upserts2) +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-upserts2) +step s2_upsert_a_data: <... completed> +key |data +-----+---------------------- +key-a|val-a-s1-ups1-upserts2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+---------------------- +key-a|val-a-s1-ups1-upserts2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u s1_b_rc s2_b_rc s1_ins_a s2_upsert_a_data s1_c s2_c s0_rep +step s1_trig_rep_b_i: CREATE TRIGGER rep_b_i BEFORE INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_i: CREATE TRIGGER rep_a_i AFTER INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-upss2) +step s2_upsert_a_data: + INSERT INTO trigtest VALUES ('key-a', 'val-a-upss2') + ON CONFLICT (key) + DO UPDATE SET data = trigtest.data || '-upserts2' + WHERE + noisy_oper('upd', trigtest.key, '=', 'key-a') AND + noisy_oper('upk', trigtest.data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-upserts2) +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-upserts2) +step s2_upsert_a_data: <... completed> +key |data +-----+----------------- +key-a|val-a-s1-upserts2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+----------------- +key-a|val-a-s1-upserts2 +(1 row) + + +starting permutation: s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u s1_b_rc s2_b_rc s1_ins_a s2_upsert_a_data s1_r s2_c s0_rep +step s1_trig_rep_b_i: CREATE TRIGGER rep_b_i BEFORE INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_i: CREATE TRIGGER rep_a_i AFTER INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-upss2) +step s2_upsert_a_data: + INSERT INTO trigtest VALUES ('key-a', 'val-a-upss2') + ON CONFLICT (key) + DO UPDATE SET data = trigtest.data || '-upserts2' + WHERE + noisy_oper('upd', trigtest.key, '=', 'key-a') AND + noisy_oper('upk', trigtest.data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-upss2) +step s2_upsert_a_data: <... completed> +key |data +-----+----------- +key-a|val-a-upss2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+----------- +key-a|val-a-upss2 +(1 row) + + +starting permutation: s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u s1_b_rc s2_b_rc s1_ins_a s1_upd_a_data s2_upsert_a_data s1_c s2_c s0_rep +step s1_trig_rep_b_i: CREATE TRIGGER rep_b_i BEFORE INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_i: CREATE TRIGGER rep_a_i AFTER INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-upss2) +step s2_upsert_a_data: + INSERT INTO trigtest VALUES ('key-a', 'val-a-upss2') + ON CONFLICT (key) + DO UPDATE SET data = trigtest.data || '-upserts2' + WHERE + noisy_oper('upd', trigtest.key, '=', 'key-a') AND + noisy_oper('upk', trigtest.data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1-ups1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-upserts2) +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-upserts2) +step s2_upsert_a_data: <... completed> +key |data +-----+---------------------- +key-a|val-a-s1-ups1-upserts2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+---------------------- +key-a|val-a-s1-ups1-upserts2 +(1 row) + + +starting permutation: s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u s1_b_rc s2_b_rc s1_ins_a s1_upd_a_data s2_upsert_a_data s1_r s2_c s0_rep +step s1_trig_rep_b_i: CREATE TRIGGER rep_b_i BEFORE INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_i: CREATE TRIGGER rep_a_i AFTER INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-upss2) +step s2_upsert_a_data: + INSERT INTO trigtest VALUES ('key-a', 'val-a-upss2') + ON CONFLICT (key) + DO UPDATE SET data = trigtest.data || '-upserts2' + WHERE + noisy_oper('upd', trigtest.key, '=', 'key-a') AND + noisy_oper('upk', trigtest.data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-upss2) +step s2_upsert_a_data: <... completed> +key |data +-----+----------- +key-a|val-a-upss2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+----------- +key-a|val-a-upss2 +(1 row) + + +starting permutation: s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s2_upd_a_data s1_c s2_c s0_rep +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1-ups1 <> text mismatch: t +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1-ups1) new: (key-a,val-a-s1-ups1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------------ +key-a|val-a-s1-ups1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------------ +key-a|val-a-s1-ups1-ups2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s2_upd_a_data s1_r s2_c s0_rep +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------- +key-a|val-a-s1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------- +key-a|val-a-s1-ups2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s2_del_a s1_c s2_c s0_rep +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1-ups1 <> text mismatch: t +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1-ups1) new: <NULL> +step s2_del_a: <... completed> +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + + +starting permutation: s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_upd_a_data s2_del_a s1_r s2_c s0_rep +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s2_del_a: <... completed> +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + + +starting permutation: s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_del_a s2_upd_a_data s1_c s2_c s0_rep +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-b = text key-a: f +step s2_upd_a_data: <... completed> +key|data +---+---- +(0 rows) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + + +starting permutation: s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_del_a s2_upd_a_data s1_r s2_c s0_rep +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------- +key-a|val-a-s1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------- +key-a|val-a-s1-ups2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_a_d s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_del_a s2_del_a s1_c s2_c s0_rep +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-b = text key-a: f +step s2_del_a: <... completed> +key|data +---+---- +(0 rows) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + + +starting permutation: s1_trig_rep_a_d s1_ins_a s1_ins_b s1_b_rc s2_b_rc s1_del_a s2_del_a s1_r s2_c s0_rep +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s2_del_a: <... completed> +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + + +starting permutation: s1_trig_rep_b_u s1_trig_rep_a_u s1_ins_a s1_ins_c s1_b_rc s2_b_rc s1_upd_a_tob s2_upd_a_data s1_c s2_c s0_rep +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_c: INSERT INTO trigtest VALUES ('key-c', 'val-c-s1') RETURNING *; +key |data +-----+-------- +key-c|val-c-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upk: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-b,val-a-s1-tobs1) +s1: NOTICE: upk: text key-c = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-b,val-a-s1-tobs1) +step s1_upd_a_tob: + UPDATE trigtest SET key = 'key-b', data = data || '-tobs1' + WHERE + noisy_oper('upk', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+-------------- +key-b|val-a-s1-tobs1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: upd: text key-c = text key-a: f +step s2_upd_a_data: <... completed> +key|data +---+---- +(0 rows) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------------- +key-b|val-a-s1-tobs1 +key-c|val-c-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_u s1_trig_rep_a_u s1_ins_a s1_ins_c s1_b_rc s2_b_rc s1_upd_a_tob s2_upd_a_data s1_r s2_c s0_rep +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_c: INSERT INTO trigtest VALUES ('key-c', 'val-c-s1') RETURNING *; +key |data +-----+-------- +key-c|val-c-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upk: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-b,val-a-s1-tobs1) +s1: NOTICE: upk: text key-c = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-b,val-a-s1-tobs1) +step s1_upd_a_tob: + UPDATE trigtest SET key = 'key-b', data = data || '-tobs1' + WHERE + noisy_oper('upk', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+-------------- +key-b|val-a-s1-tobs1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +s2: NOTICE: upd: text key-c = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------- +key-a|val-a-s1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------- +key-a|val-a-s1-ups2 +key-c|val-c-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_u s1_trig_rep_a_u s1_ins_a s1_ins_c s1_b_rc s2_b_rc s1_upd_a_tob s2_upd_b_data s1_c s2_c s0_rep +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_c: INSERT INTO trigtest VALUES ('key-c', 'val-c-s1') RETURNING *; +key |data +-----+-------- +key-c|val-c-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upk: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-b,val-a-s1-tobs1) +s1: NOTICE: upk: text key-c = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-b,val-a-s1-tobs1) +step s1_upd_a_tob: + UPDATE trigtest SET key = 'key-b', data = data || '-tobs1' + WHERE + noisy_oper('upk', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+-------------- +key-b|val-a-s1-tobs1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-b: f +s2: NOTICE: upd: text key-c = text key-b: f +step s2_upd_b_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-b') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key|data +---+---- +(0 rows) + +step s1_c: COMMIT; +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------------- +key-b|val-a-s1-tobs1 +key-c|val-c-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_u s1_trig_rep_a_u s1_ins_a s1_ins_c s1_b_rc s2_b_rc s1_upd_a_tob s2_upd_all_data s1_c s2_c s0_rep +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_c: INSERT INTO trigtest VALUES ('key-c', 'val-c-s1') RETURNING *; +key |data +-----+-------- +key-c|val-c-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upk: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-b,val-a-s1-tobs1) +s1: NOTICE: upk: text key-c = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-b,val-a-s1-tobs1) +step s1_upd_a_tob: + UPDATE trigtest SET key = 'key-b', data = data || '-tobs1' + WHERE + noisy_oper('upk', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+-------------- +key-b|val-a-s1-tobs1 +(1 row) + +s2: NOTICE: upd: text key-a <> text mismatch: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_all_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '<>', 'mismatch') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-b <> text mismatch: t +s2: NOTICE: upk: text val-a-s1-tobs1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-b,val-a-s1-tobs1) new: (key-b,val-a-s1-tobs1-ups2) +s2: NOTICE: upd: text key-c <> text mismatch: t +s2: NOTICE: upk: text val-c-s1 <> text mismatch: t +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-c,val-c-s1) new: (key-c,val-c-s1-ups2) +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-b,val-a-s1-tobs1) new: (key-b,val-a-s1-tobs1-ups2) +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-c,val-c-s1) new: (key-c,val-c-s1-ups2) +step s2_upd_all_data: <... completed> +key |data +-----+------------------- +key-b|val-a-s1-tobs1-ups2 +key-c|val-c-s1-ups2 +(2 rows) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------------- +key-b|val-a-s1-tobs1-ups2 +key-c|val-c-s1-ups2 +(2 rows) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_c s1_b_rc s2_b_rc s1_del_a s2_upd_a_data s1_c s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_c: INSERT INTO trigtest VALUES ('key-c', 'val-c-s1') RETURNING *; +key |data +-----+-------- +key-c|val-c-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +s1: NOTICE: upd: text key-c = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-c = text key-a: f +step s2_upd_a_data: <... completed> +key|data +---+---- +(0 rows) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-c|val-c-s1 +(1 row) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_c s1_b_rc s2_b_rc s1_del_a s2_upd_a_data s1_r s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_c: INSERT INTO trigtest VALUES ('key-c', 'val-c-s1') RETURNING *; +key |data +-----+-------- +key-c|val-c-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +s1: NOTICE: upd: text key-c = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +s2: NOTICE: upd: text key-c = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------- +key-a|val-a-s1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------- +key-a|val-a-s1-ups2 +key-c|val-c-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_a_d s1_ins_a s1_ins_c s1_b_rc s2_b_rc s1_del_a s2_del_a s1_c s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_c: INSERT INTO trigtest VALUES ('key-c', 'val-c-s1') RETURNING *; +key |data +-----+-------- +key-c|val-c-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +s1: NOTICE: upd: text key-c = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + <waiting ...> +step s1_c: COMMIT; +s2: NOTICE: upd: text key-c = text key-a: f +step s2_del_a: <... completed> +key|data +---+---- +(0 rows) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-c|val-c-s1 +(1 row) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_a_d s1_ins_a s1_ins_c s1_b_rc s2_b_rc s1_del_a s2_del_a s1_r s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_c: INSERT INTO trigtest VALUES ('key-c', 'val-c-s1') RETURNING *; +key |data +-----+-------- +key-c|val-c-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +s1: NOTICE: upd: text key-c = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +s2: NOTICE: upd: text key-c = text key-a: f +s2: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s2_del_a: <... completed> +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-c|val-c-s1 +(1 row) + + +starting permutation: s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_b s1_b_rc s2_b_rc s1_ins_a s1_upd_b_data s2_upd_b_data s1_del_b s1_upd_a_tob s1_c s2_c s0_rep +step s1_trig_rep_b_i: CREATE TRIGGER rep_b_i BEFORE INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_i: CREATE TRIGGER rep_a_i AFTER INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-b,val-b-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-b,val-b-s1) +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rc: BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: trigger: name rep_b_i; when: BEFORE; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +s1: NOTICE: trigger: name rep_a_i; when: AFTER; lev: ROWs; op: INSERT; old: <NULL> new: (key-a,val-a-s1) +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s1: NOTICE: upd: text key-b = text key-b: t +s1: NOTICE: upk: text val-b-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-b,val-b-s1) new: (key-b,val-b-s1-ups1) +s1: NOTICE: upd: text key-a = text key-b: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-b,val-b-s1) new: (key-b,val-b-s1-ups1) +step s1_upd_b_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-b') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-b|val-b-s1-ups1 +(1 row) + +s2: NOTICE: upd: text key-b = text key-b: t +s2: NOTICE: upk: text val-b-s1 <> text mismatch: t +step s2_upd_b_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-b') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +s1: NOTICE: upd: text key-a = text key-b: f +s1: NOTICE: upd: text key-b = text key-b: t +s1: NOTICE: upk: text val-b-s1-ups1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-b,val-b-s1-ups1) new: <NULL> +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-b,val-b-s1-ups1) new: <NULL> +step s1_del_b: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-b') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+------------- +key-b|val-b-s1-ups1 +(1 row) + +s1: NOTICE: upk: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-b,val-a-s1-tobs1) +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-b,val-a-s1-tobs1) +step s1_upd_a_tob: + UPDATE trigtest SET key = 'key-b', data = data || '-tobs1' + WHERE + noisy_oper('upk', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+-------------- +key-b|val-a-s1-tobs1 +(1 row) + +step s1_c: COMMIT; +step s2_upd_b_data: <... completed> +key|data +---+---- +(0 rows) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------------- +key-b|val-a-s1-tobs1 +(1 row) + + +starting permutation: s1_trig_rep_b_u s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rr s2_b_rr s1_upd_a_data s2_upd_a_data s1_c s2_c s0_rep +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rr: BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rr: BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +step s2_upd_a_data: <... completed> +ERROR: could not serialize access due to concurrent update +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------- +key-a|val-a-s1-ups1 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_u s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rr s2_b_rr s1_upd_a_data s2_upd_a_data s1_r s2_c s0_rep +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rr: BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rr: BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups1) +step s1_upd_a_data: + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + +key |data +-----+------------- +key-a|val-a-s1-ups1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------- +key-a|val-a-s1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------- +key-a|val-a-s1-ups2 +key-b|val-b-s1 +(2 rows) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rr s2_b_rr s1_del_a s2_upd_a_data s1_c s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rr: BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rr: BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_c: COMMIT; +step s2_upd_a_data: <... completed> +ERROR: could not serialize access due to concurrent delete +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + + +starting permutation: s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u s1_ins_a s1_ins_b s1_b_rr s2_b_rr s1_del_a s2_upd_a_data s1_r s2_c s0_rep +step s1_trig_rep_b_d: CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_b_u: CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_d: CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_trig_rep_a_u: CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); +step s1_ins_a: INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +step s1_ins_b: INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; +key |data +-----+-------- +key-b|val-b-s1 +(1 row) + +step s1_b_rr: BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1; +?column? +-------- + 1 +(1 row) + +step s2_b_rr: BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1; +?column? +-------- + 1 +(1 row) + +s1: NOTICE: upd: text key-a = text key-a: t +s1: NOTICE: upk: text val-a-s1 <> text mismatch: t +s1: NOTICE: trigger: name rep_b_d; when: BEFORE; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +s1: NOTICE: upd: text key-b = text key-a: f +s1: NOTICE: trigger: name rep_a_d; when: AFTER; lev: ROWs; op: DELETE; old: (key-a,val-a-s1) new: <NULL> +step s1_del_a: + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * + +key |data +-----+-------- +key-a|val-a-s1 +(1 row) + +s2: NOTICE: upd: text key-a = text key-a: t +s2: NOTICE: upk: text val-a-s1 <> text mismatch: t +step s2_upd_a_data: + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; + <waiting ...> +step s1_r: ROLLBACK; +s2: NOTICE: trigger: name rep_b_u; when: BEFORE; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +s2: NOTICE: upd: text key-b = text key-a: f +s2: NOTICE: trigger: name rep_a_u; when: AFTER; lev: ROWs; op: UPDATE; old: (key-a,val-a-s1) new: (key-a,val-a-s1-ups2) +step s2_upd_a_data: <... completed> +key |data +-----+------------- +key-a|val-a-s1-ups2 +(1 row) + +step s2_c: COMMIT; +step s0_rep: SELECT * FROM trigtest ORDER BY key, data +key |data +-----+------------- +key-a|val-a-s1-ups2 +key-b|val-b-s1 +(2 rows) + diff --git a/src/test/isolation/expected/eval-plan-qual.out b/src/test/isolation/expected/eval-plan-qual.out new file mode 100644 index 0000000..d906350 --- /dev/null +++ b/src/test/isolation/expected/eval-plan-qual.out @@ -0,0 +1,1179 @@ +Parsed test spec with 3 sessions + +starting permutation: wx1 wx2 c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; <waiting ...> +step c1: COMMIT; +step wx2: <... completed> +balance +------- + 850 +(1 row) + +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 850 +savings | 600 +(2 rows) + + +starting permutation: wy1 wy2 c1 c2 read +step wy1: UPDATE accounts SET balance = balance + 500 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1100 +(1 row) + +step wy2: UPDATE accounts SET balance = balance + 1000 WHERE accountid = 'checking' AND balance < 1000 RETURNING balance; <waiting ...> +step c1: COMMIT; +step wy2: <... completed> +balance +------- +(0 rows) + +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 1100 +savings | 600 +(2 rows) + + +starting permutation: wx1 wx2 r1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; <waiting ...> +step r1: ROLLBACK; +step wx2: <... completed> +balance +------- + 1050 +(1 row) + +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 1050 +savings | 600 +(2 rows) + + +starting permutation: wy1 wy2 r1 c2 read +step wy1: UPDATE accounts SET balance = balance + 500 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1100 +(1 row) + +step wy2: UPDATE accounts SET balance = balance + 1000 WHERE accountid = 'checking' AND balance < 1000 RETURNING balance; <waiting ...> +step r1: ROLLBACK; +step wy2: <... completed> +balance +------- + 1600 +(1 row) + +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 1600 +savings | 600 +(2 rows) + + +starting permutation: wx1 d1 wx2 c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step d1: DELETE FROM accounts WHERE accountid = 'checking' AND balance < 1500 RETURNING balance; +balance +------- + 400 +(1 row) + +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; <waiting ...> +step c1: COMMIT; +step wx2: <... completed> +balance +------- +(0 rows) + +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +savings | 600 +(1 row) + + +starting permutation: wx2 d1 c2 c1 read +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1050 +(1 row) + +step d1: DELETE FROM accounts WHERE accountid = 'checking' AND balance < 1500 RETURNING balance; <waiting ...> +step c2: COMMIT; +step d1: <... completed> +balance +------- + 1050 +(1 row) + +step c1: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +savings | 600 +(1 row) + + +starting permutation: wx2 wx2 d1 c2 c1 read +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1050 +(1 row) + +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1500 +(1 row) + +step d1: DELETE FROM accounts WHERE accountid = 'checking' AND balance < 1500 RETURNING balance; <waiting ...> +step c2: COMMIT; +step d1: <... completed> +balance +------- +(0 rows) + +step c1: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 1500 +savings | 600 +(2 rows) + + +starting permutation: wx2 d2 d1 c2 c1 read +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1050 +(1 row) + +step d2: DELETE FROM accounts WHERE accountid = 'checking'; +step d1: DELETE FROM accounts WHERE accountid = 'checking' AND balance < 1500 RETURNING balance; <waiting ...> +step c2: COMMIT; +step d1: <... completed> +balance +------- +(0 rows) + +step c1: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +savings | 600 +(1 row) + + +starting permutation: wx1 d1 wx2 r1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step d1: DELETE FROM accounts WHERE accountid = 'checking' AND balance < 1500 RETURNING balance; +balance +------- + 400 +(1 row) + +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; <waiting ...> +step r1: ROLLBACK; +step wx2: <... completed> +balance +------- + 1050 +(1 row) + +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 1050 +savings | 600 +(2 rows) + + +starting permutation: wx2 d1 r2 c1 read +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1050 +(1 row) + +step d1: DELETE FROM accounts WHERE accountid = 'checking' AND balance < 1500 RETURNING balance; <waiting ...> +step r2: ROLLBACK; +step d1: <... completed> +balance +------- + 600 +(1 row) + +step c1: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +savings | 600 +(1 row) + + +starting permutation: wx2 wx2 d1 r2 c1 read +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1050 +(1 row) + +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1500 +(1 row) + +step d1: DELETE FROM accounts WHERE accountid = 'checking' AND balance < 1500 RETURNING balance; <waiting ...> +step r2: ROLLBACK; +step d1: <... completed> +balance +------- + 600 +(1 row) + +step c1: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +savings | 600 +(1 row) + + +starting permutation: wx2 d2 d1 r2 c1 read +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1050 +(1 row) + +step d2: DELETE FROM accounts WHERE accountid = 'checking'; +step d1: DELETE FROM accounts WHERE accountid = 'checking' AND balance < 1500 RETURNING balance; <waiting ...> +step r2: ROLLBACK; +step d1: <... completed> +balance +------- + 600 +(1 row) + +step c1: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +savings | 600 +(1 row) + + +starting permutation: d1 wx2 c1 c2 read +step d1: DELETE FROM accounts WHERE accountid = 'checking' AND balance < 1500 RETURNING balance; +balance +------- + 600 +(1 row) + +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; <waiting ...> +step c1: COMMIT; +step wx2: <... completed> +balance +------- +(0 rows) + +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +savings | 600 +(1 row) + + +starting permutation: d1 wx2 r1 c2 read +step d1: DELETE FROM accounts WHERE accountid = 'checking' AND balance < 1500 RETURNING balance; +balance +------- + 600 +(1 row) + +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; <waiting ...> +step r1: ROLLBACK; +step wx2: <... completed> +balance +------- + 1050 +(1 row) + +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 1050 +savings | 600 +(2 rows) + + +starting permutation: wnested2 c1 c2 read +s2: NOTICE: upid: text checking = text checking: t +s2: NOTICE: up: numeric 600 > numeric 200.0: t +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 600 > numeric 200.0: t +s2: NOTICE: upid: text savings = text checking: f +step wnested2: + UPDATE accounts SET balance = balance - 1200 + WHERE noisy_oper('upid', accountid, '=', 'checking') + AND noisy_oper('up', balance, '>', 200.0) + AND EXISTS ( + SELECT accountid + FROM accounts_ext ae + WHERE noisy_oper('lock_id', ae.accountid, '=', accounts.accountid) + AND noisy_oper('lock_bal', ae.balance, '>', 200.0) + FOR UPDATE + ); + +step c1: COMMIT; +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | -600 +savings | 600 +(2 rows) + + +starting permutation: wx1 wxext1 wnested2 c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step wxext1: UPDATE accounts_ext SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +s2: NOTICE: upid: text checking = text checking: t +s2: NOTICE: up: numeric 600 > numeric 200.0: t +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 600 > numeric 200.0: t +step wnested2: + UPDATE accounts SET balance = balance - 1200 + WHERE noisy_oper('upid', accountid, '=', 'checking') + AND noisy_oper('up', balance, '>', 200.0) + AND EXISTS ( + SELECT accountid + FROM accounts_ext ae + WHERE noisy_oper('lock_id', ae.accountid, '=', accounts.accountid) + AND noisy_oper('lock_bal', ae.balance, '>', 200.0) + FOR UPDATE + ); + <waiting ...> +step c1: COMMIT; +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 400 > numeric 200.0: t +s2: NOTICE: upid: text checking = text checking: t +s2: NOTICE: up: numeric 400 > numeric 200.0: t +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 600 > numeric 200.0: t +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 400 > numeric 200.0: t +s2: NOTICE: upid: text savings = text checking: f +step wnested2: <... completed> +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | -800 +savings | 600 +(2 rows) + + +starting permutation: wx1 wx1 wxext1 wnested2 c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 200 +(1 row) + +step wxext1: UPDATE accounts_ext SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +s2: NOTICE: upid: text checking = text checking: t +s2: NOTICE: up: numeric 600 > numeric 200.0: t +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 600 > numeric 200.0: t +step wnested2: + UPDATE accounts SET balance = balance - 1200 + WHERE noisy_oper('upid', accountid, '=', 'checking') + AND noisy_oper('up', balance, '>', 200.0) + AND EXISTS ( + SELECT accountid + FROM accounts_ext ae + WHERE noisy_oper('lock_id', ae.accountid, '=', accounts.accountid) + AND noisy_oper('lock_bal', ae.balance, '>', 200.0) + FOR UPDATE + ); + <waiting ...> +step c1: COMMIT; +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 400 > numeric 200.0: t +s2: NOTICE: upid: text checking = text checking: t +s2: NOTICE: up: numeric 200 > numeric 200.0: f +s2: NOTICE: upid: text savings = text checking: f +step wnested2: <... completed> +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 200 +savings | 600 +(2 rows) + + +starting permutation: wx1 wx1 wxext1 wxext1 wnested2 c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 200 +(1 row) + +step wxext1: UPDATE accounts_ext SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step wxext1: UPDATE accounts_ext SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 200 +(1 row) + +s2: NOTICE: upid: text checking = text checking: t +s2: NOTICE: up: numeric 600 > numeric 200.0: t +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 600 > numeric 200.0: t +step wnested2: + UPDATE accounts SET balance = balance - 1200 + WHERE noisy_oper('upid', accountid, '=', 'checking') + AND noisy_oper('up', balance, '>', 200.0) + AND EXISTS ( + SELECT accountid + FROM accounts_ext ae + WHERE noisy_oper('lock_id', ae.accountid, '=', accounts.accountid) + AND noisy_oper('lock_bal', ae.balance, '>', 200.0) + FOR UPDATE + ); + <waiting ...> +step c1: COMMIT; +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 200 > numeric 200.0: f +s2: NOTICE: lock_id: text savings = text checking: f +s2: NOTICE: upid: text savings = text checking: f +step wnested2: <... completed> +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 200 +savings | 600 +(2 rows) + + +starting permutation: wx1 wxext1 wxext1 wnested2 c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step wxext1: UPDATE accounts_ext SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step wxext1: UPDATE accounts_ext SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 200 +(1 row) + +s2: NOTICE: upid: text checking = text checking: t +s2: NOTICE: up: numeric 600 > numeric 200.0: t +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 600 > numeric 200.0: t +step wnested2: + UPDATE accounts SET balance = balance - 1200 + WHERE noisy_oper('upid', accountid, '=', 'checking') + AND noisy_oper('up', balance, '>', 200.0) + AND EXISTS ( + SELECT accountid + FROM accounts_ext ae + WHERE noisy_oper('lock_id', ae.accountid, '=', accounts.accountid) + AND noisy_oper('lock_bal', ae.balance, '>', 200.0) + FOR UPDATE + ); + <waiting ...> +step c1: COMMIT; +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 200 > numeric 200.0: f +s2: NOTICE: lock_id: text savings = text checking: f +s2: NOTICE: upid: text savings = text checking: f +step wnested2: <... completed> +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 400 +savings | 600 +(2 rows) + + +starting permutation: wx1 tocds1 wnested2 c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step tocds1: UPDATE accounts SET accountid = 'cds' WHERE accountid = 'checking'; +s2: NOTICE: upid: text checking = text checking: t +s2: NOTICE: up: numeric 600 > numeric 200.0: t +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 600 > numeric 200.0: t +step wnested2: + UPDATE accounts SET balance = balance - 1200 + WHERE noisy_oper('upid', accountid, '=', 'checking') + AND noisy_oper('up', balance, '>', 200.0) + AND EXISTS ( + SELECT accountid + FROM accounts_ext ae + WHERE noisy_oper('lock_id', ae.accountid, '=', accounts.accountid) + AND noisy_oper('lock_bal', ae.balance, '>', 200.0) + FOR UPDATE + ); + <waiting ...> +step c1: COMMIT; +s2: NOTICE: upid: text cds = text checking: f +s2: NOTICE: upid: text savings = text checking: f +step wnested2: <... completed> +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +cds | 400 +savings | 600 +(2 rows) + + +starting permutation: wx1 tocdsext1 wnested2 c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step tocdsext1: UPDATE accounts_ext SET accountid = 'cds' WHERE accountid = 'checking'; +s2: NOTICE: upid: text checking = text checking: t +s2: NOTICE: up: numeric 600 > numeric 200.0: t +s2: NOTICE: lock_id: text checking = text checking: t +s2: NOTICE: lock_bal: numeric 600 > numeric 200.0: t +step wnested2: + UPDATE accounts SET balance = balance - 1200 + WHERE noisy_oper('upid', accountid, '=', 'checking') + AND noisy_oper('up', balance, '>', 200.0) + AND EXISTS ( + SELECT accountid + FROM accounts_ext ae + WHERE noisy_oper('lock_id', ae.accountid, '=', accounts.accountid) + AND noisy_oper('lock_bal', ae.balance, '>', 200.0) + FOR UPDATE + ); + <waiting ...> +step c1: COMMIT; +s2: NOTICE: lock_id: text cds = text checking: f +s2: NOTICE: lock_id: text savings = text checking: f +s2: NOTICE: upid: text savings = text checking: f +step wnested2: <... completed> +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 400 +savings | 600 +(2 rows) + + +starting permutation: wx1 updwcte c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step updwcte: WITH doup AS (UPDATE accounts SET balance = balance + 1100 WHERE accountid = 'checking' RETURNING *) UPDATE accounts a SET balance = doup.balance + 100 FROM doup RETURNING *; <waiting ...> +step c1: COMMIT; +step updwcte: <... completed> +accountid|balance|accountid|balance +---------+-------+---------+------- +savings | 1600|checking | 1500 +(1 row) + +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 1500 +savings | 1600 +(2 rows) + + +starting permutation: wx1 updwctefail c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step updwctefail: WITH doup AS (UPDATE accounts SET balance = balance + 1100 WHERE accountid = 'checking' RETURNING *, update_checking(999)) UPDATE accounts a SET balance = doup.balance + 100 FROM doup RETURNING *; <waiting ...> +step c1: COMMIT; +step updwctefail: <... completed> +ERROR: tuple to be updated was already modified by an operation triggered by the current command +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 400 +savings | 600 +(2 rows) + + +starting permutation: wx1 delwcte c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step delwcte: WITH doup AS (UPDATE accounts SET balance = balance + 1100 WHERE accountid = 'checking' RETURNING *) DELETE FROM accounts a USING doup RETURNING *; <waiting ...> +step c1: COMMIT; +step delwcte: <... completed> +accountid|balance|accountid|balance +---------+-------+---------+------- +savings | 600|checking | 1500 +(1 row) + +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 1500 +(1 row) + + +starting permutation: wx1 delwctefail c1 c2 read +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 400 +(1 row) + +step delwctefail: WITH doup AS (UPDATE accounts SET balance = balance + 1100 WHERE accountid = 'checking' RETURNING *, update_checking(999)) DELETE FROM accounts a USING doup RETURNING *; <waiting ...> +step c1: COMMIT; +step delwctefail: <... completed> +ERROR: tuple to be deleted was already modified by an operation triggered by the current command +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 400 +savings | 600 +(2 rows) + + +starting permutation: upsert1 upsert2 c1 c2 read +step upsert1: + WITH upsert AS + (UPDATE accounts SET balance = balance + 500 + WHERE accountid = 'savings' + RETURNING accountid) + INSERT INTO accounts SELECT 'savings', 500 + WHERE NOT EXISTS (SELECT 1 FROM upsert); + +step upsert2: + WITH upsert AS + (UPDATE accounts SET balance = balance + 1234 + WHERE accountid = 'savings' + RETURNING accountid) + INSERT INTO accounts SELECT 'savings', 1234 + WHERE NOT EXISTS (SELECT 1 FROM upsert); + <waiting ...> +step c1: COMMIT; +step upsert2: <... completed> +step c2: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 600 +savings | 2334 +(2 rows) + + +starting permutation: readp1 writep1 readp2 c1 c2 +step readp1: SELECT tableoid::regclass, ctid, * FROM p WHERE b IN (0, 1) AND c = 0 FOR UPDATE; +tableoid|ctid |a|b|c +--------+-----+-+-+- +c1 |(0,1)|0|0|0 +c1 |(0,4)|0|1|0 +c2 |(0,1)|1|0|0 +c2 |(0,4)|1|1|0 +c3 |(0,1)|2|0|0 +c3 |(0,4)|2|1|0 +(6 rows) + +step writep1: UPDATE p SET b = -1 WHERE a = 1 AND b = 1 AND c = 0; +step readp2: SELECT tableoid::regclass, ctid, * FROM p WHERE b IN (0, 1) AND c = 0 FOR UPDATE; <waiting ...> +step c1: COMMIT; +step readp2: <... completed> +tableoid|ctid |a|b|c +--------+-----+-+-+- +c1 |(0,1)|0|0|0 +c1 |(0,4)|0|1|0 +c2 |(0,1)|1|0|0 +c3 |(0,1)|2|0|0 +c3 |(0,4)|2|1|0 +(5 rows) + +step c2: COMMIT; + +starting permutation: writep2 returningp1 c1 c2 +step writep2: UPDATE p SET b = -b WHERE a = 1 AND c = 0; +step returningp1: + WITH u AS ( UPDATE p SET b = b WHERE a > 0 RETURNING * ) + SELECT * FROM u; + <waiting ...> +step c1: COMMIT; +step returningp1: <... completed> +a| b|c +-+--+- +1| 0|0 +1| 0|1 +1| 0|2 +1|-1|0 +1| 1|1 +1| 1|2 +1|-2|0 +1| 2|1 +1| 2|2 +1|-3|0 +2| 0|0 +2| 0|1 +2| 0|2 +2| 1|0 +2| 1|1 +2| 1|2 +2| 2|0 +2| 2|1 +2| 2|2 +2| 3|0 +(20 rows) + +step c2: COMMIT; + +starting permutation: writep3a writep3b c1 c2 +step writep3a: UPDATE p SET b = -b WHERE c = 0; +step writep3b: UPDATE p SET b = -b WHERE c = 0; <waiting ...> +step c1: COMMIT; +step writep3b: <... completed> +step c2: COMMIT; + +starting permutation: wx2 partiallock c2 c1 read +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1050 +(1 row) + +step partiallock: + SELECT * FROM accounts a1, accounts a2 + WHERE a1.accountid = a2.accountid + FOR UPDATE OF a1; + <waiting ...> +step c2: COMMIT; +step partiallock: <... completed> +accountid|balance|accountid|balance +---------+-------+---------+------- +checking | 1050|checking | 600 +savings | 600|savings | 600 +(2 rows) + +step c1: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 1050 +savings | 600 +(2 rows) + + +starting permutation: wx2 lockwithvalues c2 c1 read +step wx2: UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; +balance +------- + 1050 +(1 row) + +step lockwithvalues: + -- Reference rowmark column that differs in type from targetlist at some attno. + -- See CAHU7rYZo_C4ULsAx_LAj8az9zqgrD8WDd4hTegDTMM1LMqrBsg@mail.gmail.com + SELECT a1.*, v.id FROM accounts a1, (values('checking'::text, 'nan'::text),('savings', 'nan')) v(id, notnumeric) + WHERE a1.accountid = v.id AND v.notnumeric != 'einszwei' + FOR UPDATE OF a1; + <waiting ...> +step c2: COMMIT; +step lockwithvalues: <... completed> +accountid|balance|id +---------+-------+-------- +checking | 1050|checking +savings | 600|savings +(2 rows) + +step c1: COMMIT; +step read: SELECT * FROM accounts ORDER BY accountid; +accountid|balance +---------+------- +checking | 1050 +savings | 600 +(2 rows) + + +starting permutation: wx2_ext partiallock_ext c2 c1 read_ext +step wx2_ext: UPDATE accounts_ext SET balance = balance + 450; +step partiallock_ext: + SELECT * FROM accounts_ext a1, accounts_ext a2 + WHERE a1.accountid = a2.accountid + FOR UPDATE OF a1; + <waiting ...> +step c2: COMMIT; +step partiallock_ext: <... completed> +accountid|balance|other|newcol|newcol2|accountid|balance|other|newcol|newcol2 +---------+-------+-----+------+-------+---------+-------+-----+------+------- +checking | 1050|other| 42| |checking | 600|other| 42| +savings | 1150| | 42| |savings | 700| | 42| +(2 rows) + +step c1: COMMIT; +step read_ext: SELECT * FROM accounts_ext ORDER BY accountid; +accountid|balance|other|newcol|newcol2 +---------+-------+-----+------+------- +checking | 1050|other| 42| +savings | 1150| | 42| +(2 rows) + + +starting permutation: updateforss readforss c1 c2 +step updateforss: + UPDATE table_a SET value = 'newTableAValue' WHERE id = 1; + UPDATE table_b SET value = 'newTableBValue' WHERE id = 1; + +step readforss: + SELECT ta.id AS ta_id, ta.value AS ta_value, + (SELECT ROW(tb.id, tb.value) + FROM table_b tb WHERE ta.id = tb.id) AS tb_row + FROM table_a ta + WHERE ta.id = 1 FOR UPDATE OF ta; + <waiting ...> +step c1: COMMIT; +step readforss: <... completed> +ta_id|ta_value |tb_row +-----+--------------+--------------- + 1|newTableAValue|(1,tableBValue) +(1 row) + +step c2: COMMIT; + +starting permutation: updateforcip updateforcip2 c1 c2 read_a +step updateforcip: + UPDATE table_a SET value = NULL WHERE id = 1; + +step updateforcip2: + UPDATE table_a SET value = COALESCE(value, (SELECT text 'newValue')) WHERE id = 1; + <waiting ...> +step c1: COMMIT; +step updateforcip2: <... completed> +step c2: COMMIT; +step read_a: SELECT * FROM table_a ORDER BY id; +id|value +--+-------- + 1|newValue +(1 row) + + +starting permutation: updateforcip updateforcip3 c1 c2 read_a +step updateforcip: + UPDATE table_a SET value = NULL WHERE id = 1; + +step updateforcip3: + WITH d(val) AS (SELECT text 'newValue' FROM generate_series(1,1)) + UPDATE table_a SET value = COALESCE(value, (SELECT val FROM d)) WHERE id = 1; + <waiting ...> +step c1: COMMIT; +step updateforcip3: <... completed> +step c2: COMMIT; +step read_a: SELECT * FROM table_a ORDER BY id; +id|value +--+-------- + 1|newValue +(1 row) + + +starting permutation: wrtwcte readwcte c1 c2 +step wrtwcte: UPDATE table_a SET value = 'tableAValue2' WHERE id = 1; +step readwcte: + WITH + cte1 AS ( + SELECT id FROM table_b WHERE value = 'tableBValue' + ), + cte2 AS ( + SELECT * FROM table_a + WHERE id = (SELECT id FROM cte1) + FOR UPDATE + ) + SELECT * FROM cte2; + <waiting ...> +step c1: COMMIT; +step c2: COMMIT; +step readwcte: <... completed> +id|value +--+------------ + 1|tableAValue2 +(1 row) + + +starting permutation: wrjt selectjoinforupdate c2 c1 +step wrjt: UPDATE jointest SET data = 42 WHERE id = 7; +step selectjoinforupdate: + set local enable_nestloop to 0; + set local enable_hashjoin to 0; + set local enable_seqscan to 0; + explain (costs off) + select * from jointest a join jointest b on a.id=b.id for update; + select * from jointest a join jointest b on a.id=b.id for update; + <waiting ...> +step c2: COMMIT; +step selectjoinforupdate: <... completed> +QUERY PLAN +---------------------------------------------------------- +LockRows + -> Merge Join + Merge Cond: (a.id = b.id) + -> Index Scan using jointest_id_idx on jointest a + -> Index Scan using jointest_id_idx on jointest b +(5 rows) + +id|data|id|data +--+----+--+---- + 1| 0| 1| 0 + 2| 0| 2| 0 + 3| 0| 3| 0 + 4| 0| 4| 0 + 5| 0| 5| 0 + 6| 0| 6| 0 + 7| 42| 7| 42 + 8| 0| 8| 0 + 9| 0| 9| 0 +10| 0|10| 0 +(10 rows) + +step c1: COMMIT; + +starting permutation: wrjt selectresultforupdate c2 c1 +step wrjt: UPDATE jointest SET data = 42 WHERE id = 7; +step selectresultforupdate: + select * from (select 1 as x) ss1 join (select 7 as y) ss2 on true + left join table_a a on a.id = x, jointest jt + where jt.id = y; + explain (verbose, costs off) + select * from (select 1 as x) ss1 join (select 7 as y) ss2 on true + left join table_a a on a.id = x, jointest jt + where jt.id = y for update of jt, ss1, ss2; + select * from (select 1 as x) ss1 join (select 7 as y) ss2 on true + left join table_a a on a.id = x, jointest jt + where jt.id = y for update of jt, ss1, ss2; + <waiting ...> +step c2: COMMIT; +step selectresultforupdate: <... completed> +x|y|id|value |id|data +-+-+--+-----------+--+---- +1|7| 1|tableAValue| 7| 0 +(1 row) + +QUERY PLAN +-------------------------------------------------------------------- +LockRows + Output: 1, 7, a.id, a.value, jt.id, jt.data, jt.ctid, a.ctid + -> Nested Loop Left Join + Output: 1, 7, a.id, a.value, jt.id, jt.data, jt.ctid, a.ctid + -> Nested Loop + Output: jt.id, jt.data, jt.ctid + -> Seq Scan on public.jointest jt + Output: jt.id, jt.data, jt.ctid + Filter: (jt.id = 7) + -> Result + -> Seq Scan on public.table_a a + Output: a.id, a.value, a.ctid + Filter: (a.id = 1) +(13 rows) + +x|y|id|value |id|data +-+-+--+-----------+--+---- +1|7| 1|tableAValue| 7| 42 +(1 row) + +step c1: COMMIT; + +starting permutation: wrtwcte multireadwcte c1 c2 +step wrtwcte: UPDATE table_a SET value = 'tableAValue2' WHERE id = 1; +step multireadwcte: + WITH updated AS ( + UPDATE table_a SET value = 'tableAValue3' WHERE id = 1 RETURNING id + ) + SELECT (SELECT id FROM updated) AS subid, * FROM updated; + <waiting ...> +step c1: COMMIT; +step c2: COMMIT; +step multireadwcte: <... completed> +subid|id +-----+-- + 1| 1 +(1 row) + + +starting permutation: simplepartupdate complexpartupdate c1 c2 +step simplepartupdate: + update parttbl set a = a; + +step complexpartupdate: + with u as (update parttbl set a = a returning parttbl.*) + update parttbl set a = u.a from u; + <waiting ...> +step c1: COMMIT; +step complexpartupdate: <... completed> +step c2: COMMIT; + +starting permutation: simplepartupdate_route1to2 complexpartupdate_route_err1 c1 c2 +step simplepartupdate_route1to2: + update parttbl set a = 2 where c = 1 returning *; + +a|b|c +-+-+- +2|1|1 +(1 row) + +step complexpartupdate_route_err1: + with u as (update another_parttbl set a = 1 returning another_parttbl.*) + update parttbl p set a = u.a from u where p.a = u.a and p.c = 1 returning p.*; + <waiting ...> +step c1: COMMIT; +step complexpartupdate_route_err1: <... completed> +ERROR: tuple to be locked was already moved to another partition due to concurrent update +step c2: COMMIT; + +starting permutation: simplepartupdate_noroute complexpartupdate_route c1 c2 +step simplepartupdate_noroute: + update parttbl set b = 2 where c = 1 returning *; + +a|b|c +-+-+- +1|2|1 +(1 row) + +step complexpartupdate_route: + with u as (update another_parttbl set a = 1 returning another_parttbl.*) + update parttbl p set a = p.b from u where p.a = u.a and p.c = 1 returning p.*; + <waiting ...> +step c1: COMMIT; +step complexpartupdate_route: <... completed> +a|b|c +-+-+- +2|2|1 +(1 row) + +step c2: COMMIT; + +starting permutation: simplepartupdate_noroute complexpartupdate_doesnt_route c1 c2 +step simplepartupdate_noroute: + update parttbl set b = 2 where c = 1 returning *; + +a|b|c +-+-+- +1|2|1 +(1 row) + +step complexpartupdate_doesnt_route: + with u as (update another_parttbl set a = 1 returning another_parttbl.*) + update parttbl p set a = 3 - p.b from u where p.a = u.a and p.c = 1 returning p.*; + <waiting ...> +step c1: COMMIT; +step complexpartupdate_doesnt_route: <... completed> +a|b|c +-+-+- +1|2|1 +(1 row) + +step c2: COMMIT; diff --git a/src/test/isolation/expected/fk-contention.out b/src/test/isolation/expected/fk-contention.out new file mode 100644 index 0000000..0916f7f --- /dev/null +++ b/src/test/isolation/expected/fk-contention.out @@ -0,0 +1,16 @@ +Parsed test spec with 2 sessions + +starting permutation: ins com upd +step ins: INSERT INTO bar VALUES (42); +step com: COMMIT; +step upd: UPDATE foo SET b = 'Hello World'; + +starting permutation: ins upd com +step ins: INSERT INTO bar VALUES (42); +step upd: UPDATE foo SET b = 'Hello World'; +step com: COMMIT; + +starting permutation: upd ins com +step upd: UPDATE foo SET b = 'Hello World'; +step ins: INSERT INTO bar VALUES (42); +step com: COMMIT; diff --git a/src/test/isolation/expected/fk-deadlock.out b/src/test/isolation/expected/fk-deadlock.out new file mode 100644 index 0000000..ce6ef8c --- /dev/null +++ b/src/test/isolation/expected/fk-deadlock.out @@ -0,0 +1,119 @@ +Parsed test spec with 2 sessions + +starting permutation: s1i s1u s1c s2i s2u s2c +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s1c: COMMIT; +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s2c: COMMIT; + +starting permutation: s1i s1u s2i s1c s2u s2c +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s2i: INSERT INTO child VALUES (2, 1); +step s1c: COMMIT; +step s2u: UPDATE parent SET aux = 'baz'; +step s2c: COMMIT; + +starting permutation: s1i s1u s2i s2u s1c s2c +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; <waiting ...> +step s1c: COMMIT; +step s2u: <... completed> +step s2c: COMMIT; + +starting permutation: s1i s2i s1u s1c s2u s2c +step s1i: INSERT INTO child VALUES (1, 1); +step s2i: INSERT INTO child VALUES (2, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s1c: COMMIT; +step s2u: UPDATE parent SET aux = 'baz'; +step s2c: COMMIT; + +starting permutation: s1i s2i s1u s2u s1c s2c +step s1i: INSERT INTO child VALUES (1, 1); +step s2i: INSERT INTO child VALUES (2, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s2u: UPDATE parent SET aux = 'baz'; <waiting ...> +step s1c: COMMIT; +step s2u: <... completed> +step s2c: COMMIT; + +starting permutation: s1i s2i s2u s1u s2c s1c +step s1i: INSERT INTO child VALUES (1, 1); +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s1u: UPDATE parent SET aux = 'bar'; <waiting ...> +step s2c: COMMIT; +step s1u: <... completed> +step s1c: COMMIT; + +starting permutation: s1i s2i s2u s2c s1u s1c +step s1i: INSERT INTO child VALUES (1, 1); +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s2c: COMMIT; +step s1u: UPDATE parent SET aux = 'bar'; +step s1c: COMMIT; + +starting permutation: s2i s1i s1u s1c s2u s2c +step s2i: INSERT INTO child VALUES (2, 1); +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s1c: COMMIT; +step s2u: UPDATE parent SET aux = 'baz'; +step s2c: COMMIT; + +starting permutation: s2i s1i s1u s2u s1c s2c +step s2i: INSERT INTO child VALUES (2, 1); +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s2u: UPDATE parent SET aux = 'baz'; <waiting ...> +step s1c: COMMIT; +step s2u: <... completed> +step s2c: COMMIT; + +starting permutation: s2i s1i s2u s1u s2c s1c +step s2i: INSERT INTO child VALUES (2, 1); +step s1i: INSERT INTO child VALUES (1, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s1u: UPDATE parent SET aux = 'bar'; <waiting ...> +step s2c: COMMIT; +step s1u: <... completed> +step s1c: COMMIT; + +starting permutation: s2i s1i s2u s2c s1u s1c +step s2i: INSERT INTO child VALUES (2, 1); +step s1i: INSERT INTO child VALUES (1, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s2c: COMMIT; +step s1u: UPDATE parent SET aux = 'bar'; +step s1c: COMMIT; + +starting permutation: s2i s2u s1i s1u s2c s1c +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; <waiting ...> +step s2c: COMMIT; +step s1u: <... completed> +step s1c: COMMIT; + +starting permutation: s2i s2u s1i s2c s1u s1c +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s1i: INSERT INTO child VALUES (1, 1); +step s2c: COMMIT; +step s1u: UPDATE parent SET aux = 'bar'; +step s1c: COMMIT; + +starting permutation: s2i s2u s2c s1i s1u s1c +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s2c: COMMIT; +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s1c: COMMIT; diff --git a/src/test/isolation/expected/fk-deadlock2.out b/src/test/isolation/expected/fk-deadlock2.out new file mode 100644 index 0000000..41a818d --- /dev/null +++ b/src/test/isolation/expected/fk-deadlock2.out @@ -0,0 +1,95 @@ +Parsed test spec with 2 sessions + +starting permutation: s1u1 s1u2 s1c s2u1 s2u2 s2c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1c: COMMIT; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; + +starting permutation: s1u1 s1u2 s2u1 s1c s2u2 s2c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s1c: COMMIT; +step s2u1: <... completed> +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; + +starting permutation: s1u1 s2u1 s1u2 s2u2 s2c s1c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: <... completed> +step s1c: COMMIT; + +starting permutation: s1u1 s2u1 s2u2 s1u2 s2c s1c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2c: COMMIT; +step s1u2: <... completed> +step s1c: COMMIT; + +starting permutation: s1u1 s2u1 s2u2 s2c s1u2 s1c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1c: COMMIT; + +starting permutation: s2u1 s1u1 s1u2 s2u2 s2c s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: <... completed> +step s1c: COMMIT; + +starting permutation: s2u1 s1u1 s2u2 s1u2 s2c s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2c: COMMIT; +step s1u2: <... completed> +step s1c: COMMIT; + +starting permutation: s2u1 s1u1 s2u2 s2c s1u2 s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1c: COMMIT; + +starting permutation: s2u1 s2u2 s1u1 s1u2 s2c s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2c: COMMIT; +step s1u2: <... completed> +step s1c: COMMIT; + +starting permutation: s2u1 s2u2 s1u1 s2c s1u2 s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2c: COMMIT; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1c: COMMIT; + +starting permutation: s2u1 s2u2 s2c s1u1 s1u2 s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1c: COMMIT; diff --git a/src/test/isolation/expected/fk-deadlock2_1.out b/src/test/isolation/expected/fk-deadlock2_1.out new file mode 100644 index 0000000..e1d8c69 --- /dev/null +++ b/src/test/isolation/expected/fk-deadlock2_1.out @@ -0,0 +1,105 @@ +Parsed test spec with 2 sessions + +starting permutation: s1u1 s1u2 s1c s2u1 s2u2 s2c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1c: COMMIT; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; + +starting permutation: s1u1 s1u2 s2u1 s1c s2u2 s2c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s1c: COMMIT; +step s2u1: <... completed> +ERROR: could not serialize access due to concurrent update +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +ERROR: current transaction is aborted, commands ignored until end of transaction block +step s2c: COMMIT; + +starting permutation: s1u1 s2u1 s1u2 s2u2 s2c s1c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s1u1 s2u1 s2u2 s1u2 s2c s1c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2c: COMMIT; +step s1u2: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s1u1 s2u1 s2u2 s2c s1u2 s1c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +ERROR: could not serialize access due to read/write dependencies among transactions +step s1c: COMMIT; + +starting permutation: s2u1 s1u1 s1u2 s2u2 s2c s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2u1 s1u1 s2u2 s1u2 s2c s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2c: COMMIT; +step s1u2: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2u1 s1u1 s2u2 s2c s1u2 s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +ERROR: could not serialize access due to read/write dependencies among transactions +step s1c: COMMIT; + +starting permutation: s2u1 s2u2 s1u1 s1u2 s2c s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2c: COMMIT; +step s1u2: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2u1 s2u2 s1u1 s2c s1u2 s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2c: COMMIT; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +ERROR: could not serialize access due to read/write dependencies among transactions +step s1c: COMMIT; + +starting permutation: s2u1 s2u2 s2c s1u1 s1u2 s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1c: COMMIT; diff --git a/src/test/isolation/expected/fk-deadlock2_2.out b/src/test/isolation/expected/fk-deadlock2_2.out new file mode 100644 index 0000000..9787370 --- /dev/null +++ b/src/test/isolation/expected/fk-deadlock2_2.out @@ -0,0 +1,105 @@ +Parsed test spec with 2 sessions + +starting permutation: s1u1 s1u2 s1c s2u1 s2u2 s2c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1c: COMMIT; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; + +starting permutation: s1u1 s1u2 s2u1 s1c s2u2 s2c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s1c: COMMIT; +step s2u1: <... completed> +ERROR: could not serialize access due to concurrent update +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +ERROR: current transaction is aborted, commands ignored until end of transaction block +step s2c: COMMIT; + +starting permutation: s1u1 s2u1 s1u2 s2u2 s2c s1c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s1u1 s2u1 s2u2 s1u2 s2c s1c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2c: COMMIT; +step s1u2: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s1u1 s2u1 s2u2 s2c s1u2 s1c +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2u1 s1u1 s1u2 s2u2 s2c s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2u1 s1u1 s2u2 s1u2 s2c s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2c: COMMIT; +step s1u2: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2u1 s1u1 s2u2 s2c s1u2 s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2u1 s2u2 s1u1 s1u2 s2c s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; <waiting ...> +step s2c: COMMIT; +step s1u2: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2u1 s2u2 s1u1 s2c s1u2 s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s2c: COMMIT; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2u1 s2u2 s2c s1u1 s1u2 s1c +step s2u1: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s2c: COMMIT; +step s1u1: UPDATE A SET Col1 = 1 WHERE AID = 1; +step s1u2: UPDATE B SET Col2 = 1 WHERE BID = 2; +step s1c: COMMIT; diff --git a/src/test/isolation/expected/fk-deadlock_1.out b/src/test/isolation/expected/fk-deadlock_1.out new file mode 100644 index 0000000..c951692 --- /dev/null +++ b/src/test/isolation/expected/fk-deadlock_1.out @@ -0,0 +1,131 @@ +Parsed test spec with 2 sessions + +starting permutation: s1i s1u s1c s2i s2u s2c +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s1c: COMMIT; +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s2c: COMMIT; + +starting permutation: s1i s1u s2i s1c s2u s2c +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s2i: INSERT INTO child VALUES (2, 1); +step s1c: COMMIT; +step s2u: UPDATE parent SET aux = 'baz'; +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; + +starting permutation: s1i s1u s2i s2u s1c s2c +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; <waiting ...> +step s1c: COMMIT; +step s2u: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; + +starting permutation: s1i s2i s1u s1c s2u s2c +step s1i: INSERT INTO child VALUES (1, 1); +step s2i: INSERT INTO child VALUES (2, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s1c: COMMIT; +step s2u: UPDATE parent SET aux = 'baz'; +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; + +starting permutation: s1i s2i s1u s2u s1c s2c +step s1i: INSERT INTO child VALUES (1, 1); +step s2i: INSERT INTO child VALUES (2, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s2u: UPDATE parent SET aux = 'baz'; <waiting ...> +step s1c: COMMIT; +step s2u: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; + +starting permutation: s1i s2i s2u s1u s2c s1c +step s1i: INSERT INTO child VALUES (1, 1); +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s1u: UPDATE parent SET aux = 'bar'; <waiting ...> +step s2c: COMMIT; +step s1u: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s1i s2i s2u s2c s1u s1c +step s1i: INSERT INTO child VALUES (1, 1); +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s2c: COMMIT; +step s1u: UPDATE parent SET aux = 'bar'; +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2i s1i s1u s1c s2u s2c +step s2i: INSERT INTO child VALUES (2, 1); +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s1c: COMMIT; +step s2u: UPDATE parent SET aux = 'baz'; +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; + +starting permutation: s2i s1i s1u s2u s1c s2c +step s2i: INSERT INTO child VALUES (2, 1); +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s2u: UPDATE parent SET aux = 'baz'; <waiting ...> +step s1c: COMMIT; +step s2u: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; + +starting permutation: s2i s1i s2u s1u s2c s1c +step s2i: INSERT INTO child VALUES (2, 1); +step s1i: INSERT INTO child VALUES (1, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s1u: UPDATE parent SET aux = 'bar'; <waiting ...> +step s2c: COMMIT; +step s1u: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2i s1i s2u s2c s1u s1c +step s2i: INSERT INTO child VALUES (2, 1); +step s1i: INSERT INTO child VALUES (1, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s2c: COMMIT; +step s1u: UPDATE parent SET aux = 'bar'; +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2i s2u s1i s1u s2c s1c +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; <waiting ...> +step s2c: COMMIT; +step s1u: <... completed> +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2i s2u s1i s2c s1u s1c +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s1i: INSERT INTO child VALUES (1, 1); +step s2c: COMMIT; +step s1u: UPDATE parent SET aux = 'bar'; +ERROR: could not serialize access due to concurrent update +step s1c: COMMIT; + +starting permutation: s2i s2u s2c s1i s1u s1c +step s2i: INSERT INTO child VALUES (2, 1); +step s2u: UPDATE parent SET aux = 'baz'; +step s2c: COMMIT; +step s1i: INSERT INTO child VALUES (1, 1); +step s1u: UPDATE parent SET aux = 'bar'; +step s1c: COMMIT; diff --git a/src/test/isolation/expected/fk-partitioned-1.out b/src/test/isolation/expected/fk-partitioned-1.out new file mode 100644 index 0000000..45f2f8c --- /dev/null +++ b/src/test/isolation/expected/fk-partitioned-1.out @@ -0,0 +1,133 @@ +Parsed test spec with 2 sessions + +starting permutation: s1b s1d s1c s2b s2a s2c +step s1b: begin; +step s1d: delete from ppk1 where a = 1; +step s1c: commit; +step s2b: begin; +step s2a: alter table pfk attach partition pfk1 for values in (1); +ERROR: insert or update on table "pfk1" violates foreign key constraint "pfk_a_fkey" +step s2c: commit; + +starting permutation: s1b s1d s2b s1c s2a s2c +step s1b: begin; +step s1d: delete from ppk1 where a = 1; +step s2b: begin; +step s1c: commit; +step s2a: alter table pfk attach partition pfk1 for values in (1); +ERROR: insert or update on table "pfk1" violates foreign key constraint "pfk_a_fkey" +step s2c: commit; + +starting permutation: s1b s1d s2b s2a s1c s2c +step s1b: begin; +step s1d: delete from ppk1 where a = 1; +step s2b: begin; +step s2a: alter table pfk attach partition pfk1 for values in (1); <waiting ...> +step s1c: commit; +step s2a: <... completed> +ERROR: insert or update on table "pfk1" violates foreign key constraint "pfk_a_fkey" +step s2c: commit; + +starting permutation: s1b s2b s1d s1c s2a s2c +step s1b: begin; +step s2b: begin; +step s1d: delete from ppk1 where a = 1; +step s1c: commit; +step s2a: alter table pfk attach partition pfk1 for values in (1); +ERROR: insert or update on table "pfk1" violates foreign key constraint "pfk_a_fkey" +step s2c: commit; + +starting permutation: s1b s2b s1d s2a s1c s2c +step s1b: begin; +step s2b: begin; +step s1d: delete from ppk1 where a = 1; +step s2a: alter table pfk attach partition pfk1 for values in (1); <waiting ...> +step s1c: commit; +step s2a: <... completed> +ERROR: insert or update on table "pfk1" violates foreign key constraint "pfk_a_fkey" +step s2c: commit; + +starting permutation: s1b s2b s2a s1d s2c s1c +step s1b: begin; +step s2b: begin; +step s2a: alter table pfk attach partition pfk1 for values in (1); +step s1d: delete from ppk1 where a = 1; <waiting ...> +step s2c: commit; +step s1d: <... completed> +ERROR: update or delete on table "ppk1" violates foreign key constraint "pfk_a_fkey1" on table "pfk" +step s1c: commit; + +starting permutation: s1b s2b s2a s2c s1d s1c +step s1b: begin; +step s2b: begin; +step s2a: alter table pfk attach partition pfk1 for values in (1); +step s2c: commit; +step s1d: delete from ppk1 where a = 1; +ERROR: update or delete on table "ppk1" violates foreign key constraint "pfk_a_fkey1" on table "pfk" +step s1c: commit; + +starting permutation: s2b s1b s1d s1c s2a s2c +step s2b: begin; +step s1b: begin; +step s1d: delete from ppk1 where a = 1; +step s1c: commit; +step s2a: alter table pfk attach partition pfk1 for values in (1); +ERROR: insert or update on table "pfk1" violates foreign key constraint "pfk_a_fkey" +step s2c: commit; + +starting permutation: s2b s1b s1d s2a s1c s2c +step s2b: begin; +step s1b: begin; +step s1d: delete from ppk1 where a = 1; +step s2a: alter table pfk attach partition pfk1 for values in (1); <waiting ...> +step s1c: commit; +step s2a: <... completed> +ERROR: insert or update on table "pfk1" violates foreign key constraint "pfk_a_fkey" +step s2c: commit; + +starting permutation: s2b s1b s2a s1d s2c s1c +step s2b: begin; +step s1b: begin; +step s2a: alter table pfk attach partition pfk1 for values in (1); +step s1d: delete from ppk1 where a = 1; <waiting ...> +step s2c: commit; +step s1d: <... completed> +ERROR: update or delete on table "ppk1" violates foreign key constraint "pfk_a_fkey1" on table "pfk" +step s1c: commit; + +starting permutation: s2b s1b s2a s2c s1d s1c +step s2b: begin; +step s1b: begin; +step s2a: alter table pfk attach partition pfk1 for values in (1); +step s2c: commit; +step s1d: delete from ppk1 where a = 1; +ERROR: update or delete on table "ppk1" violates foreign key constraint "pfk_a_fkey1" on table "pfk" +step s1c: commit; + +starting permutation: s2b s2a s1b s1d s2c s1c +step s2b: begin; +step s2a: alter table pfk attach partition pfk1 for values in (1); +step s1b: begin; +step s1d: delete from ppk1 where a = 1; <waiting ...> +step s2c: commit; +step s1d: <... completed> +ERROR: update or delete on table "ppk1" violates foreign key constraint "pfk_a_fkey1" on table "pfk" +step s1c: commit; + +starting permutation: s2b s2a s1b s2c s1d s1c +step s2b: begin; +step s2a: alter table pfk attach partition pfk1 for values in (1); +step s1b: begin; +step s2c: commit; +step s1d: delete from ppk1 where a = 1; +ERROR: update or delete on table "ppk1" violates foreign key constraint "pfk_a_fkey1" on table "pfk" +step s1c: commit; + +starting permutation: s2b s2a s2c s1b s1d s1c +step s2b: begin; +step s2a: alter table pfk attach partition pfk1 for values in (1); +step s2c: commit; +step s1b: begin; +step s1d: delete from ppk1 where a = 1; +ERROR: update or delete on table "ppk1" violates foreign key constraint "pfk_a_fkey1" on table "pfk" +step s1c: commit; diff --git a/src/test/isolation/expected/fk-partitioned-2.out b/src/test/isolation/expected/fk-partitioned-2.out new file mode 100644 index 0000000..8c6c714 --- /dev/null +++ b/src/test/isolation/expected/fk-partitioned-2.out @@ -0,0 +1,76 @@ +Parsed test spec with 2 sessions + +starting permutation: s1b s1d s2b s2i s1c s2c +step s1b: begin; +step s1d: delete from ppk where a = 1; +step s2b: begin; +step s2i: insert into pfk values (1); <waiting ...> +step s1c: commit; +step s2i: <... completed> +ERROR: insert or update on table "pfk1" violates foreign key constraint "pfk_a_fkey" +step s2c: commit; + +starting permutation: s1b s1d s2bs s2i s1c s2c +step s1b: begin; +step s1d: delete from ppk where a = 1; +step s2bs: begin isolation level serializable; select 1; +?column? +-------- + 1 +(1 row) + +step s2i: insert into pfk values (1); <waiting ...> +step s1c: commit; +step s2i: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: commit; + +starting permutation: s1b s2b s1d s2i s1c s2c +step s1b: begin; +step s2b: begin; +step s1d: delete from ppk where a = 1; +step s2i: insert into pfk values (1); <waiting ...> +step s1c: commit; +step s2i: <... completed> +ERROR: insert or update on table "pfk1" violates foreign key constraint "pfk_a_fkey" +step s2c: commit; + +starting permutation: s1b s2bs s1d s2i s1c s2c +step s1b: begin; +step s2bs: begin isolation level serializable; select 1; +?column? +-------- + 1 +(1 row) + +step s1d: delete from ppk where a = 1; +step s2i: insert into pfk values (1); <waiting ...> +step s1c: commit; +step s2i: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: commit; + +starting permutation: s1b s2b s2i s1d s2c s1c +step s1b: begin; +step s2b: begin; +step s2i: insert into pfk values (1); +step s1d: delete from ppk where a = 1; <waiting ...> +step s2c: commit; +step s1d: <... completed> +ERROR: update or delete on table "ppk1" violates foreign key constraint "pfk_a_fkey1" on table "pfk" +step s1c: commit; + +starting permutation: s1b s2bs s2i s1d s2c s1c +step s1b: begin; +step s2bs: begin isolation level serializable; select 1; +?column? +-------- + 1 +(1 row) + +step s2i: insert into pfk values (1); +step s1d: delete from ppk where a = 1; <waiting ...> +step s2c: commit; +step s1d: <... completed> +ERROR: update or delete on table "ppk1" violates foreign key constraint "pfk_a_fkey1" on table "pfk" +step s1c: commit; diff --git a/src/test/isolation/expected/freeze-the-dead.out b/src/test/isolation/expected/freeze-the-dead.out new file mode 100644 index 0000000..88678bd --- /dev/null +++ b/src/test/isolation/expected/freeze-the-dead.out @@ -0,0 +1,44 @@ +Parsed test spec with 3 sessions + +starting permutation: s1_begin s2_begin s3_begin s1_update s2_key_share s3_key_share s1_update s1_commit s2_commit s2_vacuum s1_selectone s3_commit s2_vacuum s1_selectall +step s1_begin: BEGIN; +step s2_begin: BEGIN; +step s3_begin: BEGIN; +step s1_update: UPDATE tab_freeze SET x = x + 1 WHERE id = 3; +step s2_key_share: SELECT id FROM tab_freeze WHERE id = 3 FOR KEY SHARE; +id +-- + 3 +(1 row) + +step s3_key_share: SELECT id FROM tab_freeze WHERE id = 3 FOR KEY SHARE; +id +-- + 3 +(1 row) + +step s1_update: UPDATE tab_freeze SET x = x + 1 WHERE id = 3; +step s1_commit: COMMIT; +step s2_commit: COMMIT; +step s2_vacuum: VACUUM FREEZE tab_freeze; +step s1_selectone: + BEGIN; + SET LOCAL enable_seqscan = false; + SET LOCAL enable_bitmapscan = false; + SELECT * FROM tab_freeze WHERE id = 3; + COMMIT; + +id|name|x +--+----+- + 3| 333|2 +(1 row) + +step s3_commit: COMMIT; +step s2_vacuum: VACUUM FREEZE tab_freeze; +step s1_selectall: SELECT * FROM tab_freeze ORDER BY name, id; +id|name|x +--+----+- + 1| 111|0 + 3| 333|2 +(2 rows) + diff --git a/src/test/isolation/expected/horizons.out b/src/test/isolation/expected/horizons.out new file mode 100644 index 0000000..4150b2d --- /dev/null +++ b/src/test/isolation/expected/horizons.out @@ -0,0 +1,335 @@ +Parsed test spec with 2 sessions + +starting permutation: pruner_create_perm ll_start pruner_query_plan pruner_query pruner_query pruner_delete pruner_query pruner_query ll_commit pruner_drop +step pruner_create_perm: + CREATE TABLE horizons_tst (data int unique) WITH (autovacuum_enabled = off); + INSERT INTO horizons_tst(data) VALUES(1),(2); + +step ll_start: + BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; + SELECT 1; + +?column? +-------- + 1 +(1 row) + +step pruner_query_plan: + EXPLAIN (COSTS OFF) SELECT * FROM horizons_tst ORDER BY data; + +QUERY PLAN +----------------------------------------------------------- +Index Only Scan using horizons_tst_data_key on horizons_tst +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_delete: + DELETE FROM horizons_tst; + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step ll_commit: COMMIT; +step pruner_drop: + DROP TABLE horizons_tst; + + +starting permutation: pruner_create_temp ll_start pruner_query_plan pruner_query pruner_query pruner_delete pruner_query pruner_query ll_commit pruner_drop +step pruner_create_temp: + CREATE TEMPORARY TABLE horizons_tst (data int unique) WITH (autovacuum_enabled = off); + INSERT INTO horizons_tst(data) VALUES(1),(2); + +step ll_start: + BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; + SELECT 1; + +?column? +-------- + 1 +(1 row) + +step pruner_query_plan: + EXPLAIN (COSTS OFF) SELECT * FROM horizons_tst ORDER BY data; + +QUERY PLAN +----------------------------------------------------------- +Index Only Scan using horizons_tst_data_key on horizons_tst +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_delete: + DELETE FROM horizons_tst; + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 0 +(1 row) + +step ll_commit: COMMIT; +step pruner_drop: + DROP TABLE horizons_tst; + + +starting permutation: pruner_create_temp ll_start pruner_query pruner_query pruner_begin pruner_delete pruner_query pruner_query ll_commit pruner_commit pruner_drop +step pruner_create_temp: + CREATE TEMPORARY TABLE horizons_tst (data int unique) WITH (autovacuum_enabled = off); + INSERT INTO horizons_tst(data) VALUES(1),(2); + +step ll_start: + BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; + SELECT 1; + +?column? +-------- + 1 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_begin: BEGIN; +step pruner_delete: + DELETE FROM horizons_tst; + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step ll_commit: COMMIT; +step pruner_commit: COMMIT; +step pruner_drop: + DROP TABLE horizons_tst; + + +starting permutation: pruner_create_perm ll_start pruner_query pruner_query pruner_delete pruner_vacuum pruner_query pruner_query ll_commit pruner_drop +step pruner_create_perm: + CREATE TABLE horizons_tst (data int unique) WITH (autovacuum_enabled = off); + INSERT INTO horizons_tst(data) VALUES(1),(2); + +step ll_start: + BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; + SELECT 1; + +?column? +-------- + 1 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_delete: + DELETE FROM horizons_tst; + +step pruner_vacuum: + VACUUM horizons_tst; + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step ll_commit: COMMIT; +step pruner_drop: + DROP TABLE horizons_tst; + + +starting permutation: pruner_create_temp ll_start pruner_query pruner_query pruner_delete pruner_vacuum pruner_query pruner_query ll_commit pruner_drop +step pruner_create_temp: + CREATE TEMPORARY TABLE horizons_tst (data int unique) WITH (autovacuum_enabled = off); + INSERT INTO horizons_tst(data) VALUES(1),(2); + +step ll_start: + BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; + SELECT 1; + +?column? +-------- + 1 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 2 +(1 row) + +step pruner_delete: + DELETE FROM horizons_tst; + +step pruner_vacuum: + VACUUM horizons_tst; + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 0 +(1 row) + +step pruner_query: + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; + +?column? +-------- + 0 +(1 row) + +step ll_commit: COMMIT; +step pruner_drop: + DROP TABLE horizons_tst; + diff --git a/src/test/isolation/expected/index-only-scan.out b/src/test/isolation/expected/index-only-scan.out new file mode 100644 index 0000000..47983eb --- /dev/null +++ b/src/test/isolation/expected/index-only-scan.out @@ -0,0 +1,41 @@ +Parsed test spec with 2 sessions + +starting permutation: rxwy1 c1 rywx2 c2 +step rxwy1: DELETE FROM taby WHERE id = (SELECT min(id) FROM tabx); +step c1: COMMIT; +step rywx2: DELETE FROM tabx WHERE id = (SELECT min(id) FROM taby); +step c2: COMMIT; + +starting permutation: rxwy1 rywx2 c1 c2 +step rxwy1: DELETE FROM taby WHERE id = (SELECT min(id) FROM tabx); +step rywx2: DELETE FROM tabx WHERE id = (SELECT min(id) FROM taby); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxwy1 rywx2 c2 c1 +step rxwy1: DELETE FROM taby WHERE id = (SELECT min(id) FROM tabx); +step rywx2: DELETE FROM tabx WHERE id = (SELECT min(id) FROM taby); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rywx2 rxwy1 c1 c2 +step rywx2: DELETE FROM tabx WHERE id = (SELECT min(id) FROM taby); +step rxwy1: DELETE FROM taby WHERE id = (SELECT min(id) FROM tabx); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rywx2 rxwy1 c2 c1 +step rywx2: DELETE FROM tabx WHERE id = (SELECT min(id) FROM taby); +step rxwy1: DELETE FROM taby WHERE id = (SELECT min(id) FROM tabx); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rywx2 c2 rxwy1 c1 +step rywx2: DELETE FROM tabx WHERE id = (SELECT min(id) FROM taby); +step c2: COMMIT; +step rxwy1: DELETE FROM taby WHERE id = (SELECT min(id) FROM tabx); +step c1: COMMIT; diff --git a/src/test/isolation/expected/inherit-temp.out b/src/test/isolation/expected/inherit-temp.out new file mode 100644 index 0000000..e6f0f22 --- /dev/null +++ b/src/test/isolation/expected/inherit-temp.out @@ -0,0 +1,277 @@ +Parsed test spec with 2 sessions + +starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_select_p s1_select_c s2_select_p s2_select_c +step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2); +step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4); +step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6); +step s1_select_p: SELECT a FROM inh_parent; +a +- +1 +2 +3 +4 +(4 rows) + +step s1_select_c: SELECT a FROM inh_temp_child_s1; +a +- +3 +4 +(2 rows) + +step s2_select_p: SELECT a FROM inh_parent; +a +- +1 +2 +5 +6 +(4 rows) + +step s2_select_c: SELECT a FROM inh_temp_child_s2; +a +- +5 +6 +(2 rows) + + +starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_update_p s1_update_c s1_select_p s1_select_c s2_select_p s2_select_c +step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2); +step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4); +step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6); +step s1_update_p: UPDATE inh_parent SET a = 11 WHERE a = 1; +step s1_update_c: UPDATE inh_parent SET a = 13 WHERE a IN (3, 5); +step s1_select_p: SELECT a FROM inh_parent; + a +-- + 2 +11 + 4 +13 +(4 rows) + +step s1_select_c: SELECT a FROM inh_temp_child_s1; + a +-- + 4 +13 +(2 rows) + +step s2_select_p: SELECT a FROM inh_parent; + a +-- + 2 +11 + 5 + 6 +(4 rows) + +step s2_select_c: SELECT a FROM inh_temp_child_s2; +a +- +5 +6 +(2 rows) + + +starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_update_c s1_select_p s1_select_c s2_select_p s2_select_c +step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2); +step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4); +step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6); +step s2_update_c: UPDATE inh_parent SET a = 15 WHERE a IN (3, 5); +step s1_select_p: SELECT a FROM inh_parent; +a +- +1 +2 +3 +4 +(4 rows) + +step s1_select_c: SELECT a FROM inh_temp_child_s1; +a +- +3 +4 +(2 rows) + +step s2_select_p: SELECT a FROM inh_parent; + a +-- + 1 + 2 + 6 +15 +(4 rows) + +step s2_select_c: SELECT a FROM inh_temp_child_s2; + a +-- + 6 +15 +(2 rows) + + +starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_delete_p s1_delete_c s1_select_p s1_select_c s2_select_p s2_select_c +step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2); +step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4); +step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6); +step s1_delete_p: DELETE FROM inh_parent WHERE a = 2; +step s1_delete_c: DELETE FROM inh_parent WHERE a IN (4, 6); +step s1_select_p: SELECT a FROM inh_parent; +a +- +1 +3 +(2 rows) + +step s1_select_c: SELECT a FROM inh_temp_child_s1; +a +- +3 +(1 row) + +step s2_select_p: SELECT a FROM inh_parent; +a +- +1 +5 +6 +(3 rows) + +step s2_select_c: SELECT a FROM inh_temp_child_s2; +a +- +5 +6 +(2 rows) + + +starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_delete_c s1_select_p s1_select_c s2_select_p s2_select_c +step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2); +step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4); +step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6); +step s2_delete_c: DELETE FROM inh_parent WHERE a IN (4, 6); +step s1_select_p: SELECT a FROM inh_parent; +a +- +1 +2 +3 +4 +(4 rows) + +step s1_select_c: SELECT a FROM inh_temp_child_s1; +a +- +3 +4 +(2 rows) + +step s2_select_p: SELECT a FROM inh_parent; +a +- +1 +2 +5 +(3 rows) + +step s2_select_c: SELECT a FROM inh_temp_child_s2; +a +- +5 +(1 row) + + +starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_truncate_p s1_select_p s1_select_c s2_select_p s2_select_c +step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2); +step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4); +step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6); +step s1_truncate_p: TRUNCATE inh_parent; +step s1_select_p: SELECT a FROM inh_parent; +a +- +(0 rows) + +step s1_select_c: SELECT a FROM inh_temp_child_s1; +a +- +(0 rows) + +step s2_select_p: SELECT a FROM inh_parent; +a +- +5 +6 +(2 rows) + +step s2_select_c: SELECT a FROM inh_temp_child_s2; +a +- +5 +6 +(2 rows) + + +starting permutation: s1_insert_p s1_insert_c s2_insert_c s2_truncate_p s1_select_p s1_select_c s2_select_p s2_select_c +step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2); +step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4); +step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6); +step s2_truncate_p: TRUNCATE inh_parent; +step s1_select_p: SELECT a FROM inh_parent; +a +- +3 +4 +(2 rows) + +step s1_select_c: SELECT a FROM inh_temp_child_s1; +a +- +3 +4 +(2 rows) + +step s2_select_p: SELECT a FROM inh_parent; +a +- +(0 rows) + +step s2_select_c: SELECT a FROM inh_temp_child_s2; +a +- +(0 rows) + + +starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_begin s1_truncate_p s2_select_p s1_commit +step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2); +step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4); +step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6); +step s1_begin: BEGIN; +step s1_truncate_p: TRUNCATE inh_parent; +step s2_select_p: SELECT a FROM inh_parent; <waiting ...> +step s1_commit: COMMIT; +step s2_select_p: <... completed> +a +- +5 +6 +(2 rows) + + +starting permutation: s1_insert_p s1_insert_c s2_insert_c s1_begin s1_truncate_p s2_select_c s1_commit +step s1_insert_p: INSERT INTO inh_parent VALUES (1), (2); +step s1_insert_c: INSERT INTO inh_temp_child_s1 VALUES (3), (4); +step s2_insert_c: INSERT INTO inh_temp_child_s2 VALUES (5), (6); +step s1_begin: BEGIN; +step s1_truncate_p: TRUNCATE inh_parent; +step s2_select_c: SELECT a FROM inh_temp_child_s2; +a +- +5 +6 +(2 rows) + +step s1_commit: COMMIT; diff --git a/src/test/isolation/expected/insert-conflict-do-nothing-2.out b/src/test/isolation/expected/insert-conflict-do-nothing-2.out new file mode 100644 index 0000000..22d41d3 --- /dev/null +++ b/src/test/isolation/expected/insert-conflict-do-nothing-2.out @@ -0,0 +1,121 @@ +Parsed test spec with 2 sessions + +starting permutation: beginrr1 beginrr2 donothing1 c1 donothing2 c2 show +step beginrr1: BEGIN ISOLATION LEVEL REPEATABLE READ; +step beginrr2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; +step c1: COMMIT; +step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING; +step c2: COMMIT; +step show: SELECT * FROM ints; +key|val +---+---------- + 1|donothing1 +(1 row) + + +starting permutation: beginrr1 beginrr2 donothing2 c2 donothing1 c1 show +step beginrr1: BEGIN ISOLATION LEVEL REPEATABLE READ; +step beginrr2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING; +step c2: COMMIT; +step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; +step c1: COMMIT; +step show: SELECT * FROM ints; +key|val +---+---------- + 1|donothing2 +(1 row) + + +starting permutation: beginrr1 beginrr2 donothing1 donothing2 c1 c2 show +step beginrr1: BEGIN ISOLATION LEVEL REPEATABLE READ; +step beginrr2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; +step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING; <waiting ...> +step c1: COMMIT; +step donothing2: <... completed> +ERROR: could not serialize access due to concurrent update +step c2: COMMIT; +step show: SELECT * FROM ints; +key|val +---+---------- + 1|donothing1 +(1 row) + + +starting permutation: beginrr1 beginrr2 donothing2 donothing1 c2 c1 show +step beginrr1: BEGIN ISOLATION LEVEL REPEATABLE READ; +step beginrr2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING; +step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; <waiting ...> +step c2: COMMIT; +step donothing1: <... completed> +ERROR: could not serialize access due to concurrent update +step c1: COMMIT; +step show: SELECT * FROM ints; +key|val +---+---------- + 1|donothing2 +(1 row) + + +starting permutation: begins1 begins2 donothing1 c1 donothing2 c2 show +step begins1: BEGIN ISOLATION LEVEL SERIALIZABLE; +step begins2: BEGIN ISOLATION LEVEL SERIALIZABLE; +step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; +step c1: COMMIT; +step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING; +step c2: COMMIT; +step show: SELECT * FROM ints; +key|val +---+---------- + 1|donothing1 +(1 row) + + +starting permutation: begins1 begins2 donothing2 c2 donothing1 c1 show +step begins1: BEGIN ISOLATION LEVEL SERIALIZABLE; +step begins2: BEGIN ISOLATION LEVEL SERIALIZABLE; +step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING; +step c2: COMMIT; +step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; +step c1: COMMIT; +step show: SELECT * FROM ints; +key|val +---+---------- + 1|donothing2 +(1 row) + + +starting permutation: begins1 begins2 donothing1 donothing2 c1 c2 show +step begins1: BEGIN ISOLATION LEVEL SERIALIZABLE; +step begins2: BEGIN ISOLATION LEVEL SERIALIZABLE; +step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; +step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING; <waiting ...> +step c1: COMMIT; +step donothing2: <... completed> +ERROR: could not serialize access due to concurrent update +step c2: COMMIT; +step show: SELECT * FROM ints; +key|val +---+---------- + 1|donothing1 +(1 row) + + +starting permutation: begins1 begins2 donothing2 donothing1 c2 c1 show +step begins1: BEGIN ISOLATION LEVEL SERIALIZABLE; +step begins2: BEGIN ISOLATION LEVEL SERIALIZABLE; +step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING; +step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; <waiting ...> +step c2: COMMIT; +step donothing1: <... completed> +ERROR: could not serialize access due to concurrent update +step c1: COMMIT; +step show: SELECT * FROM ints; +key|val +---+---------- + 1|donothing2 +(1 row) + diff --git a/src/test/isolation/expected/insert-conflict-do-nothing.out b/src/test/isolation/expected/insert-conflict-do-nothing.out new file mode 100644 index 0000000..cadf46d --- /dev/null +++ b/src/test/isolation/expected/insert-conflict-do-nothing.out @@ -0,0 +1,27 @@ +Parsed test spec with 2 sessions + +starting permutation: donothing1 donothing2 c1 select2 c2 +step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; +step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2') ON CONFLICT DO NOTHING; <waiting ...> +step c1: COMMIT; +step donothing2: <... completed> +step select2: SELECT * FROM ints; +key|val +---+---------- + 1|donothing1 +(1 row) + +step c2: COMMIT; + +starting permutation: donothing1 donothing2 a1 select2 c2 +step donothing1: INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; +step donothing2: INSERT INTO ints(key, val) VALUES(1, 'donothing2') ON CONFLICT DO NOTHING; <waiting ...> +step a1: ABORT; +step donothing2: <... completed> +step select2: SELECT * FROM ints; +key|val +---+---------- + 1|donothing2 +(1 row) + +step c2: COMMIT; diff --git a/src/test/isolation/expected/insert-conflict-do-update-2.out b/src/test/isolation/expected/insert-conflict-do-update-2.out new file mode 100644 index 0000000..7acd1ae --- /dev/null +++ b/src/test/isolation/expected/insert-conflict-do-update-2.out @@ -0,0 +1,27 @@ +Parsed test spec with 2 sessions + +starting permutation: insert1 insert2 c1 select2 c2 +step insert1: INSERT INTO upsert(key, payload) VALUES('FooFoo', 'insert1') ON CONFLICT (lower(key)) DO UPDATE set key = EXCLUDED.key, payload = upsert.payload || ' updated by insert1'; +step insert2: INSERT INTO upsert(key, payload) VALUES('FOOFOO', 'insert2') ON CONFLICT (lower(key)) DO UPDATE set key = EXCLUDED.key, payload = upsert.payload || ' updated by insert2'; <waiting ...> +step c1: COMMIT; +step insert2: <... completed> +step select2: SELECT * FROM upsert; +key |payload +------+-------------------------- +FOOFOO|insert1 updated by insert2 +(1 row) + +step c2: COMMIT; + +starting permutation: insert1 insert2 a1 select2 c2 +step insert1: INSERT INTO upsert(key, payload) VALUES('FooFoo', 'insert1') ON CONFLICT (lower(key)) DO UPDATE set key = EXCLUDED.key, payload = upsert.payload || ' updated by insert1'; +step insert2: INSERT INTO upsert(key, payload) VALUES('FOOFOO', 'insert2') ON CONFLICT (lower(key)) DO UPDATE set key = EXCLUDED.key, payload = upsert.payload || ' updated by insert2'; <waiting ...> +step a1: ABORT; +step insert2: <... completed> +step select2: SELECT * FROM upsert; +key |payload +------+------- +FOOFOO|insert2 +(1 row) + +step c2: COMMIT; diff --git a/src/test/isolation/expected/insert-conflict-do-update-3.out b/src/test/isolation/expected/insert-conflict-do-update-3.out new file mode 100644 index 0000000..2d7e0b8 --- /dev/null +++ b/src/test/isolation/expected/insert-conflict-do-update-3.out @@ -0,0 +1,30 @@ +Parsed test spec with 2 sessions + +starting permutation: update2 insert1 c2 select1surprise c1 +step update2: UPDATE colors SET is_active = true WHERE key = 1; +step insert1: + WITH t AS ( + INSERT INTO colors(key, color, is_active) + VALUES(1, 'Brown', true), (2, 'Gray', true) + ON CONFLICT (key) DO UPDATE + SET color = EXCLUDED.color + WHERE colors.is_active) + SELECT * FROM colors ORDER BY key; <waiting ...> +step c2: COMMIT; +step insert1: <... completed> +key|color|is_active +---+-----+--------- + 1|Red |f + 2|Green|f + 3|Blue |f +(3 rows) + +step select1surprise: SELECT * FROM colors ORDER BY key; +key|color|is_active +---+-----+--------- + 1|Brown|t + 2|Green|f + 3|Blue |f +(3 rows) + +step c1: COMMIT; diff --git a/src/test/isolation/expected/insert-conflict-do-update.out b/src/test/isolation/expected/insert-conflict-do-update.out new file mode 100644 index 0000000..16c384c --- /dev/null +++ b/src/test/isolation/expected/insert-conflict-do-update.out @@ -0,0 +1,27 @@ +Parsed test spec with 2 sessions + +starting permutation: insert1 insert2 c1 select2 c2 +step insert1: INSERT INTO upsert(key, val) VALUES(1, 'insert1') ON CONFLICT (key) DO UPDATE set val = upsert.val || ' updated by insert1'; +step insert2: INSERT INTO upsert(key, val) VALUES(1, 'insert2') ON CONFLICT (key) DO UPDATE set val = upsert.val || ' updated by insert2'; <waiting ...> +step c1: COMMIT; +step insert2: <... completed> +step select2: SELECT * FROM upsert; +key|val +---+-------------------------- + 1|insert1 updated by insert2 +(1 row) + +step c2: COMMIT; + +starting permutation: insert1 insert2 a1 select2 c2 +step insert1: INSERT INTO upsert(key, val) VALUES(1, 'insert1') ON CONFLICT (key) DO UPDATE set val = upsert.val || ' updated by insert1'; +step insert2: INSERT INTO upsert(key, val) VALUES(1, 'insert2') ON CONFLICT (key) DO UPDATE set val = upsert.val || ' updated by insert2'; <waiting ...> +step a1: ABORT; +step insert2: <... completed> +step select2: SELECT * FROM upsert; +key|val +---+------- + 1|insert2 +(1 row) + +step c2: COMMIT; diff --git a/src/test/isolation/expected/insert-conflict-specconflict.out b/src/test/isolation/expected/insert-conflict-specconflict.out new file mode 100644 index 0000000..e34a821 --- /dev/null +++ b/src/test/isolation/expected/insert-conflict-specconflict.out @@ -0,0 +1,553 @@ +Parsed test spec with 3 sessions + +starting permutation: controller_locks controller_show s1_upsert s2_upsert controller_show controller_unlock_1_1 controller_unlock_2_1 controller_unlock_1_3 controller_unlock_2_3 controller_show controller_unlock_2_2 controller_show controller_unlock_1_2 controller_show +step controller_locks: SELECT pg_advisory_lock(sess, lock), sess, lock FROM generate_series(1, 2) a(sess), generate_series(1,3) b(lock); +pg_advisory_lock|sess|lock +----------------+----+---- + | 1| 1 + | 1| 2 + | 1| 3 + | 2| 1 + | 2| 2 + | 2| 3 +(6 rows) + +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 3 +step s1_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s1') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s1'; <waiting ...> +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 3 +step s2_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s2') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s2'; <waiting ...> +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_unlock_1_1: SELECT pg_advisory_unlock(1, 1); +pg_advisory_unlock +------------------ +t +(1 row) + +step controller_unlock_2_1: SELECT pg_advisory_unlock(2, 1); +pg_advisory_unlock +------------------ +t +(1 row) + +step controller_unlock_1_3: SELECT pg_advisory_unlock(1, 3); +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 2 +step controller_unlock_2_3: SELECT pg_advisory_unlock(2, 3); +pg_advisory_unlock +------------------ +t +(1 row) + +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_unlock_2_2: SELECT pg_advisory_unlock(2, 2); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2_upsert: <... completed> +step controller_show: SELECT * FROM upserttest; +key|data +---+----------- +k1 |inserted s2 +(1 row) + +step controller_unlock_1_2: SELECT pg_advisory_unlock(1, 2); +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 2 +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 2 +step s1_upsert: <... completed> +step controller_show: SELECT * FROM upserttest; +key|data +---+----------------------------------- +k1 |inserted s2 with conflict update s1 +(1 row) + + +starting permutation: controller_locks controller_show s1_upsert s2_upsert controller_show controller_unlock_1_1 controller_unlock_2_1 controller_unlock_1_3 controller_unlock_2_3 controller_show controller_unlock_1_2 controller_show controller_unlock_2_2 controller_show +step controller_locks: SELECT pg_advisory_lock(sess, lock), sess, lock FROM generate_series(1, 2) a(sess), generate_series(1,3) b(lock); +pg_advisory_lock|sess|lock +----------------+----+---- + | 1| 1 + | 1| 2 + | 1| 3 + | 2| 1 + | 2| 2 + | 2| 3 +(6 rows) + +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 3 +step s1_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s1') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s1'; <waiting ...> +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 3 +step s2_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s2') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s2'; <waiting ...> +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_unlock_1_1: SELECT pg_advisory_unlock(1, 1); +pg_advisory_unlock +------------------ +t +(1 row) + +step controller_unlock_2_1: SELECT pg_advisory_unlock(2, 1); +pg_advisory_unlock +------------------ +t +(1 row) + +step controller_unlock_1_3: SELECT pg_advisory_unlock(1, 3); +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 2 +step controller_unlock_2_3: SELECT pg_advisory_unlock(2, 3); +pg_advisory_unlock +------------------ +t +(1 row) + +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_unlock_1_2: SELECT pg_advisory_unlock(1, 2); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1_upsert: <... completed> +step controller_show: SELECT * FROM upserttest; +key|data +---+----------- +k1 |inserted s1 +(1 row) + +step controller_unlock_2_2: SELECT pg_advisory_unlock(2, 2); +pg_advisory_unlock +------------------ +t +(1 row) + +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +step s2_upsert: <... completed> +step controller_show: SELECT * FROM upserttest; +key|data +---+----------------------------------- +k1 |inserted s1 with conflict update s2 +(1 row) + + +starting permutation: controller_locks controller_show s1_insert_toast s2_insert_toast controller_show controller_unlock_1_1 controller_unlock_2_1 controller_unlock_1_3 controller_unlock_2_3 controller_show controller_unlock_1_2 controller_show_count controller_unlock_2_2 controller_show_count +step controller_locks: SELECT pg_advisory_lock(sess, lock), sess, lock FROM generate_series(1, 2) a(sess), generate_series(1,3) b(lock); +pg_advisory_lock|sess|lock +----------------+----+---- + | 1| 1 + | 1| 2 + | 1| 3 + | 2| 1 + | 2| 2 + | 2| 3 +(6 rows) + +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +s1: NOTICE: blurt_and_lock_123() called for k2 in session 1 +s1: NOTICE: acquiring advisory lock on 3 +step s1_insert_toast: INSERT INTO upserttest VALUES('k2', ctoast_large_val()) ON CONFLICT DO NOTHING; <waiting ...> +s2: NOTICE: blurt_and_lock_123() called for k2 in session 2 +s2: NOTICE: acquiring advisory lock on 3 +step s2_insert_toast: INSERT INTO upserttest VALUES('k2', ctoast_large_val()) ON CONFLICT DO NOTHING; <waiting ...> +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_unlock_1_1: SELECT pg_advisory_unlock(1, 1); +pg_advisory_unlock +------------------ +t +(1 row) + +step controller_unlock_2_1: SELECT pg_advisory_unlock(2, 1); +pg_advisory_unlock +------------------ +t +(1 row) + +step controller_unlock_1_3: SELECT pg_advisory_unlock(1, 3); +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: blurt_and_lock_123() called for k2 in session 1 +s1: NOTICE: acquiring advisory lock on 2 +step controller_unlock_2_3: SELECT pg_advisory_unlock(2, 3); +pg_advisory_unlock +------------------ +t +(1 row) + +s2: NOTICE: blurt_and_lock_123() called for k2 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_unlock_1_2: SELECT pg_advisory_unlock(1, 2); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1_insert_toast: <... completed> +step controller_show_count: SELECT COUNT(*) FROM upserttest; +count +----- + 1 +(1 row) + +step controller_unlock_2_2: SELECT pg_advisory_unlock(2, 2); +pg_advisory_unlock +------------------ +t +(1 row) + +s2: NOTICE: blurt_and_lock_123() called for k2 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +s2: NOTICE: blurt_and_lock_123() called for k2 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +step s2_insert_toast: <... completed> +step controller_show_count: SELECT COUNT(*) FROM upserttest; +count +----- + 1 +(1 row) + + +starting permutation: controller_locks controller_show s1_begin s2_begin s1_upsert s2_upsert controller_show controller_unlock_1_1 controller_unlock_2_1 controller_unlock_1_3 controller_unlock_2_3 controller_show controller_unlock_1_2 controller_show controller_unlock_2_2 controller_show s1_commit controller_show s2_commit controller_show +step controller_locks: SELECT pg_advisory_lock(sess, lock), sess, lock FROM generate_series(1, 2) a(sess), generate_series(1,3) b(lock); +pg_advisory_lock|sess|lock +----------------+----+---- + | 1| 1 + | 1| 2 + | 1| 3 + | 2| 1 + | 2| 2 + | 2| 3 +(6 rows) + +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step s1_begin: BEGIN; +step s2_begin: BEGIN; +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 3 +step s1_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s1') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s1'; <waiting ...> +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 3 +step s2_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s2') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s2'; <waiting ...> +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_unlock_1_1: SELECT pg_advisory_unlock(1, 1); +pg_advisory_unlock +------------------ +t +(1 row) + +step controller_unlock_2_1: SELECT pg_advisory_unlock(2, 1); +pg_advisory_unlock +------------------ +t +(1 row) + +step controller_unlock_1_3: SELECT pg_advisory_unlock(1, 3); +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 2 +step controller_unlock_2_3: SELECT pg_advisory_unlock(2, 3); +pg_advisory_unlock +------------------ +t +(1 row) + +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_unlock_1_2: SELECT pg_advisory_unlock(1, 2); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1_upsert: <... completed> +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_unlock_2_2: SELECT pg_advisory_unlock(2, 2); +pg_advisory_unlock +------------------ +t +(1 row) + +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step s1_commit: COMMIT; +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +step s2_upsert: <... completed> +step controller_show: SELECT * FROM upserttest; +key|data +---+----------- +k1 |inserted s1 +(1 row) + +step s2_commit: COMMIT; +step controller_show: SELECT * FROM upserttest; +key|data +---+----------------------------------- +k1 |inserted s1 with conflict update s2 +(1 row) + + +starting permutation: s1_create_non_unique_index s1_confirm_index_order controller_locks controller_show s2_begin s1_upsert s2_upsert controller_show controller_unlock_1_1 controller_unlock_2_1 controller_unlock_1_3 controller_unlock_2_3 controller_show controller_lock_2_4 controller_unlock_2_2 controller_show controller_unlock_1_2 controller_print_speculative_locks controller_unlock_2_4 s2_noop controller_print_speculative_locks s2_commit s1_noop controller_show controller_print_speculative_locks +step s1_create_non_unique_index: CREATE INDEX upserttest_key_idx ON upserttest((blurt_and_lock_4(key))); +step s1_confirm_index_order: SELECT 'upserttest_key_uniq_idx'::regclass::int8 < 'upserttest_key_idx'::regclass::int8; +?column? +-------- +t +(1 row) + +step controller_locks: SELECT pg_advisory_lock(sess, lock), sess, lock FROM generate_series(1, 2) a(sess), generate_series(1,3) b(lock); +pg_advisory_lock|sess|lock +----------------+----+---- + | 1| 1 + | 1| 2 + | 1| 3 + | 2| 1 + | 2| 2 + | 2| 3 +(6 rows) + +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step s2_begin: BEGIN; +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 3 +step s1_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s1') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s1'; <waiting ...> +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 3 +step s2_upsert: INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s2') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s2'; <waiting ...> +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_unlock_1_1: SELECT pg_advisory_unlock(1, 1); +pg_advisory_unlock +------------------ +t +(1 row) + +step controller_unlock_2_1: SELECT pg_advisory_unlock(2, 1); +pg_advisory_unlock +------------------ +t +(1 row) + +step controller_unlock_1_3: SELECT pg_advisory_unlock(1, 3); +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 2 +step controller_unlock_2_3: SELECT pg_advisory_unlock(2, 3); +pg_advisory_unlock +------------------ +t +(1 row) + +s2: NOTICE: blurt_and_lock_123() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 2 +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_lock_2_4: SELECT pg_advisory_lock(2, 4); +pg_advisory_lock +---------------- + +(1 row) + +step controller_unlock_2_2: SELECT pg_advisory_unlock(2, 2); +pg_advisory_unlock +------------------ +t +(1 row) + +s2: NOTICE: blurt_and_lock_4() called for k1 in session 2 +s2: NOTICE: acquiring advisory lock on 4 +step controller_show: SELECT * FROM upserttest; +key|data +---+---- +(0 rows) + +step controller_unlock_1_2: SELECT pg_advisory_unlock(1, 2); +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: blurt_and_lock_4() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 4 +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 2 +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 2 +step controller_print_speculative_locks: + SELECT pa.application_name, locktype, mode, granted + FROM pg_locks pl JOIN pg_stat_activity pa USING (pid) + WHERE + locktype IN ('spectoken', 'transactionid') + AND pa.datname = current_database() + AND pa.application_name LIKE 'isolation/insert-conflict-specconflict/s%' + ORDER BY 1, 2, 3, 4; + +application_name |locktype |mode |granted +-----------------------------------------+-------------+-------------+------- +isolation/insert-conflict-specconflict/s1|spectoken |ShareLock |f +isolation/insert-conflict-specconflict/s1|transactionid|ExclusiveLock|t +isolation/insert-conflict-specconflict/s2|spectoken |ExclusiveLock|t +isolation/insert-conflict-specconflict/s2|transactionid|ExclusiveLock|t +(4 rows) + +step controller_unlock_2_4: SELECT pg_advisory_unlock(2, 4); +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 2 +step s2_upsert: <... completed> +step s2_noop: +step controller_print_speculative_locks: + SELECT pa.application_name, locktype, mode, granted + FROM pg_locks pl JOIN pg_stat_activity pa USING (pid) + WHERE + locktype IN ('spectoken', 'transactionid') + AND pa.datname = current_database() + AND pa.application_name LIKE 'isolation/insert-conflict-specconflict/s%' + ORDER BY 1, 2, 3, 4; + +application_name |locktype |mode |granted +-----------------------------------------+-------------+-------------+------- +isolation/insert-conflict-specconflict/s1|transactionid|ExclusiveLock|t +isolation/insert-conflict-specconflict/s1|transactionid|ShareLock |f +isolation/insert-conflict-specconflict/s2|transactionid|ExclusiveLock|t +(3 rows) + +step s2_commit: COMMIT; +s1: NOTICE: blurt_and_lock_123() called for k1 in session 1 +s1: NOTICE: acquiring advisory lock on 2 +step s1_upsert: <... completed> +step s1_noop: +step controller_show: SELECT * FROM upserttest; +key|data +---+----------------------------------- +k1 |inserted s2 with conflict update s1 +(1 row) + +step controller_print_speculative_locks: + SELECT pa.application_name, locktype, mode, granted + FROM pg_locks pl JOIN pg_stat_activity pa USING (pid) + WHERE + locktype IN ('spectoken', 'transactionid') + AND pa.datname = current_database() + AND pa.application_name LIKE 'isolation/insert-conflict-specconflict/s%' + ORDER BY 1, 2, 3, 4; + +application_name|locktype|mode|granted +----------------+--------+----+------- +(0 rows) + diff --git a/src/test/isolation/expected/lock-committed-keyupdate.out b/src/test/isolation/expected/lock-committed-keyupdate.out new file mode 100644 index 0000000..7de6bc6 --- /dev/null +++ b/src/test/isolation/expected/lock-committed-keyupdate.out @@ -0,0 +1,670 @@ +Parsed test spec with 2 sessions + +starting permutation: s1b s2b1 s1l s2l s1u s1c s1ul s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s1u s2l s1c s1ul s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s1u s1ul s2l s1c s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s2l: <... completed> +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s2l s1u s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1c: COMMIT; +step s1hint: SELECT * FROM lcku_table; +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s1u s2l s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1hint: SELECT * FROM lcku_table; +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s1u s1ul s2l s1c s1hint s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s2l: <... completed> +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s1hint: SELECT * FROM lcku_table; +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s2l s1u s1c s1ul s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s1u s2l s1c s1ul s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s1u s1ul s2l s1c s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s2l s1u s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1c: COMMIT; +step s1hint: SELECT * FROM lcku_table; +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s1u s2l s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1hint: SELECT * FROM lcku_table; +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s1u s1ul s2l s1c s1hint s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s1hint: SELECT * FROM lcku_table; +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s2l s1u s1c s1ul s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s1u s2l s1c s1ul s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s1u s1ul s2l s1c s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s2l s1u s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1c: COMMIT; +step s1hint: SELECT * FROM lcku_table; +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s1u s2l s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1hint: SELECT * FROM lcku_table; +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s1u s1ul s2l s1c s1hint s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(578902068); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcku_table SET id = 2 WHERE id = 3; +step s1ul: SELECT pg_advisory_unlock(578902068); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s2l: <... completed> +ERROR: could not serialize access due to concurrent update +step s1hint: SELECT * FROM lcku_table; +id|value +--+----- + 1|one + 2|two +(2 rows) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + diff --git a/src/test/isolation/expected/lock-committed-update.out b/src/test/isolation/expected/lock-committed-update.out new file mode 100644 index 0000000..84b9ce7 --- /dev/null +++ b/src/test/isolation/expected/lock-committed-update.out @@ -0,0 +1,931 @@ +Parsed test spec with 2 sessions + +starting permutation: s1b s2b1 s1l s2l s1u s1c s1ul s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s1u s2l s1c s1ul s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s2l s1ul s1u s1c s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s1u s1ul s2l s1c s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; +id|value +--+----- + 1|one +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s2l s1u s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s1u s2l s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s2l s1ul s1u s1c s1hint s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b1 s1l s1u s1ul s2l s1c s1hint s2c +step s1b: BEGIN; +step s2b1: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; +id|value +--+----- + 1|one +(1 row) + +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s2l s1u s1c s1ul s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s1u s2l s1c s1ul s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s2l s1ul s1u s1c s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s1u s1ul s2l s1c s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; +id|value +--+----- + 1|one +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s2l s1u s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s1u s2l s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s2l s1ul s1u s1c s1hint s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b2 s1l s1u s1ul s2l s1c s1hint s2c +step s1b: BEGIN; +step s2b2: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; +id|value +--+----- + 1|one +(1 row) + +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s2l s1u s1c s1ul s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s1u s2l s1c s1ul s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s2l s1ul s1u s1c s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s1u s1ul s2l s1c s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; +id|value +--+----- + 1|one +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s2l s1u s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s1u s2l s1c s1hint s1ul s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s2l s1ul s1u s1c s1hint s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; <waiting ...> +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: <... completed> +id|value +--+----- + 1|one +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + + +starting permutation: s1b s2b3 s1l s1u s1ul s2l s1c s1hint s2c +step s1b: BEGIN; +step s2b3: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1l: SELECT pg_advisory_lock(380170116); +pg_advisory_lock +---------------- + +(1 row) + +step s1u: UPDATE lcu_table SET value = 'two' WHERE id = 1; +step s1ul: SELECT pg_advisory_unlock(380170116); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2l: SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; +id|value +--+----- + 1|one +(1 row) + +step s1c: COMMIT; +step s1hint: SELECT * FROM lcu_table; +id|value +--+----- + 1|two +(1 row) + +step s2c: COMMIT; +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + diff --git a/src/test/isolation/expected/lock-update-delete.out b/src/test/isolation/expected/lock-update-delete.out new file mode 100644 index 0000000..f75e25f --- /dev/null +++ b/src/test/isolation/expected/lock-update-delete.out @@ -0,0 +1,285 @@ +Parsed test spec with 2 sessions + +starting permutation: s2b s1l s2u s2_blocker1 s2_unlock s2c +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker1: DELETE FROM foo; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2c: COMMIT; +step s1l: <... completed> +key|value +---+----- +(0 rows) + + +starting permutation: s2b s1l s2u s2_blocker2 s2_unlock s2c +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2c: COMMIT; +step s1l: <... completed> +key|value +---+----- +(0 rows) + + +starting permutation: s2b s1l s2u s2_blocker3 s2_unlock s2c +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; + +starting permutation: s2b s1l s2u s2_blocker1 s2_unlock s2r +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker1: DELETE FROM foo; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2r: ROLLBACK; +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + + +starting permutation: s2b s1l s2u s2_blocker2 s2_unlock s2r +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2r: ROLLBACK; +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + + +starting permutation: s2b s1l s2u s2_blocker3 s2_unlock s2r +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s2r: ROLLBACK; + +starting permutation: s2b s1l s2u s2_blocker1 s2c s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker1: DELETE FROM foo; +step s2c: COMMIT; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- +(0 rows) + + +starting permutation: s2b s1l s2u s2_blocker2 s2c s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1; +step s2c: COMMIT; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- +(0 rows) + + +starting permutation: s2b s1l s2u s2_blocker3 s2c s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1; +step s2c: COMMIT; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + + +starting permutation: s2b s1l s2u s2_blocker1 s2r s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker1: DELETE FROM foo; +step s2r: ROLLBACK; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + + +starting permutation: s2b s1l s2u s2_blocker2 s2r s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1; +step s2r: ROLLBACK; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + + +starting permutation: s2b s1l s2u s2_blocker3 s2r s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1; +step s2r: ROLLBACK; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + diff --git a/src/test/isolation/expected/lock-update-delete_1.out b/src/test/isolation/expected/lock-update-delete_1.out new file mode 100644 index 0000000..c602ac8 --- /dev/null +++ b/src/test/isolation/expected/lock-update-delete_1.out @@ -0,0 +1,273 @@ +Parsed test spec with 2 sessions + +starting permutation: s2b s1l s2u s2_blocker1 s2_unlock s2c +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker1: DELETE FROM foo; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2c: COMMIT; +step s1l: <... completed> +ERROR: could not serialize access due to concurrent update + +starting permutation: s2b s1l s2u s2_blocker2 s2_unlock s2c +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2c: COMMIT; +step s1l: <... completed> +ERROR: could not serialize access due to concurrent update + +starting permutation: s2b s1l s2u s2_blocker3 s2_unlock s2c +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; + +starting permutation: s2b s1l s2u s2_blocker1 s2_unlock s2r +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker1: DELETE FROM foo; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2r: ROLLBACK; +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + + +starting permutation: s2b s1l s2u s2_blocker2 s2_unlock s2r +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s2r: ROLLBACK; +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + + +starting permutation: s2b s1l s2u s2_blocker3 s2_unlock s2r +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + +step s2r: ROLLBACK; + +starting permutation: s2b s1l s2u s2_blocker1 s2c s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker1: DELETE FROM foo; +step s2c: COMMIT; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +ERROR: could not serialize access due to concurrent update + +starting permutation: s2b s1l s2u s2_blocker2 s2c s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1; +step s2c: COMMIT; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +ERROR: could not serialize access due to concurrent update + +starting permutation: s2b s1l s2u s2_blocker3 s2c s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1; +step s2c: COMMIT; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + + +starting permutation: s2b s1l s2u s2_blocker1 s2r s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker1: DELETE FROM foo; +step s2r: ROLLBACK; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + + +starting permutation: s2b s1l s2u s2_blocker2 s2r s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker2: UPDATE foo SET key = 2 WHERE key = 1; +step s2r: ROLLBACK; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + + +starting permutation: s2b s1l s2u s2_blocker3 s2r s2_unlock +pg_advisory_lock +---------------- + +(1 row) + +step s2b: BEGIN; +step s1l: SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; <waiting ...> +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s2_blocker3: UPDATE foo SET value = 2 WHERE key = 1; +step s2r: ROLLBACK; +step s2_unlock: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1l: <... completed> +key|value +---+----- + 1| 1 +(1 row) + diff --git a/src/test/isolation/expected/lock-update-traversal.out b/src/test/isolation/expected/lock-update-traversal.out new file mode 100644 index 0000000..6d6a97d --- /dev/null +++ b/src/test/isolation/expected/lock-update-traversal.out @@ -0,0 +1,63 @@ +Parsed test spec with 2 sessions + +starting permutation: s1b s2b s1s s2u s1l s2c s2d1 s1c +step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s2b: BEGIN; +step s1s: SELECT * FROM foo; +key|value +---+----- + 1| 1 +(1 row) + +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; +step s2d1: DELETE FROM foo WHERE key = 1; <waiting ...> +step s1c: COMMIT; +step s2d1: <... completed> + +starting permutation: s1b s2b s1s s2u s1l s2c s2d2 s1c +step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s2b: BEGIN; +step s1s: SELECT * FROM foo; +key|value +---+----- + 1| 1 +(1 row) + +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; +step s2d2: UPDATE foo SET key = 3 WHERE key = 1; <waiting ...> +step s1c: COMMIT; +step s2d2: <... completed> + +starting permutation: s1b s2b s1s s2u s1l s2c s2d3 s1c +step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s2b: BEGIN; +step s1s: SELECT * FROM foo; +key|value +---+----- + 1| 1 +(1 row) + +step s2u: UPDATE foo SET value = 2 WHERE key = 1; +step s1l: SELECT * FROM foo FOR KEY SHARE; +key|value +---+----- + 1| 1 +(1 row) + +step s2c: COMMIT; +step s2d3: UPDATE foo SET value = 3 WHERE key = 1; +step s1c: COMMIT; diff --git a/src/test/isolation/expected/multiple-cic.out b/src/test/isolation/expected/multiple-cic.out new file mode 100644 index 0000000..7a0f326 --- /dev/null +++ b/src/test/isolation/expected/multiple-cic.out @@ -0,0 +1,24 @@ +Parsed test spec with 2 sessions + +starting permutation: s2l s1i s2i +step s2l: SELECT pg_advisory_lock(281457); +pg_advisory_lock +---------------- + +(1 row) + +step s1i: + CREATE INDEX CONCURRENTLY mcic_one_pkey ON mcic_one (id) + WHERE lck_shr(281457); + <waiting ...> +step s2i: + CREATE INDEX CONCURRENTLY mcic_two_pkey ON mcic_two (id) + WHERE unlck(); + <waiting ...> +step s1i: <... completed> +step s2i: <... completed> +unlck +----- +t +(1 row) + diff --git a/src/test/isolation/expected/multiple-row-versions.out b/src/test/isolation/expected/multiple-row-versions.out new file mode 100644 index 0000000..79f492e --- /dev/null +++ b/src/test/isolation/expected/multiple-row-versions.out @@ -0,0 +1,30 @@ +Parsed test spec with 4 sessions + +starting permutation: rx1 wx2 c2 wx3 ry3 wy4 rz4 c4 c3 wz1 c1 +step rx1: SELECT * FROM t WHERE id = 1000000; + id|txt +-------+--- +1000000| +(1 row) + +step wx2: UPDATE t SET txt = 'b' WHERE id = 1000000; +step c2: COMMIT; +step wx3: UPDATE t SET txt = 'c' WHERE id = 1000000; +step ry3: SELECT * FROM t WHERE id = 500000; + id|txt +------+--- +500000| +(1 row) + +step wy4: UPDATE t SET txt = 'd' WHERE id = 500000; +step rz4: SELECT * FROM t WHERE id = 1; +id|txt +--+--- + 1| +(1 row) + +step c4: COMMIT; +step c3: COMMIT; +step wz1: UPDATE t SET txt = 'a' WHERE id = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; diff --git a/src/test/isolation/expected/multixact-no-deadlock.out b/src/test/isolation/expected/multixact-no-deadlock.out new file mode 100644 index 0000000..4b9ce7b --- /dev/null +++ b/src/test/isolation/expected/multixact-no-deadlock.out @@ -0,0 +1,32 @@ +Parsed test spec with 3 sessions + +starting permutation: s1lock s2lock s1svpt s3lock s1lock2 s2c s1c s3c +step s1lock: SELECT * FROM justthis FOR SHARE; +value +----- + 1 +(1 row) + +step s2lock: SELECT * FROM justthis FOR SHARE; +value +----- + 1 +(1 row) + +step s1svpt: SAVEPOINT foo; +step s3lock: SELECT * FROM justthis FOR UPDATE; <waiting ...> +step s1lock2: SELECT * FROM justthis FOR SHARE; +value +----- + 1 +(1 row) + +step s2c: COMMIT; +step s1c: COMMIT; +step s3lock: <... completed> +value +----- + 1 +(1 row) + +step s3c: COMMIT; diff --git a/src/test/isolation/expected/multixact-no-forget.out b/src/test/isolation/expected/multixact-no-forget.out new file mode 100644 index 0000000..ce06b38 --- /dev/null +++ b/src/test/isolation/expected/multixact-no-forget.out @@ -0,0 +1,168 @@ +Parsed test spec with 3 sessions + +starting permutation: s1_show s1_commit s2_commit +step s1_show: SELECT current_setting('default_transaction_isolation') <> 'read committed'; +?column? +-------- +f +(1 row) + +step s1_commit: COMMIT; +step s2_commit: COMMIT; + +starting permutation: s1_lock s2_update s2_abort s3_forkeyshr s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_abort: ROLLBACK; +step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_lock s2_update s2_commit s3_forkeyshr s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_commit: COMMIT; +step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 2 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_lock s2_update s1_commit s3_forkeyshr s2_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s1_commit: COMMIT; +step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_commit: COMMIT; + +starting permutation: s1_lock s2_update s2_abort s3_fornokeyupd s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_abort: ROLLBACK; +step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE; +value +----- + 1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_lock s2_update s2_commit s3_fornokeyupd s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_commit: COMMIT; +step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE; +value +----- + 2 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_lock s2_update s1_commit s3_fornokeyupd s2_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s1_commit: COMMIT; +step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE; <waiting ...> +step s2_commit: COMMIT; +step s3_fornokeyupd: <... completed> +value +----- + 2 +(1 row) + + +starting permutation: s1_lock s2_update s2_abort s3_forupd s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_abort: ROLLBACK; +step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s3_forupd: <... completed> +value +----- + 1 +(1 row) + + +starting permutation: s1_lock s2_update s2_commit s3_forupd s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_commit: COMMIT; +step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s3_forupd: <... completed> +value +----- + 2 +(1 row) + + +starting permutation: s1_lock s2_update s1_commit s3_forupd s2_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s1_commit: COMMIT; +step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...> +step s2_commit: COMMIT; +step s3_forupd: <... completed> +value +----- + 2 +(1 row) + diff --git a/src/test/isolation/expected/multixact-no-forget_1.out b/src/test/isolation/expected/multixact-no-forget_1.out new file mode 100644 index 0000000..f15a1e1 --- /dev/null +++ b/src/test/isolation/expected/multixact-no-forget_1.out @@ -0,0 +1,160 @@ +Parsed test spec with 3 sessions + +starting permutation: s1_show s1_commit s2_commit +step s1_show: SELECT current_setting('default_transaction_isolation') <> 'read committed'; +?column? +-------- +t +(1 row) + +step s1_commit: COMMIT; +step s2_commit: COMMIT; + +starting permutation: s1_lock s2_update s2_abort s3_forkeyshr s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_abort: ROLLBACK; +step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_lock s2_update s2_commit s3_forkeyshr s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_commit: COMMIT; +step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 2 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_lock s2_update s1_commit s3_forkeyshr s2_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s1_commit: COMMIT; +step s3_forkeyshr: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_commit: COMMIT; + +starting permutation: s1_lock s2_update s2_abort s3_fornokeyupd s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_abort: ROLLBACK; +step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE; +value +----- + 1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_lock s2_update s2_commit s3_fornokeyupd s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_commit: COMMIT; +step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE; +value +----- + 2 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_lock s2_update s1_commit s3_fornokeyupd s2_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s1_commit: COMMIT; +step s3_fornokeyupd: SELECT * FROM dont_forget FOR NO KEY UPDATE; <waiting ...> +step s2_commit: COMMIT; +step s3_fornokeyupd: <... completed> +ERROR: could not serialize access due to concurrent update + +starting permutation: s1_lock s2_update s2_abort s3_forupd s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_abort: ROLLBACK; +step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s3_forupd: <... completed> +value +----- + 1 +(1 row) + + +starting permutation: s1_lock s2_update s2_commit s3_forupd s1_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s2_commit: COMMIT; +step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s3_forupd: <... completed> +value +----- + 2 +(1 row) + + +starting permutation: s1_lock s2_update s1_commit s3_forupd s2_commit +step s1_lock: SELECT * FROM dont_forget FOR KEY SHARE; +value +----- + 1 +(1 row) + +step s2_update: UPDATE dont_forget SET value = 2; +step s1_commit: COMMIT; +step s3_forupd: SELECT * FROM dont_forget FOR UPDATE; <waiting ...> +step s2_commit: COMMIT; +step s3_forupd: <... completed> +ERROR: could not serialize access due to concurrent update diff --git a/src/test/isolation/expected/nowait-2.out b/src/test/isolation/expected/nowait-2.out new file mode 100644 index 0000000..ba18fa7 --- /dev/null +++ b/src/test/isolation/expected/nowait-2.out @@ -0,0 +1,55 @@ +Parsed test spec with 2 sessions + +starting permutation: s1a s2a s2b s1b s2c +step s1a: SELECT * FROM foo FOR SHARE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s2a: SELECT * FROM foo FOR SHARE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s2b: SELECT * FROM foo FOR UPDATE NOWAIT; +ERROR: could not obtain lock on row in relation "foo" +step s1b: COMMIT; +step s2c: COMMIT; + +starting permutation: s2a s1a s2b s1b s2c +step s2a: SELECT * FROM foo FOR SHARE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s1a: SELECT * FROM foo FOR SHARE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s2b: SELECT * FROM foo FOR UPDATE NOWAIT; +ERROR: could not obtain lock on row in relation "foo" +step s1b: COMMIT; +step s2c: COMMIT; + +starting permutation: s2a s2b s1a s1b s2c +step s2a: SELECT * FROM foo FOR SHARE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s2b: SELECT * FROM foo FOR UPDATE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s1a: SELECT * FROM foo FOR SHARE NOWAIT; +ERROR: could not obtain lock on row in relation "foo" +step s1b: COMMIT; +step s2c: COMMIT; diff --git a/src/test/isolation/expected/nowait-3.out b/src/test/isolation/expected/nowait-3.out new file mode 100644 index 0000000..19a5b68 --- /dev/null +++ b/src/test/isolation/expected/nowait-3.out @@ -0,0 +1,21 @@ +Parsed test spec with 3 sessions + +starting permutation: s1a s2a s3a s1b s2b s3b +step s1a: SELECT * FROM foo FOR UPDATE; +id|data +--+---- + 1|x +(1 row) + +step s2a: SELECT * FROM foo FOR UPDATE; <waiting ...> +step s3a: SELECT * FROM foo FOR UPDATE NOWAIT; +ERROR: could not obtain lock on row in relation "foo" +step s1b: COMMIT; +step s2a: <... completed> +id|data +--+---- + 1|x +(1 row) + +step s2b: COMMIT; +step s3b: COMMIT; diff --git a/src/test/isolation/expected/nowait-4.out b/src/test/isolation/expected/nowait-4.out new file mode 100644 index 0000000..be0edbd --- /dev/null +++ b/src/test/isolation/expected/nowait-4.out @@ -0,0 +1,23 @@ +Parsed test spec with 2 sessions + +starting permutation: s2a s1a s2b s2c s2d s2e s1b s2f +step s2a: SELECT pg_advisory_lock(0); +pg_advisory_lock +---------------- + +(1 row) + +step s1a: SELECT * FROM foo WHERE pg_advisory_lock(0) IS NOT NULL FOR UPDATE NOWAIT; <waiting ...> +step s2b: UPDATE foo SET data = data; +step s2c: BEGIN; +step s2d: UPDATE foo SET data = data; +step s2e: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1a: <... completed> +ERROR: could not obtain lock on row in relation "foo" +step s1b: COMMIT; +step s2f: COMMIT; diff --git a/src/test/isolation/expected/nowait-4_1.out b/src/test/isolation/expected/nowait-4_1.out new file mode 100644 index 0000000..05e2fcf --- /dev/null +++ b/src/test/isolation/expected/nowait-4_1.out @@ -0,0 +1,23 @@ +Parsed test spec with 2 sessions + +starting permutation: s2a s1a s2b s2c s2d s2e s1b s2f +step s2a: SELECT pg_advisory_lock(0); +pg_advisory_lock +---------------- + +(1 row) + +step s1a: SELECT * FROM foo WHERE pg_advisory_lock(0) IS NOT NULL FOR UPDATE NOWAIT; <waiting ...> +step s2b: UPDATE foo SET data = data; +step s2c: BEGIN; +step s2d: UPDATE foo SET data = data; +step s2e: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1a: <... completed> +ERROR: could not serialize access due to concurrent update +step s1b: COMMIT; +step s2f: COMMIT; diff --git a/src/test/isolation/expected/nowait-5.out b/src/test/isolation/expected/nowait-5.out new file mode 100644 index 0000000..f1aae21 --- /dev/null +++ b/src/test/isolation/expected/nowait-5.out @@ -0,0 +1,43 @@ +Parsed test spec with 3 sessions + +starting permutation: sl1_prep upd_getlock sl1_exec upd_doupdate lk1_doforshare upd_releaselock +step sl1_prep: + PREPARE sl1_run AS SELECT id FROM test_nowait WHERE pg_advisory_lock(0) is not null FOR UPDATE NOWAIT; + +step upd_getlock: + SELECT pg_advisory_lock(0); + +pg_advisory_lock +---------------- + +(1 row) + +step sl1_exec: + BEGIN ISOLATION LEVEL READ COMMITTED; + EXECUTE sl1_run; + SELECT xmin, xmax, ctid, * FROM test_nowait; + <waiting ...> +step upd_doupdate: + BEGIN ISOLATION LEVEL READ COMMITTED; + UPDATE test_nowait SET value = value WHERE id % 2 = 0; + COMMIT; + +step lk1_doforshare: + BEGIN ISOLATION LEVEL READ COMMITTED; + SELECT id FROM test_nowait WHERE id % 2 = 0 FOR SHARE; + +id +-- + 2 +(1 row) + +step upd_releaselock: + SELECT pg_advisory_unlock(0); + +pg_advisory_unlock +------------------ +t +(1 row) + +step sl1_exec: <... completed> +ERROR: could not obtain lock on row in relation "test_nowait" diff --git a/src/test/isolation/expected/nowait.out b/src/test/isolation/expected/nowait.out new file mode 100644 index 0000000..ea1cdf0 --- /dev/null +++ b/src/test/isolation/expected/nowait.out @@ -0,0 +1,81 @@ +Parsed test spec with 2 sessions + +starting permutation: s1a s1b s2a s2b +step s1a: SELECT * FROM foo FOR UPDATE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s1b: COMMIT; +step s2a: SELECT * FROM foo FOR UPDATE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s2b: COMMIT; + +starting permutation: s1a s2a s1b s2b +step s1a: SELECT * FROM foo FOR UPDATE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s2a: SELECT * FROM foo FOR UPDATE NOWAIT; +ERROR: could not obtain lock on row in relation "foo" +step s1b: COMMIT; +step s2b: COMMIT; + +starting permutation: s1a s2a s2b s1b +step s1a: SELECT * FROM foo FOR UPDATE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s2a: SELECT * FROM foo FOR UPDATE NOWAIT; +ERROR: could not obtain lock on row in relation "foo" +step s2b: COMMIT; +step s1b: COMMIT; + +starting permutation: s2a s1a s1b s2b +step s2a: SELECT * FROM foo FOR UPDATE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s1a: SELECT * FROM foo FOR UPDATE NOWAIT; +ERROR: could not obtain lock on row in relation "foo" +step s1b: COMMIT; +step s2b: COMMIT; + +starting permutation: s2a s1a s2b s1b +step s2a: SELECT * FROM foo FOR UPDATE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s1a: SELECT * FROM foo FOR UPDATE NOWAIT; +ERROR: could not obtain lock on row in relation "foo" +step s2b: COMMIT; +step s1b: COMMIT; + +starting permutation: s2a s2b s1a s1b +step s2a: SELECT * FROM foo FOR UPDATE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s2b: COMMIT; +step s1a: SELECT * FROM foo FOR UPDATE NOWAIT; +id|data +--+---- + 1|x +(1 row) + +step s1b: COMMIT; diff --git a/src/test/isolation/expected/partial-index.out b/src/test/isolation/expected/partial-index.out new file mode 100644 index 0000000..d6cae90 --- /dev/null +++ b/src/test/isolation/expected/partial-index.out @@ -0,0 +1,715 @@ +Parsed test spec with 2 sessions + +starting permutation: rxy1 wx1 c1 wy2 rxy2 c2 +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step c1: COMMIT; +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +(9 rows) + +step c2: COMMIT; + +starting permutation: rxy1 wx1 wy2 c1 rxy2 c2 +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step c1: COMMIT; +step rxy2: select * from test_t where val2 = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rxy1 wx1 wy2 rxy2 c1 c2 +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 wx1 wy2 rxy2 c2 c1 +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 wy2 wx1 c1 rxy2 c2 +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step c1: COMMIT; +step rxy2: select * from test_t where val2 = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rxy1 wy2 wx1 rxy2 c1 c2 +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 wy2 wx1 rxy2 c2 c1 +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 wy2 rxy2 wx1 c1 c2 +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 wy2 rxy2 wx1 c2 c1 +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 wy2 rxy2 c2 wx1 c1 +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step c2: COMMIT; +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: wy2 rxy1 wx1 c1 rxy2 c2 +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step c1: COMMIT; +step rxy2: select * from test_t where val2 = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: wy2 rxy1 wx1 rxy2 c1 c2 +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 rxy1 wx1 rxy2 c2 c1 +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 rxy1 rxy2 wx1 c1 c2 +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 rxy1 rxy2 wx1 c2 c1 +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 rxy1 rxy2 c2 wx1 c1 +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step c2: COMMIT; +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: wy2 rxy2 rxy1 wx1 c1 c2 +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 rxy2 rxy1 wx1 c2 c1 +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 rxy2 rxy1 c2 wx1 c1 +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 + 9|a | 1 +10|a | 1 +(11 rows) + +step c2: COMMIT; +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: wy2 rxy2 c2 rxy1 wx1 c1 +step wy2: update test_t set val2 = 2 where val2 = 1 and id = 9; +step rxy2: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step c2: COMMIT; +step rxy1: select * from test_t where val2 = 1; +id|val1|val2 +--+----+---- + 0|a | 1 + 1|a | 1 + 2|a | 1 + 3|a | 1 + 4|a | 1 + 5|a | 1 + 6|a | 1 + 7|a | 1 + 8|a | 1 +10|a | 1 +(10 rows) + +step wx1: update test_t set val2 = 2 where val2 = 1 and id = 10; +step c1: COMMIT; diff --git a/src/test/isolation/expected/partition-concurrent-attach.out b/src/test/isolation/expected/partition-concurrent-attach.out new file mode 100644 index 0000000..53775f4 --- /dev/null +++ b/src/test/isolation/expected/partition-concurrent-attach.out @@ -0,0 +1,55 @@ +Parsed test spec with 2 sessions + +starting permutation: s1b s1a s2b s2i s1c s2c s2s +step s1b: begin; +step s1a: alter table tpart attach partition tpart_2 for values from (100) to (200); +step s2b: begin; +step s2i: insert into tpart values (110,'xxx'), (120, 'yyy'), (150, 'zzz'); <waiting ...> +step s1c: commit; +step s2i: <... completed> +ERROR: new row for relation "tpart_default" violates partition constraint +step s2c: commit; +step s2s: select tableoid::regclass, * from tpart; +tableoid| i|j +--------+---+--- +tpart_2 |110|xxx +tpart_2 |120|yyy +tpart_2 |150|zzz +(3 rows) + + +starting permutation: s1b s1a s2b s2i2 s1c s2c s2s +step s1b: begin; +step s1a: alter table tpart attach partition tpart_2 for values from (100) to (200); +step s2b: begin; +step s2i2: insert into tpart_default (i, j) values (110, 'xxx'), (120, 'yyy'), (150, 'zzz'); <waiting ...> +step s1c: commit; +step s2i2: <... completed> +ERROR: new row for relation "tpart_default" violates partition constraint +step s2c: commit; +step s2s: select tableoid::regclass, * from tpart; +tableoid| i|j +--------+---+--- +tpart_2 |110|xxx +tpart_2 |120|yyy +tpart_2 |150|zzz +(3 rows) + + +starting permutation: s1b s2b s2i s1a s2c s1c s2s +step s1b: begin; +step s2b: begin; +step s2i: insert into tpart values (110,'xxx'), (120, 'yyy'), (150, 'zzz'); +step s1a: alter table tpart attach partition tpart_2 for values from (100) to (200); <waiting ...> +step s2c: commit; +step s1a: <... completed> +ERROR: updated partition constraint for default partition "tpart_default_default" would be violated by some row +step s1c: commit; +step s2s: select tableoid::regclass, * from tpart; +tableoid | i|j +---------------------+---+--- +tpart_default_default|110|xxx +tpart_default_default|120|yyy +tpart_default_default|150|zzz +(3 rows) + diff --git a/src/test/isolation/expected/partition-drop-index-locking.out b/src/test/isolation/expected/partition-drop-index-locking.out new file mode 100644 index 0000000..9acd51d --- /dev/null +++ b/src/test/isolation/expected/partition-drop-index-locking.out @@ -0,0 +1,100 @@ +Parsed test spec with 3 sessions + +starting permutation: s1begin s1lock s2begin s2drop s1select s3getlocks s1commit s3getlocks s2commit +step s1begin: BEGIN; +step s1lock: LOCK TABLE part_drop_index_locking_subpart_child IN ACCESS SHARE MODE; +step s2begin: BEGIN; +step s2drop: DROP INDEX part_drop_index_locking_idx; <waiting ...> +step s1select: SELECT * FROM part_drop_index_locking_subpart_child; +id +-- +(0 rows) + +step s3getlocks: + SELECT s.query, c.relname, l.mode, l.granted + FROM pg_locks l + JOIN pg_class c ON l.relation = c.oid + JOIN pg_stat_activity s ON l.pid = s.pid + WHERE c.relname LIKE 'part_drop_index_locking%' + ORDER BY s.query, c.relname, l.mode, l.granted; + +query |relname |mode |granted +----------------------------------------------------+---------------------------------------------+-------------------+------- +DROP INDEX part_drop_index_locking_idx; |part_drop_index_locking |AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_idx; |part_drop_index_locking_idx |AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_idx; |part_drop_index_locking_subpart |AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_idx; |part_drop_index_locking_subpart_child |AccessExclusiveLock|f +SELECT * FROM part_drop_index_locking_subpart_child;|part_drop_index_locking_subpart_child |AccessShareLock |t +SELECT * FROM part_drop_index_locking_subpart_child;|part_drop_index_locking_subpart_child_id_idx |AccessShareLock |t +SELECT * FROM part_drop_index_locking_subpart_child;|part_drop_index_locking_subpart_child_id_idx1|AccessShareLock |t +(7 rows) + +step s1commit: COMMIT; +step s2drop: <... completed> +step s3getlocks: + SELECT s.query, c.relname, l.mode, l.granted + FROM pg_locks l + JOIN pg_class c ON l.relation = c.oid + JOIN pg_stat_activity s ON l.pid = s.pid + WHERE c.relname LIKE 'part_drop_index_locking%' + ORDER BY s.query, c.relname, l.mode, l.granted; + +query |relname |mode |granted +---------------------------------------+--------------------------------------------+-------------------+------- +DROP INDEX part_drop_index_locking_idx;|part_drop_index_locking |AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_idx;|part_drop_index_locking_idx |AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_idx;|part_drop_index_locking_subpart |AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_idx;|part_drop_index_locking_subpart_child |AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_idx;|part_drop_index_locking_subpart_child_id_idx|AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_idx;|part_drop_index_locking_subpart_id_idx |AccessExclusiveLock|t +(6 rows) + +step s2commit: COMMIT; + +starting permutation: s1begin s1lock s2begin s2dropsub s1select s3getlocks s1commit s3getlocks s2commit +step s1begin: BEGIN; +step s1lock: LOCK TABLE part_drop_index_locking_subpart_child IN ACCESS SHARE MODE; +step s2begin: BEGIN; +step s2dropsub: DROP INDEX part_drop_index_locking_subpart_idx; <waiting ...> +step s1select: SELECT * FROM part_drop_index_locking_subpart_child; +id +-- +(0 rows) + +step s3getlocks: + SELECT s.query, c.relname, l.mode, l.granted + FROM pg_locks l + JOIN pg_class c ON l.relation = c.oid + JOIN pg_stat_activity s ON l.pid = s.pid + WHERE c.relname LIKE 'part_drop_index_locking%' + ORDER BY s.query, c.relname, l.mode, l.granted; + +query |relname |mode |granted +----------------------------------------------------+---------------------------------------------+-------------------+------- +DROP INDEX part_drop_index_locking_subpart_idx; |part_drop_index_locking_subpart |AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_subpart_idx; |part_drop_index_locking_subpart_child |AccessExclusiveLock|f +DROP INDEX part_drop_index_locking_subpart_idx; |part_drop_index_locking_subpart_idx |AccessExclusiveLock|t +SELECT * FROM part_drop_index_locking_subpart_child;|part_drop_index_locking_subpart_child |AccessShareLock |t +SELECT * FROM part_drop_index_locking_subpart_child;|part_drop_index_locking_subpart_child_id_idx |AccessShareLock |t +SELECT * FROM part_drop_index_locking_subpart_child;|part_drop_index_locking_subpart_child_id_idx1|AccessShareLock |t +(6 rows) + +step s1commit: COMMIT; +step s2dropsub: <... completed> +step s3getlocks: + SELECT s.query, c.relname, l.mode, l.granted + FROM pg_locks l + JOIN pg_class c ON l.relation = c.oid + JOIN pg_stat_activity s ON l.pid = s.pid + WHERE c.relname LIKE 'part_drop_index_locking%' + ORDER BY s.query, c.relname, l.mode, l.granted; + +query |relname |mode |granted +-----------------------------------------------+---------------------------------------------+-------------------+------- +DROP INDEX part_drop_index_locking_subpart_idx;|part_drop_index_locking_subpart |AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_subpart_idx;|part_drop_index_locking_subpart_child |AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_subpart_idx;|part_drop_index_locking_subpart_child_id_idx1|AccessExclusiveLock|t +DROP INDEX part_drop_index_locking_subpart_idx;|part_drop_index_locking_subpart_idx |AccessExclusiveLock|t +(4 rows) + +step s2commit: COMMIT; diff --git a/src/test/isolation/expected/partition-key-update-1.out b/src/test/isolation/expected/partition-key-update-1.out new file mode 100644 index 0000000..7dee144 --- /dev/null +++ b/src/test/isolation/expected/partition-key-update-1.out @@ -0,0 +1,129 @@ +Parsed test spec with 2 sessions + +starting permutation: s1b s2b s1u s1c s2d s2c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1u: UPDATE foo SET a=2 WHERE a=1; +step s1c: COMMIT; +step s2d: DELETE FROM foo WHERE a=1; +step s2c: COMMIT; + +starting permutation: s1b s2b s1u s2d s1c s2c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1u: UPDATE foo SET a=2 WHERE a=1; +step s2d: DELETE FROM foo WHERE a=1; <waiting ...> +step s1c: COMMIT; +step s2d: <... completed> +ERROR: tuple to be locked was already moved to another partition due to concurrent update +step s2c: COMMIT; + +starting permutation: s1b s2b s1u s2u s1c s2c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1u: UPDATE foo SET a=2 WHERE a=1; +step s2u: UPDATE foo SET b='EFG' WHERE a=1; <waiting ...> +step s1c: COMMIT; +step s2u: <... completed> +ERROR: tuple to be locked was already moved to another partition due to concurrent update +step s2c: COMMIT; + +starting permutation: s1b s2b s2d s1u s2c s1c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2d: DELETE FROM foo WHERE a=1; +step s1u: UPDATE foo SET a=2 WHERE a=1; <waiting ...> +step s2c: COMMIT; +step s1u: <... completed> +step s1c: COMMIT; + +starting permutation: s1b s2b s1u2 s1c s2u2 s2c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1u2: UPDATE footrg SET b='EFG' WHERE a=1; +step s1c: COMMIT; +step s2u2: UPDATE footrg SET b='XYZ' WHERE a=1; +step s2c: COMMIT; + +starting permutation: s1b s2b s1u2 s2u2 s1c s2c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1u2: UPDATE footrg SET b='EFG' WHERE a=1; +step s2u2: UPDATE footrg SET b='XYZ' WHERE a=1; <waiting ...> +step s1c: COMMIT; +step s2u2: <... completed> +ERROR: tuple to be locked was already moved to another partition due to concurrent update +step s2c: COMMIT; + +starting permutation: s1b s2b s2u2 s1u2 s2c s1c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2u2: UPDATE footrg SET b='XYZ' WHERE a=1; +step s1u2: UPDATE footrg SET b='EFG' WHERE a=1; <waiting ...> +step s2c: COMMIT; +step s1u2: <... completed> +ERROR: tuple to be locked was already moved to another partition due to concurrent update +step s1c: COMMIT; + +starting permutation: s1b s2b s1u3pc s2i s1c s2c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1u3pc: UPDATE foo_range_parted SET a=11 WHERE a=7; +step s2i: INSERT INTO bar VALUES(7); <waiting ...> +step s1c: COMMIT; +step s2i: <... completed> +ERROR: tuple to be locked was already moved to another partition due to concurrent update +step s2c: COMMIT; + +starting permutation: s1b s2b s1u3pc s2i s1r s2c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1u3pc: UPDATE foo_range_parted SET a=11 WHERE a=7; +step s2i: INSERT INTO bar VALUES(7); <waiting ...> +step s1r: ROLLBACK; +step s2i: <... completed> +step s2c: COMMIT; + +starting permutation: s1b s2b s1u3npc s1u3pc s2i s1c s2c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1u3npc: UPDATE foo_range_parted SET b='XYZ' WHERE a=7; +step s1u3pc: UPDATE foo_range_parted SET a=11 WHERE a=7; +step s2i: INSERT INTO bar VALUES(7); <waiting ...> +step s1c: COMMIT; +step s2i: <... completed> +ERROR: tuple to be locked was already moved to another partition due to concurrent update +step s2c: COMMIT; + +starting permutation: s1b s2b s1u3npc s1u3pc s2i s1r s2c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1u3npc: UPDATE foo_range_parted SET b='XYZ' WHERE a=7; +step s1u3pc: UPDATE foo_range_parted SET a=11 WHERE a=7; +step s2i: INSERT INTO bar VALUES(7); <waiting ...> +step s1r: ROLLBACK; +step s2i: <... completed> +step s2c: COMMIT; + +starting permutation: s1b s2b s1u3npc s1u3pc s1u3pc s2i s1c s2c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1u3npc: UPDATE foo_range_parted SET b='XYZ' WHERE a=7; +step s1u3pc: UPDATE foo_range_parted SET a=11 WHERE a=7; +step s1u3pc: UPDATE foo_range_parted SET a=11 WHERE a=7; +step s2i: INSERT INTO bar VALUES(7); <waiting ...> +step s1c: COMMIT; +step s2i: <... completed> +ERROR: tuple to be locked was already moved to another partition due to concurrent update +step s2c: COMMIT; + +starting permutation: s1b s2b s1u3npc s1u3pc s1u3pc s2i s1r s2c +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s1u3npc: UPDATE foo_range_parted SET b='XYZ' WHERE a=7; +step s1u3pc: UPDATE foo_range_parted SET a=11 WHERE a=7; +step s1u3pc: UPDATE foo_range_parted SET a=11 WHERE a=7; +step s2i: INSERT INTO bar VALUES(7); <waiting ...> +step s1r: ROLLBACK; +step s2i: <... completed> +step s2c: COMMIT; diff --git a/src/test/isolation/expected/partition-key-update-2.out b/src/test/isolation/expected/partition-key-update-2.out new file mode 100644 index 0000000..f054de5 --- /dev/null +++ b/src/test/isolation/expected/partition-key-update-2.out @@ -0,0 +1,33 @@ +Parsed test spec with 3 sessions + +starting permutation: s1u s2donothing s3donothing s1c s2c s3select s3c +step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; +step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; <waiting ...> +step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing') ON CONFLICT DO NOTHING; <waiting ...> +step s1c: COMMIT; +step s2donothing: <... completed> +step s3donothing: <... completed> +step s2c: COMMIT; +step s3select: SELECT * FROM foo ORDER BY a; +a|b +-+----------------------------------- +1|session-2 donothing +2|initial tuple -> moved by session-1 +(2 rows) + +step s3c: COMMIT; + +starting permutation: s2donothing s1u s3donothing s1c s2c s3select s3c +step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; +step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; +step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing') ON CONFLICT DO NOTHING; <waiting ...> +step s1c: COMMIT; +step s3donothing: <... completed> +step s2c: COMMIT; +step s3select: SELECT * FROM foo ORDER BY a; +a|b +-+----------------------------------- +2|initial tuple -> moved by session-1 +(1 row) + +step s3c: COMMIT; diff --git a/src/test/isolation/expected/partition-key-update-3.out b/src/test/isolation/expected/partition-key-update-3.out new file mode 100644 index 0000000..b5872b8 --- /dev/null +++ b/src/test/isolation/expected/partition-key-update-3.out @@ -0,0 +1,155 @@ +Parsed test spec with 3 sessions + +starting permutation: s2beginrr s3beginrr s1u s2donothing s1c s2c s3donothing s3c s2select +step s2beginrr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s3beginrr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; +step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; <waiting ...> +step s1c: COMMIT; +step s2donothing: <... completed> +step s2c: COMMIT; +step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing'), (2, 'session-3 donothing2') ON CONFLICT DO NOTHING; +step s3c: COMMIT; +step s2select: SELECT * FROM foo ORDER BY a; +a|b +-+----------------------------------- +1|session-2 donothing +2|initial tuple -> moved by session-1 +(2 rows) + + +starting permutation: s2beginrr s3beginrr s1u s3donothing s1c s3c s2donothing s2c s2select +step s2beginrr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s3beginrr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; +step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing'), (2, 'session-3 donothing2') ON CONFLICT DO NOTHING; <waiting ...> +step s1c: COMMIT; +step s3donothing: <... completed> +ERROR: could not serialize access due to concurrent update +step s3c: COMMIT; +step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; +step s2c: COMMIT; +step s2select: SELECT * FROM foo ORDER BY a; +a|b +-+----------------------------------- +1|session-2 donothing +2|initial tuple -> moved by session-1 +(2 rows) + + +starting permutation: s2beginrr s3beginrr s1u s2donothing s3donothing s1c s2c s3c s2select +step s2beginrr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s3beginrr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; +step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; <waiting ...> +step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing'), (2, 'session-3 donothing2') ON CONFLICT DO NOTHING; <waiting ...> +step s1c: COMMIT; +step s2donothing: <... completed> +step s3donothing: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +step s3c: COMMIT; +step s2select: SELECT * FROM foo ORDER BY a; +a|b +-+----------------------------------- +1|session-2 donothing +2|initial tuple -> moved by session-1 +(2 rows) + + +starting permutation: s2beginrr s3beginrr s1u s3donothing s2donothing s1c s3c s2c s2select +step s2beginrr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s3beginrr: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; +step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing'), (2, 'session-3 donothing2') ON CONFLICT DO NOTHING; <waiting ...> +step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; <waiting ...> +step s1c: COMMIT; +step s3donothing: <... completed> +ERROR: could not serialize access due to concurrent update +step s2donothing: <... completed> +step s3c: COMMIT; +step s2c: COMMIT; +step s2select: SELECT * FROM foo ORDER BY a; +a|b +-+----------------------------------- +1|session-2 donothing +2|initial tuple -> moved by session-1 +(2 rows) + + +starting permutation: s2begins s3begins s1u s2donothing s1c s2c s3donothing s3c s2select +step s2begins: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s3begins: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; +step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; <waiting ...> +step s1c: COMMIT; +step s2donothing: <... completed> +step s2c: COMMIT; +step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing'), (2, 'session-3 donothing2') ON CONFLICT DO NOTHING; +step s3c: COMMIT; +step s2select: SELECT * FROM foo ORDER BY a; +a|b +-+----------------------------------- +1|session-2 donothing +2|initial tuple -> moved by session-1 +(2 rows) + + +starting permutation: s2begins s3begins s1u s3donothing s1c s3c s2donothing s2c s2select +step s2begins: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s3begins: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; +step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing'), (2, 'session-3 donothing2') ON CONFLICT DO NOTHING; <waiting ...> +step s1c: COMMIT; +step s3donothing: <... completed> +ERROR: could not serialize access due to concurrent update +step s3c: COMMIT; +step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; +step s2c: COMMIT; +step s2select: SELECT * FROM foo ORDER BY a; +a|b +-+----------------------------------- +1|session-2 donothing +2|initial tuple -> moved by session-1 +(2 rows) + + +starting permutation: s2begins s3begins s1u s2donothing s3donothing s1c s2c s3c s2select +step s2begins: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s3begins: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; +step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; <waiting ...> +step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing'), (2, 'session-3 donothing2') ON CONFLICT DO NOTHING; <waiting ...> +step s1c: COMMIT; +step s2donothing: <... completed> +step s3donothing: <... completed> +ERROR: could not serialize access due to concurrent update +step s2c: COMMIT; +step s3c: COMMIT; +step s2select: SELECT * FROM foo ORDER BY a; +a|b +-+----------------------------------- +1|session-2 donothing +2|initial tuple -> moved by session-1 +(2 rows) + + +starting permutation: s2begins s3begins s1u s3donothing s2donothing s1c s3c s2c s2select +step s2begins: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s3begins: BEGIN ISOLATION LEVEL SERIALIZABLE; +step s1u: UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; +step s3donothing: INSERT INTO foo VALUES(2, 'session-3 donothing'), (2, 'session-3 donothing2') ON CONFLICT DO NOTHING; <waiting ...> +step s2donothing: INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; <waiting ...> +step s1c: COMMIT; +step s3donothing: <... completed> +ERROR: could not serialize access due to concurrent update +step s2donothing: <... completed> +step s3c: COMMIT; +step s2c: COMMIT; +step s2select: SELECT * FROM foo ORDER BY a; +a|b +-+----------------------------------- +1|session-2 donothing +2|initial tuple -> moved by session-1 +(2 rows) + diff --git a/src/test/isolation/expected/partition-key-update-4.out b/src/test/isolation/expected/partition-key-update-4.out new file mode 100644 index 0000000..91fa041 --- /dev/null +++ b/src/test/isolation/expected/partition-key-update-4.out @@ -0,0 +1,72 @@ +Parsed test spec with 2 sessions + +starting permutation: s1b s2b s2u1 s1u s2c s1c s1s +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2u1: UPDATE foo SET b = b || ' update2' WHERE a = 1; +step s1u: UPDATE foo SET a = a + 1, b = b || ' update1' WHERE b like '%ABC%'; <waiting ...> +step s2c: COMMIT; +step s1u: <... completed> +step s1c: COMMIT; +step s1s: SELECT tableoid::regclass, * FROM foo ORDER BY a; +tableoid|a|b +--------+-+------------------- +foo2 |2|ABC update2 update1 +(1 row) + + +starting permutation: s1b s2b s2ut1 s1ut s2c s1c s1st s1stl +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2ut1: UPDATE footrg SET b = b || ' update2' WHERE a = 1; +step s1ut: UPDATE footrg SET a = a + 1, b = b || ' update1' WHERE b like '%ABC%'; <waiting ...> +step s2c: COMMIT; +step s1ut: <... completed> +step s1c: COMMIT; +step s1st: SELECT tableoid::regclass, * FROM footrg ORDER BY a; +tableoid|a|b +--------+-+------------------- +footrg2 |2|ABC update2 update1 +(1 row) + +step s1stl: SELECT * FROM triglog ORDER BY a; +a|b +-+------------------- +1|ABC update2 trigger +(1 row) + + +starting permutation: s1b s2b s2u2 s1u s2c s1c s1s +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2u2: UPDATE foo SET b = 'EFG' WHERE a = 1; +step s1u: UPDATE foo SET a = a + 1, b = b || ' update1' WHERE b like '%ABC%'; <waiting ...> +step s2c: COMMIT; +step s1u: <... completed> +step s1c: COMMIT; +step s1s: SELECT tableoid::regclass, * FROM foo ORDER BY a; +tableoid|a|b +--------+-+--- +foo1 |1|EFG +(1 row) + + +starting permutation: s1b s2b s2ut2 s1ut s2c s1c s1st s1stl +step s1b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2b: BEGIN ISOLATION LEVEL READ COMMITTED; +step s2ut2: UPDATE footrg SET b = 'EFG' WHERE a = 1; +step s1ut: UPDATE footrg SET a = a + 1, b = b || ' update1' WHERE b like '%ABC%'; <waiting ...> +step s2c: COMMIT; +step s1ut: <... completed> +step s1c: COMMIT; +step s1st: SELECT tableoid::regclass, * FROM footrg ORDER BY a; +tableoid|a|b +--------+-+--- +footrg1 |1|EFG +(1 row) + +step s1stl: SELECT * FROM triglog ORDER BY a; +a|b +-+- +(0 rows) + diff --git a/src/test/isolation/expected/plpgsql-toast.out b/src/test/isolation/expected/plpgsql-toast.out new file mode 100644 index 0000000..0fee795 --- /dev/null +++ b/src/test/isolation/expected/plpgsql-toast.out @@ -0,0 +1,316 @@ +Parsed test spec with 2 sessions + +starting permutation: lock assign1 vacuum unlock +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + +step lock: + SELECT pg_advisory_lock(1); + +pg_advisory_lock +---------------- + +(1 row) + +step assign1: +do $$ + declare + x text; + begin + select test1.b into x from test1; + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(x) = %', length(x); + end; +$$; + <waiting ...> +step vacuum: + VACUUM test1; + +step unlock: + SELECT pg_advisory_unlock(1); + +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: length(x) = 6000 +step assign1: <... completed> + +starting permutation: lock assign2 vacuum unlock +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + +step lock: + SELECT pg_advisory_lock(1); + +pg_advisory_lock +---------------- + +(1 row) + +step assign2: +do $$ + declare + x text; + begin + x := (select test1.b from test1); + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(x) = %', length(x); + end; +$$; + <waiting ...> +step vacuum: + VACUUM test1; + +step unlock: + SELECT pg_advisory_unlock(1); + +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: length(x) = 6000 +step assign2: <... completed> + +starting permutation: lock assign3 vacuum unlock +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + +step lock: + SELECT pg_advisory_lock(1); + +pg_advisory_lock +---------------- + +(1 row) + +step assign3: +do $$ + declare + r record; + begin + select * into r from test1; + r.b := (select test1.b from test1); + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(r) = %', length(r::text); + end; +$$; + <waiting ...> +step vacuum: + VACUUM test1; + +step unlock: + SELECT pg_advisory_unlock(1); + +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: length(r) = 6004 +step assign3: <... completed> + +starting permutation: lock assign4 vacuum unlock +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + +step lock: + SELECT pg_advisory_lock(1); + +pg_advisory_lock +---------------- + +(1 row) + +step assign4: +do $$ + declare + r test2; + begin + select * into r from test1; + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(r) = %', length(r::text); + end; +$$; + <waiting ...> +step vacuum: + VACUUM test1; + +step unlock: + SELECT pg_advisory_unlock(1); + +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: length(r) = 6004 +step assign4: <... completed> + +starting permutation: lock assign5 vacuum unlock +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + +step lock: + SELECT pg_advisory_lock(1); + +pg_advisory_lock +---------------- + +(1 row) + +step assign5: +do $$ + declare + r record; + begin + for r in select test1.b from test1 loop + null; + end loop; + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(r) = %', length(r::text); + end; +$$; + <waiting ...> +step vacuum: + VACUUM test1; + +step unlock: + SELECT pg_advisory_unlock(1); + +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: length(r) = 6002 +step assign5: <... completed> + +starting permutation: lock assign6 vacuum unlock +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + +step lock: + SELECT pg_advisory_lock(1); + +pg_advisory_lock +---------------- + +(1 row) + +step assign6: +do $$ + declare + r record; + begin + insert into test1 values (2, repeat('bar', 3000)); + insert into test1 values (3, repeat('baz', 4000)); + for r in select test1.b from test1 loop + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(r) = %', length(r::text); + end loop; + end; +$$; + <waiting ...> +step vacuum: + VACUUM test1; + +step unlock: + SELECT pg_advisory_unlock(1); + +pg_advisory_unlock +------------------ +t +(1 row) + +s1: NOTICE: length(r) = 6002 +s1: NOTICE: length(r) = 9002 +s1: NOTICE: length(r) = 12002 +step assign6: <... completed> + +starting permutation: fetch-after-commit +pg_advisory_unlock_all +---------------------- + +(1 row) + +pg_advisory_unlock_all +---------------------- + +(1 row) + +s1: NOTICE: length(t) = 6000 +s1: NOTICE: length(t) = 9000 +s1: NOTICE: length(t) = 12000 +step fetch-after-commit: +do $$ + declare + r record; + t text; + begin + insert into test1 values (2, repeat('bar', 3000)); + insert into test1 values (3, repeat('baz', 4000)); + for r in select test1.a from test1 loop + commit; + select b into t from test1 where a = r.a; + raise notice 'length(t) = %', length(t); + end loop; + end; +$$; + diff --git a/src/test/isolation/expected/predicate-gin.out b/src/test/isolation/expected/predicate-gin.out new file mode 100644 index 0000000..c032804 --- /dev/null +++ b/src/test/isolation/expected/predicate-gin.out @@ -0,0 +1,581 @@ +Parsed test spec with 3 sessions + +starting permutation: ra1 ro2 wo1 c1 wa2 c2 +step ra1: select * from gin_tbl where p @> array[1] limit 1; +p +--- +{1} +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wa2: insert into gin_tbl values (array[1]); +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: ro2 ra1 wo1 c1 wa2 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step ra1: select * from gin_tbl where p @> array[1] limit 1; +p +--- +{1} +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wa2: insert into gin_tbl values (array[1]); +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: ro2 ra1 wo1 wa2 c1 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step ra1: select * from gin_tbl where p @> array[1] limit 1; +p +--- +{1} +(1 row) + +step wo1: insert into other_tbl values (1); +step wa2: insert into gin_tbl values (array[1]); +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ra1 ro2 wa2 wo1 c1 c2 +step ra1: select * from gin_tbl where p @> array[1] limit 1; +p +--- +{1} +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wa2: insert into gin_tbl values (array[1]); +step wo1: insert into other_tbl values (1); +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rb1 ro2 wo1 c1 wb2 c2 +step rb1: select count(*) from gin_tbl where p @> array[2]; +count +----- + 1 +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wb2: insert into gin_tbl values (array[2]); +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: ro2 rb1 wo1 c1 wb2 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step rb1: select count(*) from gin_tbl where p @> array[2]; +count +----- + 1 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wb2: insert into gin_tbl values (array[2]); +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: ro2 rb1 wo1 wb2 c1 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step rb1: select count(*) from gin_tbl where p @> array[2]; +count +----- + 1 +(1 row) + +step wo1: insert into other_tbl values (1); +step wb2: insert into gin_tbl values (array[2]); +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rb1 ro2 wb2 wo1 c1 c2 +step rb1: select count(*) from gin_tbl where p @> array[2]; +count +----- + 1 +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wb2: insert into gin_tbl values (array[2]); +step wo1: insert into other_tbl values (1); +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rc1 ro2 wo1 c1 wc2 c2 +step rc1: select count(*) from gin_tbl where p @> array[800]; +count +----- + 1 +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wc2: insert into gin_tbl values (array[800]); +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: ro2 rc1 wo1 c1 wc2 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step rc1: select count(*) from gin_tbl where p @> array[800]; +count +----- + 1 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wc2: insert into gin_tbl values (array[800]); +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: ro2 rc1 wo1 wc2 c1 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step rc1: select count(*) from gin_tbl where p @> array[800]; +count +----- + 1 +(1 row) + +step wo1: insert into other_tbl values (1); +step wc2: insert into gin_tbl values (array[800]); +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rc1 ro2 wc2 wo1 c1 c2 +step rc1: select count(*) from gin_tbl where p @> array[800]; +count +----- + 1 +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wc2: insert into gin_tbl values (array[800]); +step wo1: insert into other_tbl values (1); +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ra1 ro2 wo1 c1 wb2 c2 +step ra1: select * from gin_tbl where p @> array[1] limit 1; +p +--- +{1} +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wb2: insert into gin_tbl values (array[2]); +step c2: commit; + +starting permutation: ro2 ra1 wo1 c1 wc2 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step ra1: select * from gin_tbl where p @> array[1] limit 1; +p +--- +{1} +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wc2: insert into gin_tbl values (array[800]); +step c2: commit; + +starting permutation: ro2 rb1 wo1 wa2 c1 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step rb1: select count(*) from gin_tbl where p @> array[2]; +count +----- + 1 +(1 row) + +step wo1: insert into other_tbl values (1); +step wa2: insert into gin_tbl values (array[1]); +step c1: commit; +step c2: commit; + +starting permutation: rc1 ro2 wa2 wo1 c1 c2 +step rc1: select count(*) from gin_tbl where p @> array[800]; +count +----- + 1 +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wa2: insert into gin_tbl values (array[1]); +step wo1: insert into other_tbl values (1); +step c1: commit; +step c2: commit; + +starting permutation: rb1 ro2 wo1 c1 wa2 c2 +step rb1: select count(*) from gin_tbl where p @> array[2]; +count +----- + 1 +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wa2: insert into gin_tbl values (array[1]); +step c2: commit; + +starting permutation: ro2 rb1 wo1 c1 wc2 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step rb1: select count(*) from gin_tbl where p @> array[2]; +count +----- + 1 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wc2: insert into gin_tbl values (array[800]); +step c2: commit; + +starting permutation: ro2 ra1 wo1 wb2 c1 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step ra1: select * from gin_tbl where p @> array[1] limit 1; +p +--- +{1} +(1 row) + +step wo1: insert into other_tbl values (1); +step wb2: insert into gin_tbl values (array[2]); +step c1: commit; +step c2: commit; + +starting permutation: rc1 ro2 wb2 wo1 c1 c2 +step rc1: select count(*) from gin_tbl where p @> array[800]; +count +----- + 1 +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wb2: insert into gin_tbl values (array[2]); +step wo1: insert into other_tbl values (1); +step c1: commit; +step c2: commit; + +starting permutation: rc1 ro2 wo1 c1 wa2 c2 +step rc1: select count(*) from gin_tbl where p @> array[800]; +count +----- + 1 +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wa2: insert into gin_tbl values (array[1]); +step c2: commit; + +starting permutation: ro2 rc1 wo1 c1 wb2 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step rc1: select count(*) from gin_tbl where p @> array[800]; +count +----- + 1 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wb2: insert into gin_tbl values (array[2]); +step c2: commit; + +starting permutation: ro2 ra1 wo1 wc2 c1 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step ra1: select * from gin_tbl where p @> array[1] limit 1; +p +--- +{1} +(1 row) + +step wo1: insert into other_tbl values (1); +step wc2: insert into gin_tbl values (array[800]); +step c1: commit; +step c2: commit; + +starting permutation: rb1 ro2 wc2 wo1 c1 c2 +step rb1: select count(*) from gin_tbl where p @> array[2]; +count +----- + 1 +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wc2: insert into gin_tbl values (array[800]); +step wo1: insert into other_tbl values (1); +step c1: commit; +step c2: commit; + +starting permutation: fu ra1 ro2 wo1 c1 wa2 c2 +step fu: alter index ginidx set (fastupdate = on); +step ra1: select * from gin_tbl where p @> array[1] limit 1; +p +--- +{1} +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wa2: insert into gin_tbl values (array[1]); +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: fu ra1 ro2 wo1 c1 wb2 c2 +step fu: alter index ginidx set (fastupdate = on); +step ra1: select * from gin_tbl where p @> array[1] limit 1; +p +--- +{1} +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wb2: insert into gin_tbl values (array[2]); +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: ra1 ro2 wo1 c1 fu wa2 c2 +step ra1: select * from gin_tbl where p @> array[1] limit 1; +p +--- +{1} +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step fu: alter index ginidx set (fastupdate = on); +step wa2: insert into gin_tbl values (array[1]); +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: rd1 ro2 wo1 c1 wd2 c2 +step rd1: select count(*) from gin_tbl where p @> array[2000]; +count +----- + 0 +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wd2: insert into gin_tbl values (array[2000]); +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: ro2 rd1 wo1 c1 wd2 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step rd1: select count(*) from gin_tbl where p @> array[2000]; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step c1: commit; +step wd2: insert into gin_tbl values (array[2000]); +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: ro2 rd1 wo1 wd2 c1 c2 +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step rd1: select count(*) from gin_tbl where p @> array[2000]; +count +----- + 0 +(1 row) + +step wo1: insert into other_tbl values (1); +step wd2: insert into gin_tbl values (array[2000]); +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rd1 ro2 wd2 wo1 c1 c2 +step rd1: select count(*) from gin_tbl where p @> array[2000]; +count +----- + 0 +(1 row) + +step ro2: select count(*) from other_tbl; +count +----- + 0 +(1 row) + +step wd2: insert into gin_tbl values (array[2000]); +step wo1: insert into other_tbl values (1); +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions diff --git a/src/test/isolation/expected/predicate-gist.out b/src/test/isolation/expected/predicate-gist.out new file mode 100644 index 0000000..ef5d386 --- /dev/null +++ b/src/test/isolation/expected/predicate-gist.out @@ -0,0 +1,819 @@ +Parsed test spec with 2 sessions + +starting permutation: rxy1 wx1 c1 rxy2 wy2 c2 +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step c1: commit; +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2233750 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step c2: commit; + +starting permutation: rxy2 wy2 c2 rxy1 wx1 c1 +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step c2: commit; +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +316250 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step c1: commit; + +starting permutation: rxy3 wx3 c1 rxy4 wy4 c2 +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c1: commit; +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c2: commit; + +starting permutation: rxy4 wy4 c2 rxy3 wx3 c1 +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c2: commit; +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c1: commit; + +starting permutation: rxy1 wx1 rxy2 c1 wy2 c2 +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step c1: commit; +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: rxy1 wx1 rxy2 wy2 c1 c2 +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 wx1 rxy2 wy2 c2 c1 +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 rxy2 wx1 c1 wy2 c2 +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step c1: commit; +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: rxy1 rxy2 wx1 wy2 c1 c2 +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 rxy2 wx1 wy2 c2 c1 +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 rxy2 wy2 wx1 c1 c2 +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 rxy2 wy2 wx1 c2 c1 +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 rxy2 wy2 c2 wx1 c1 +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step c2: commit; +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: commit; + +starting permutation: rxy2 rxy1 wx1 c1 wy2 c2 +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step c1: commit; +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: rxy2 rxy1 wx1 wy2 c1 c2 +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 rxy1 wx1 wy2 c2 c1 +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 rxy1 wy2 wx1 c1 c2 +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 rxy1 wy2 wx1 c2 c1 +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 rxy1 wy2 c2 wx1 c1 +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step c2: commit; +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: commit; + +starting permutation: rxy2 wy2 rxy1 wx1 c1 c2 +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 wy2 rxy1 wx1 c2 c1 +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 wy2 rxy1 c2 wx1 c1 +step rxy2: select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); + sum +------- +2188750 +(1 row) + +step wy2: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; +step rxy1: select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); + sum +------ +311250 +(1 row) + +step c2: commit; +step wx1: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: commit; + +starting permutation: rxy3 wx3 rxy4 c1 wy4 c2 +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step c1: commit; +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c2: commit; + +starting permutation: rxy3 wx3 rxy4 wy4 c1 c2 +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy3 wx3 rxy4 wy4 c2 c1 +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy3 rxy4 wx3 c1 wy4 c2 +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c1: commit; +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c2: commit; + +starting permutation: rxy3 rxy4 wx3 wy4 c1 c2 +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy3 rxy4 wx3 wy4 c2 c1 +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy3 rxy4 wy4 wx3 c1 c2 +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy3 rxy4 wy4 wx3 c2 c1 +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy3 rxy4 wy4 c2 wx3 c1 +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c2: commit; +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c1: commit; + +starting permutation: rxy4 rxy3 wx3 c1 wy4 c2 +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c1: commit; +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c2: commit; + +starting permutation: rxy4 rxy3 wx3 wy4 c1 c2 +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy4 rxy3 wx3 wy4 c2 c1 +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy4 rxy3 wy4 wx3 c1 c2 +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy4 rxy3 wy4 wx3 c2 c1 +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy4 rxy3 wy4 c2 wx3 c1 +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step c2: commit; +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c1: commit; + +starting permutation: rxy4 wy4 rxy3 wx3 c1 c2 +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy4 wy4 rxy3 wx3 c2 c1 +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy4 wy4 rxy3 c2 wx3 c1 +step rxy4: select sum(p[0]) from gist_point_tbl where p << point(1000,1000); + sum +----- +49500 +(1 row) + +step wy4: insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; +step rxy3: select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); + sum +------- +3202000 +(1 row) + +step c2: commit; +step wx3: insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; +step c1: commit; diff --git a/src/test/isolation/expected/predicate-hash.out b/src/test/isolation/expected/predicate-hash.out new file mode 100644 index 0000000..2009252 --- /dev/null +++ b/src/test/isolation/expected/predicate-hash.out @@ -0,0 +1,819 @@ +Parsed test spec with 2 sessions + +starting permutation: rxy1 wx1 c1 rxy2 wy2 c2 +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step c1: commit; +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +600 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step c2: commit; + +starting permutation: rxy2 wy2 c2 rxy1 wx1 c1 +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step c2: commit; +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +400 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step c1: commit; + +starting permutation: rxy3 wx3 c1 rxy4 wy4 c2 +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c1: commit; +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c2: commit; + +starting permutation: rxy4 wy4 c2 rxy3 wx3 c1 +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c2: commit; +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c1: commit; + +starting permutation: rxy1 wx1 rxy2 c1 wy2 c2 +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step c1: commit; +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: rxy1 wx1 rxy2 wy2 c1 c2 +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 wx1 rxy2 wy2 c2 c1 +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 rxy2 wx1 c1 wy2 c2 +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step c1: commit; +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: rxy1 rxy2 wx1 wy2 c1 c2 +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 rxy2 wx1 wy2 c2 c1 +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 rxy2 wy2 wx1 c1 c2 +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 rxy2 wy2 wx1 c2 c1 +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy1 rxy2 wy2 c2 wx1 c1 +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step c2: commit; +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: commit; + +starting permutation: rxy2 rxy1 wx1 c1 wy2 c2 +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step c1: commit; +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: commit; + +starting permutation: rxy2 rxy1 wx1 wy2 c1 c2 +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 rxy1 wx1 wy2 c2 c1 +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 rxy1 wy2 wx1 c1 c2 +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 rxy1 wy2 wx1 c2 c1 +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 rxy1 wy2 c2 wx1 c1 +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step c2: commit; +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: commit; + +starting permutation: rxy2 wy2 rxy1 wx1 c1 c2 +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step c1: commit; +step c2: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 wy2 rxy1 wx1 c2 c1 +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +step c2: commit; +step c1: commit; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxy2 wy2 rxy1 c2 wx1 c1 +step rxy2: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy2: insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; +step rxy1: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step c2: commit; +step wx1: insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: commit; + +starting permutation: rxy3 wx3 rxy4 c1 wy4 c2 +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step c1: commit; +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c2: commit; + +starting permutation: rxy3 wx3 rxy4 wy4 c1 c2 +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy3 wx3 rxy4 wy4 c2 c1 +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy3 rxy4 wx3 c1 wy4 c2 +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c1: commit; +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c2: commit; + +starting permutation: rxy3 rxy4 wx3 wy4 c1 c2 +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy3 rxy4 wx3 wy4 c2 c1 +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy3 rxy4 wy4 wx3 c1 c2 +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy3 rxy4 wy4 wx3 c2 c1 +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy3 rxy4 wy4 c2 wx3 c1 +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c2: commit; +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c1: commit; + +starting permutation: rxy4 rxy3 wx3 c1 wy4 c2 +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c1: commit; +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c2: commit; + +starting permutation: rxy4 rxy3 wx3 wy4 c1 c2 +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy4 rxy3 wx3 wy4 c2 c1 +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy4 rxy3 wy4 wx3 c1 c2 +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy4 rxy3 wy4 wx3 c2 c1 +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy4 rxy3 wy4 c2 wx3 c1 +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step c2: commit; +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c1: commit; + +starting permutation: rxy4 wy4 rxy3 wx3 c1 c2 +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c1: commit; +step c2: commit; + +starting permutation: rxy4 wy4 rxy3 wx3 c2 c1 +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c2: commit; +step c1: commit; + +starting permutation: rxy4 wy4 rxy3 c2 wx3 c1 +step rxy4: select sum(p) from hash_tbl where p=30; +sum +--- +300 +(1 row) + +step wy4: insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; +step rxy3: select sum(p) from hash_tbl where p=20; +sum +--- +200 +(1 row) + +step c2: commit; +step wx3: insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; +step c1: commit; diff --git a/src/test/isolation/expected/predicate-lock-hot-tuple.out b/src/test/isolation/expected/predicate-lock-hot-tuple.out new file mode 100644 index 0000000..d316edb --- /dev/null +++ b/src/test/isolation/expected/predicate-lock-hot-tuple.out @@ -0,0 +1,24 @@ +Parsed test spec with 2 sessions + +starting permutation: b1 b2 r1 r2 w1 w2 c1 c2 +step b1: BEGIN ISOLATION LEVEL SERIALIZABLE; +step b2: BEGIN ISOLATION LEVEL SERIALIZABLE; +step r1: SELECT * FROM test WHERE i IN (5, 7) +i|t +-+---------------- +5|apple +7|pear_hot_updated +(2 rows) + +step r2: SELECT * FROM test WHERE i IN (5, 7) +i|t +-+---------------- +5|apple +7|pear_hot_updated +(2 rows) + +step w1: UPDATE test SET t = 'pear_xact1' WHERE i = 7 +step w2: UPDATE test SET t = 'apple_xact2' WHERE i = 5 +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions diff --git a/src/test/isolation/expected/prepared-transactions-cic.out b/src/test/isolation/expected/prepared-transactions-cic.out new file mode 100644 index 0000000..ac0ee69 --- /dev/null +++ b/src/test/isolation/expected/prepared-transactions-cic.out @@ -0,0 +1,20 @@ +Parsed test spec with 2 sessions + +starting permutation: w1 p1 cic2 c1 r2 +step w1: BEGIN; INSERT INTO cic_test VALUES (1); +step p1: PREPARE TRANSACTION 's1'; +step cic2: + CREATE INDEX CONCURRENTLY on cic_test(a); + +ERROR: canceling statement due to lock timeout +step c1: COMMIT PREPARED 's1'; +step r2: + SET enable_seqscan to off; + SET enable_bitmapscan to off; + SELECT * FROM cic_test WHERE a = 1; + +a +- +1 +(1 row) + diff --git a/src/test/isolation/expected/prepared-transactions.out b/src/test/isolation/expected/prepared-transactions.out new file mode 100644 index 0000000..8a66bf9 --- /dev/null +++ b/src/test/isolation/expected/prepared-transactions.out @@ -0,0 +1,48205 @@ +Parsed test spec with 4 sessions + +starting permutation: r1 r2 w2 w3 p1 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p1 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p1 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p1 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p1 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p1 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p1 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p2 p1 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p2 p1 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p2 p3 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p2 p3 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p2 p3 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p2 p3 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p2 p3 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 w3 p3 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p1 w3 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p1 w3 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p1 w3 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p1 w3 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p1 w3 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p1 w3 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p1 w3 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p1 p2 w3 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p1 p2 w3 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p2 w3 p1 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p2 w3 p1 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p2 w3 p3 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p2 w3 p3 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p2 w3 p3 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p2 w3 p3 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p2 w3 p3 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p2 p1 w3 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 w2 p2 p1 w3 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 p1 w2 w3 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 p1 w2 w3 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 p1 w2 w3 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 p1 w2 w3 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 p1 w2 w3 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 p1 w2 w3 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 p1 w2 w3 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 p1 w2 p2 w3 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 r2 p1 w2 p2 w3 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p1 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p1 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p1 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p1 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p1 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p1 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p1 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p2 p1 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p2 p1 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p2 p3 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p2 p3 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p2 p3 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p2 p3 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p2 p3 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 r2 p3 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 r2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 r2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 r2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 r2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 r2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 r2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 r2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 p3 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 p3 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 p3 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 p3 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 p3 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 p3 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 p3 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 p3 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p1 p3 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 r2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 p1 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 p1 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 p1 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 p1 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 p1 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 p1 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 p1 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 p1 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 p1 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 c3 r2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 c3 r2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 c3 r2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 c3 r2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 c3 r2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 c3 r2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 c3 p1 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 c3 p1 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 c3 p1 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 w3 p3 c3 p1 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 r2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 r2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 r2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 r2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 r2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 r2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 r2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 p3 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 p3 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 p3 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 p3 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 p3 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 p3 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 p3 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 p3 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w2 p1 w3 p3 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p1 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p1 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p1 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p1 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p1 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p1 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p1 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p2 p1 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p2 p1 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p2 p3 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p2 p3 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p2 p3 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p2 p3 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p2 p3 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 w2 p3 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 w2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 w2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 w2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 w2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 w2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 w2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 w2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 p3 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 p3 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 p3 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 p3 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 p3 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 p3 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 p3 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 p3 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p1 p3 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 w2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 p1 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 p1 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 p1 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 p1 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 p1 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 p1 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 p1 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 p1 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 p1 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 c3 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 c3 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 c3 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 c3 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 c3 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 c3 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 c3 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 c3 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 c3 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 r2 p3 c3 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p1 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p1 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p1 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p1 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p1 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p1 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p1 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p2 p1 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p2 p1 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p2 p3 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p2 p3 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p2 p3 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p2 p3 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p2 p3 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 r2 p3 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 r2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 r2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 r2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 r2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 r2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 r2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 r2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 p3 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 p3 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 p3 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 p3 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 p3 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 p3 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 p3 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 p3 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p1 p3 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 r2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 p1 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 p1 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 p1 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 p1 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 p1 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 p1 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 p1 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 p1 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 p1 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 c3 r2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 c3 r2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 c3 r2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 c3 r2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 c3 r2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 c3 r2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 c3 p1 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 c3 p1 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 c3 p1 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 w2 p3 c3 p1 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 w2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 w2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 w2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 w2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 w2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 w2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 w2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 p3 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 p3 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 p3 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 p3 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 p3 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 p3 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 p3 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 p3 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 r2 p3 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 r2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 r2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 r2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 r2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 r2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 r2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 r2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 p3 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 p3 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 p3 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 p3 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 p3 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 p3 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 p3 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 p3 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 w2 p3 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 r2 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 r2 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 r2 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 r2 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 r2 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 r2 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 r2 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 r2 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 r2 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 w2 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 w2 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 w2 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 w2 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 w2 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 w2 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 w2 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 w2 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 w2 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 c3 r2 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 c3 r2 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 c3 r2 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 c3 r2 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 c3 w2 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 c3 w2 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 c3 w2 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 c3 w2 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 c3 c1 r2 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p1 p3 c3 c1 w2 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 w2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 p1 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 p1 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 p1 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 p1 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 p1 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 p1 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 p1 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 p1 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 p1 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 c3 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 c3 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 c3 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 c3 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 c3 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 c3 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 c3 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 c3 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 c3 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 r2 c3 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 r2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 p1 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 p1 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 p1 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 p1 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 p1 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 p1 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 p1 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 p1 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 p1 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 c3 r2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 c3 r2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 c3 r2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 c3 r2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 c3 r2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 c3 r2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 c3 p1 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 c3 p1 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 c3 p1 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 w2 c3 p1 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 r2 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 r2 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 r2 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 r2 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 r2 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 r2 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 r2 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 r2 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 r2 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 w2 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 w2 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 w2 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 w2 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 w2 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 w2 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 w2 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 w2 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 w2 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 c3 r2 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 c3 r2 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 c3 r2 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 c3 r2 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 c3 w2 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 c3 w2 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 c3 w2 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 c3 w2 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 c3 c1 r2 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 p1 c3 c1 w2 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 r2 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 r2 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 r2 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 r2 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 r2 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 r2 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 r2 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 r2 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 r2 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 r2 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 w2 r2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 w2 r2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 w2 r2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 w2 r2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 w2 r2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 w2 r2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 w2 p1 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 w2 p1 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 w2 p1 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 w2 p1 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 p1 r2 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 p1 r2 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 p1 r2 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 p1 r2 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 p1 w2 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 p1 w2 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 p1 w2 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 p1 w2 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 p1 c1 r2 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 w3 p3 c3 p1 c1 w2 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 r2 w2 w3 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 r2 w2 w3 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 r2 w2 w3 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 r2 w2 w3 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 r2 w2 w3 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 r2 w2 w3 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 r2 w2 w3 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 r2 w2 p2 w3 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 r2 w2 p2 w3 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 r2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 r2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 r2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 r2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 r2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 r2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 r2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 p3 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 p3 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 p3 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 p3 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 p3 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 p3 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 p3 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 p3 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w2 w3 p3 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 w2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 w2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 w2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 w2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 w2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 w2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 w2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 p3 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 p3 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 p3 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 p3 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 p3 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 p3 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 p3 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 p3 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 r2 p3 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 r2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 r2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 r2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 r2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 r2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 r2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 r2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 p3 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 p3 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 p3 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 p3 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 p3 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 p3 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 p3 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 p3 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 w2 p3 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 r2 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 r2 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 r2 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 r2 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 r2 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 r2 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 r2 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 r2 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 r2 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 w2 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 w2 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 w2 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 w2 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 w2 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 w2 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 w2 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 w2 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 w2 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 c3 r2 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 c3 r2 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 c3 r2 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 c3 r2 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 c3 w2 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 c3 w2 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 c3 w2 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 c3 w2 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 c3 c1 r2 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: r1 p1 w3 p3 c3 c1 w2 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p1 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p1 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p1 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p1 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p1 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p1 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p1 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p2 p1 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p2 p1 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p2 p3 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p2 p3 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p2 p3 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p2 p3 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p2 p3 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 w3 p3 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p1 w3 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p1 w3 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p1 w3 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p1 w3 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p1 w3 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p1 w3 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p1 w3 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p1 p2 w3 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p1 p2 w3 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p2 w3 p1 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p2 w3 p1 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p2 w3 p3 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p2 w3 p3 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p2 w3 p3 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p2 w3 p3 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p2 w3 p3 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p2 p1 w3 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 r2 p2 p1 w3 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p1 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p1 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p1 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p1 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p1 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p1 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p1 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p2 p1 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p2 p1 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p2 p3 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p2 p3 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p2 p3 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p2 p3 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p2 p3 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 r2 p3 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 r2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 r2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 r2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 r2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 r2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 r2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 r2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 p3 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 p3 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 p3 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 p3 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 p3 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 p3 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 p3 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 p3 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p1 p3 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 r2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 p1 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 p1 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 p1 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 p1 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 p1 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 p1 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 p1 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 p1 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 p1 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 c3 r2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 c3 r2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 c3 r2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 c3 r2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 c3 r2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 c3 r2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 c3 p1 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 c3 p1 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 c3 p1 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 w3 p3 c3 p1 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 r2 w3 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 r2 w3 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 r2 w3 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 r2 w3 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 r2 w3 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 r2 w3 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 r2 w3 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 r2 p2 w3 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 r2 p2 w3 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 r2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 r2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 r2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 r2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 r2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 r2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 r2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 p3 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 p3 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 p3 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 p3 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 p3 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 p3 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 p3 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 p3 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w2 r1 p1 w3 p3 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p1 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p1 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p1 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p1 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p1 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p1 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p1 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p2 p1 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p2 p1 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p2 p3 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p2 p3 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p2 p3 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p2 p3 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p2 p3 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 w2 p3 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 w2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 w2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 w2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 w2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 w2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 w2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 w2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 p3 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 p3 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 p3 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 p3 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 p3 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 p3 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 p3 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 p3 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p1 p3 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 w2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 p1 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 p1 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 p1 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 p1 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 p1 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 p1 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 p1 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 p1 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 p1 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 c3 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 c3 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 c3 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 c3 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 c3 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 c3 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 c3 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 c3 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 c3 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 r2 p3 c3 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p1 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p1 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p1 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p1 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p1 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p1 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p1 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p2 p1 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p2 p1 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p2 p3 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p2 p3 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p2 p3 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p2 p3 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p2 p3 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 r2 p3 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 r2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 r2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 r2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 r2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 r2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 r2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 r2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 p3 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 p3 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 p3 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 p3 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 p3 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 p3 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 p3 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 p3 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p1 p3 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 r2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 p1 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 p1 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 p1 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 p1 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 p1 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 p1 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 p1 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 p1 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 p1 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 c3 r2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 c3 r2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 c3 r2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 c3 r2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 c3 r2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 c3 r2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 c3 p1 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 c3 p1 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 c3 p1 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 w2 p3 c3 p1 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 w2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 w2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 w2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 w2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 w2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 w2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 w2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 p3 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 p3 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 p3 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 p3 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 p3 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 p3 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 p3 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 p3 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 r2 p3 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 r2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 r2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 r2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 r2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 r2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 r2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 r2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 p3 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 p3 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 p3 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 p3 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 p3 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 p3 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 p3 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 p3 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 w2 p3 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 r2 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 r2 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 r2 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 r2 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 r2 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 r2 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 r2 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 r2 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 r2 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 w2 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 w2 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 w2 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 w2 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 w2 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 w2 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 w2 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 w2 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 w2 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 c3 r2 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 c3 r2 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 c3 r2 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 c3 r2 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 c3 w2 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 c3 w2 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 c3 w2 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 c3 w2 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 c3 c1 r2 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p1 p3 c3 c1 w2 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 w2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 p1 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 p1 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 p1 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 p1 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 p1 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 p1 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 p1 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 p1 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 p1 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 c3 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 c3 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 c3 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 c3 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 c3 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 c3 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 c3 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 c3 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 c3 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 r2 c3 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 r2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 p1 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 p1 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 p1 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 p1 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 p1 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 p1 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 p1 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 p1 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 p1 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 c3 r2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 c3 r2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 c3 r2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 c3 r2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 c3 r2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 c3 r2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 c3 p1 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 c3 p1 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 c3 p1 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 w2 c3 p1 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 r2 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 r2 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 r2 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 r2 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 r2 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 r2 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 r2 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 r2 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 r2 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 w2 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 w2 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 w2 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 w2 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 w2 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 w2 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 w2 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 w2 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 w2 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 c3 r2 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 c3 r2 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 c3 r2 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 c3 r2 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 c3 w2 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 c3 w2 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 c3 w2 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 c3 w2 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 c3 c1 r2 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 p1 c3 c1 w2 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 r2 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 r2 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 r2 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 r2 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 r2 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 r2 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 r2 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 r2 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 r2 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 r2 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 w2 r2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 w2 r2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 w2 r2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 w2 r2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 w2 r2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 w2 r2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 w2 p1 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 w2 p1 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 w2 p1 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 w2 p1 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 p1 r2 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 p1 r2 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 p1 r2 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 p1 r2 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 p1 w2 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 p1 w2 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 p1 w2 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 p1 w2 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 p1 c1 r2 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r1 p3 c3 p1 c1 w2 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p1 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p1 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p1 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p1 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p1 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p1 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p1 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p2 p1 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p2 p1 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p2 p3 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p2 p3 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p2 p3 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p2 p3 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p2 p3 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 w2 p3 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 w2 p2 p3 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 w2 p2 p3 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p2: PREPARE TRANSACTION 's2'; +step p3: PREPARE TRANSACTION 's3'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +ERROR: prepared transaction with identifier "s3" does not exist +step c2: COMMIT PREPARED 's2'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 w2 p3 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 w2 p3 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 w2 p3 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 w2 p3 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 w2 p3 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 p3 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 p3 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 p3 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 p3 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 p3 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 p3 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 p3 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 p3 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p1 p3 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 w2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 p1 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 p1 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 p1 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 p1 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 p1 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 p1 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 p1 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 p1 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 p1 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 c3 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 c3 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 c3 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 c3 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 c3 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 c3 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 c3 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 c3 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 c3 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 r1 p3 c3 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 w2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 p1 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 p1 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 p1 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 p1 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 p1 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 p1 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 p1 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 p1 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 p1 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 c3 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 c3 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 c3 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 c3 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 c3 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 c3 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 c3 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 c3 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 c3 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 r1 c3 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 c3 r1 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 c3 r1 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 c3 r1 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 c3 r1 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 c3 r1 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 c3 r1 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 c3 r1 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 c3 r1 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 c3 r1 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 r2 p3 c3 r1 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 w2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 p1 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 p1 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 p1 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 p1 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 p1 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 p1 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 p1 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 p1 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 p1 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 c3 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 c3 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 c3 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 c3 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 c3 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 c3 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 c3 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 c3 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 c3 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 r2 c3 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 r2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 p1 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 p1 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 p1 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 p1 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 p1 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 p1 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 p1 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 p1 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 p1 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 c3 r2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 c3 r2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 c3 r2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 c3 r2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 c3 r2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 c3 r2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 c3 p1 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 c3 p1 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 c3 p1 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 w2 c3 p1 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 r2 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 r2 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 r2 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 r2 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 r2 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 r2 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 r2 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 r2 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 r2 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 w2 r2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 w2 r2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 w2 r2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 w2 r2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 w2 r2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 w2 c3 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 w2 c3 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 w2 c3 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 w2 c3 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 c3 r2 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 c3 r2 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 c3 r2 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 c3 r2 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 c3 w2 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 c3 w2 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 c3 w2 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 c3 w2 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 c3 c1 r2 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 p1 c3 c1 w2 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 r2 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 r2 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 r2 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 r2 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 r2 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 r2 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 r2 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 r2 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 r2 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 r2 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 w2 r2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 w2 r2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 w2 r2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 w2 r2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 w2 r2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 w2 r2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 w2 p1 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 w2 p1 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 w2 p1 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 w2 p1 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 p1 r2 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 p1 r2 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 p1 r2 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 p1 r2 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 p1 w2 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 p1 w2 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 p1 w2 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 p1 w2 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 p1 c1 r2 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r1 c3 p1 c1 w2 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 p1 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 p1 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 p1 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 p1 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 p1 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 p2 p1 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 p2 p1 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 p2 c3 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 p2 c3 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 p2 c3 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 c3 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 c3 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 c3 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 c3 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 c3 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 w2 c3 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 p1 w2 p2 c3 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 p1 w2 p2 c3 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c3: COMMIT PREPARED 's3'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 p1 w2 c3 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 p1 w2 c3 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 p1 w2 c3 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 p1 c3 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 p1 c3 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 p1 c3 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 p1 c3 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c3: COMMIT PREPARED 's3'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 c3 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 c3 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 c3 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 c3 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 c3 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 c3 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 c3 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 c3 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 c3 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 r1 c3 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 c3 r1 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 c3 r1 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 c3 r1 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 c3 r1 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 c3 r1 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 c3 r1 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 c3 r1 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 c3 r1 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 c3 r1 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 r2 c3 r1 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 r2 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 r2 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 r2 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 r2 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 r2 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 r2 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 r2 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 r2 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 r2 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 r2 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 w2 r2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 w2 r2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 w2 r2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 w2 r2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 w2 r2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 w2 r2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 w2 p1 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 w2 p1 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 w2 p1 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 w2 p1 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 p1 r2 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 p1 r2 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 p1 r2 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 p1 r2 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 p1 w2 r2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 p1 w2 r2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 p1 w2 r2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 p1 w2 c1 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 p1 c1 r2 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r1 p1 c1 w2 r2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +step r2: SELECT * FROM test3; +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r2 r1 w2 p1 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r2 r1 w2 p1 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r2 r1 w2 p1 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r2 r1 w2 p2 p1 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r2 r1 w2 p2 p1 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step p1: PREPARE TRANSACTION 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r2 r1 w2 p2 c2 p1 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r2 r1 p1 w2 p2 c1 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c1: COMMIT PREPARED 's1'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r2 r1 p1 w2 p2 c2 c1 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step c1: COMMIT PREPARED 's1'; +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r2 r1 p1 w2 c1 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT PREPARED 's1'; +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + + +starting permutation: w3 p3 c3 r2 r1 p1 c1 w2 p2 c2 check +a +- +(0 rows) + +a +- +(0 rows) + +step w3: INSERT INTO test3 VALUES (3); +step p3: PREPARE TRANSACTION 's3'; +step c3: COMMIT PREPARED 's3'; +step r2: SELECT * FROM test3; +c +- +(0 rows) + +step r1: SELECT * FROM test2; +b +- +(0 rows) + +step p1: PREPARE TRANSACTION 's1'; +step c1: COMMIT PREPARED 's1'; +step w2: INSERT INTO test2 VALUES (2); +ERROR: could not serialize access due to read/write dependencies among transactions +step p2: PREPARE TRANSACTION 's2'; +step c2: COMMIT PREPARED 's2'; +ERROR: prepared transaction with identifier "s2" does not exist +step check: SELECT * FROM test1,test2,test3; +a|b|c +-+-+- +(0 rows) + diff --git a/src/test/isolation/expected/project-manager.out b/src/test/isolation/expected/project-manager.out new file mode 100644 index 0000000..902d188 --- /dev/null +++ b/src/test/isolation/expected/project-manager.out @@ -0,0 +1,379 @@ +Parsed test spec with 2 sessions + +starting permutation: rx1 wy1 c1 ry2 wx2 c2 +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step c1: COMMIT; +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 1 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step c2: COMMIT; + +starting permutation: rx1 wy1 ry2 c1 wx2 c2 +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step c1: COMMIT; +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx1 wy1 ry2 wx2 c1 c2 +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 wy1 ry2 wx2 c2 c1 +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wy1 c1 wx2 c2 +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step c1: COMMIT; +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx1 ry2 wy1 wx2 c1 c2 +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wy1 wx2 c2 c1 +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wx2 wy1 c1 c2 +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wx2 wy1 c2 c1 +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wx2 c2 wy1 c1 +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step c2: COMMIT; +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: ry2 rx1 wy1 c1 wx2 c2 +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step c1: COMMIT; +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: ry2 rx1 wy1 wx2 c1 c2 +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wy1 wx2 c2 c1 +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wx2 wy1 c1 c2 +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wx2 wy1 c2 c1 +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wx2 c2 wy1 c1 +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step c2: COMMIT; +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: ry2 wx2 rx1 wy1 c1 c2 +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 wx2 rx1 wy1 c2 c1 +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 wx2 rx1 c2 wy1 c1 +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 1 +(1 row) + +step c2: COMMIT; +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: ry2 wx2 c2 rx1 wy1 c1 +step ry2: SELECT count(*) FROM project WHERE project_manager = 1; +count +----- + 0 +(1 row) + +step wx2: UPDATE person SET is_project_manager = false WHERE person_id = 1; +step c2: COMMIT; +step rx1: SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO project VALUES (101, 'Build Great Wall', 1); +step c1: COMMIT; diff --git a/src/test/isolation/expected/propagate-lock-delete.out b/src/test/isolation/expected/propagate-lock-delete.out new file mode 100644 index 0000000..222b945 --- /dev/null +++ b/src/test/isolation/expected/propagate-lock-delete.out @@ -0,0 +1,105 @@ +Parsed test spec with 3 sessions + +starting permutation: s1b s1l s2b s2l s3b s3u s3d s1c s2c s3c +step s1b: BEGIN; +step s1l: INSERT INTO child VALUES (1); +step s2b: BEGIN; +step s2l: INSERT INTO child VALUES (1); +step s3b: BEGIN; +step s3u: UPDATE parent SET c=lower(c); +step s3d: DELETE FROM parent; <waiting ...> +step s1c: COMMIT; +step s2c: COMMIT; +step s3d: <... completed> +ERROR: update or delete on table "parent" violates foreign key constraint "child_i_fkey" on table "child" +step s3c: COMMIT; + +starting permutation: s1b s1l s2b s2l s3b s3u s3svu s3d s1c s2c s3c +step s1b: BEGIN; +step s1l: INSERT INTO child VALUES (1); +step s2b: BEGIN; +step s2l: INSERT INTO child VALUES (1); +step s3b: BEGIN; +step s3u: UPDATE parent SET c=lower(c); +step s3svu: SAVEPOINT f; UPDATE parent SET c = 'bbb'; ROLLBACK TO f; +step s3d: DELETE FROM parent; <waiting ...> +step s1c: COMMIT; +step s2c: COMMIT; +step s3d: <... completed> +ERROR: update or delete on table "parent" violates foreign key constraint "child_i_fkey" on table "child" +step s3c: COMMIT; + +starting permutation: s1b s1l s2b s2l s3b s3u2 s3d s1c s2c s3c +step s1b: BEGIN; +step s1l: INSERT INTO child VALUES (1); +step s2b: BEGIN; +step s2l: INSERT INTO child VALUES (1); +step s3b: BEGIN; +step s3u2: UPDATE parent SET i = i; +step s3d: DELETE FROM parent; <waiting ...> +step s1c: COMMIT; +step s2c: COMMIT; +step s3d: <... completed> +ERROR: update or delete on table "parent" violates foreign key constraint "child_i_fkey" on table "child" +step s3c: COMMIT; + +starting permutation: s1b s1l s2b s2l s3b s3u2 s3svu s3d s1c s2c s3c +step s1b: BEGIN; +step s1l: INSERT INTO child VALUES (1); +step s2b: BEGIN; +step s2l: INSERT INTO child VALUES (1); +step s3b: BEGIN; +step s3u2: UPDATE parent SET i = i; +step s3svu: SAVEPOINT f; UPDATE parent SET c = 'bbb'; ROLLBACK TO f; +step s3d: DELETE FROM parent; <waiting ...> +step s1c: COMMIT; +step s2c: COMMIT; +step s3d: <... completed> +ERROR: update or delete on table "parent" violates foreign key constraint "child_i_fkey" on table "child" +step s3c: COMMIT; + +starting permutation: s1b s1l s3b s3u s3d s1c s3c +step s1b: BEGIN; +step s1l: INSERT INTO child VALUES (1); +step s3b: BEGIN; +step s3u: UPDATE parent SET c=lower(c); +step s3d: DELETE FROM parent; <waiting ...> +step s1c: COMMIT; +step s3d: <... completed> +ERROR: update or delete on table "parent" violates foreign key constraint "child_i_fkey" on table "child" +step s3c: COMMIT; + +starting permutation: s1b s1l s3b s3u s3svu s3d s1c s3c +step s1b: BEGIN; +step s1l: INSERT INTO child VALUES (1); +step s3b: BEGIN; +step s3u: UPDATE parent SET c=lower(c); +step s3svu: SAVEPOINT f; UPDATE parent SET c = 'bbb'; ROLLBACK TO f; +step s3d: DELETE FROM parent; <waiting ...> +step s1c: COMMIT; +step s3d: <... completed> +ERROR: update or delete on table "parent" violates foreign key constraint "child_i_fkey" on table "child" +step s3c: COMMIT; + +starting permutation: s1b s1l s3b s3u2 s3d s1c s3c +step s1b: BEGIN; +step s1l: INSERT INTO child VALUES (1); +step s3b: BEGIN; +step s3u2: UPDATE parent SET i = i; +step s3d: DELETE FROM parent; <waiting ...> +step s1c: COMMIT; +step s3d: <... completed> +ERROR: update or delete on table "parent" violates foreign key constraint "child_i_fkey" on table "child" +step s3c: COMMIT; + +starting permutation: s1b s1l s3b s3u2 s3svu s3d s1c s3c +step s1b: BEGIN; +step s1l: INSERT INTO child VALUES (1); +step s3b: BEGIN; +step s3u2: UPDATE parent SET i = i; +step s3svu: SAVEPOINT f; UPDATE parent SET c = 'bbb'; ROLLBACK TO f; +step s3d: DELETE FROM parent; <waiting ...> +step s1c: COMMIT; +step s3d: <... completed> +ERROR: update or delete on table "parent" violates foreign key constraint "child_i_fkey" on table "child" +step s3c: COMMIT; diff --git a/src/test/isolation/expected/read-only-anomaly-2.out b/src/test/isolation/expected/read-only-anomaly-2.out new file mode 100644 index 0000000..543ae89 --- /dev/null +++ b/src/test/isolation/expected/read-only-anomaly-2.out @@ -0,0 +1,58 @@ +Parsed test spec with 3 sessions + +starting permutation: s2rx s2ry s1ry s1wy s1c s2wx s2c s3c +step s2rx: SELECT balance FROM bank_account WHERE id = 'X'; +balance +------- + 0 +(1 row) + +step s2ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y'; +step s1c: COMMIT; +step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X'; +step s2c: COMMIT; +step s3c: COMMIT; + +starting permutation: s2rx s2ry s1ry s1wy s1c s3r s3c s2wx +step s2rx: SELECT balance FROM bank_account WHERE id = 'X'; +balance +------- + 0 +(1 row) + +step s2ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y'; +step s1c: COMMIT; +step s3r: SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id; +id|balance +--+------- +X | 0 +Y | 20 +(2 rows) + +step s3c: COMMIT; +step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X'; +ERROR: could not serialize access due to read/write dependencies among transactions diff --git a/src/test/isolation/expected/read-only-anomaly-3.out b/src/test/isolation/expected/read-only-anomaly-3.out new file mode 100644 index 0000000..4f7d3f8 --- /dev/null +++ b/src/test/isolation/expected/read-only-anomaly-3.out @@ -0,0 +1,34 @@ +Parsed test spec with 3 sessions + +starting permutation: s2rx s2ry s1ry s1wy s1c s3r s2wx s2c s3c +step s2rx: SELECT balance FROM bank_account WHERE id = 'X'; +balance +------- + 0 +(1 row) + +step s2ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y'; +step s1c: COMMIT; +step s3r: SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id; <waiting ...> +step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X'; +step s2c: COMMIT; +step s3r: <... completed> +id|balance +--+------- +X | -11 +Y | 20 +(2 rows) + +step s3c: COMMIT; diff --git a/src/test/isolation/expected/read-only-anomaly.out b/src/test/isolation/expected/read-only-anomaly.out new file mode 100644 index 0000000..96df5e2 --- /dev/null +++ b/src/test/isolation/expected/read-only-anomaly.out @@ -0,0 +1,33 @@ +Parsed test spec with 3 sessions + +starting permutation: s2rx s2ry s1ry s1wy s1c s3r s2wx s2c s3c +step s2rx: SELECT balance FROM bank_account WHERE id = 'X'; +balance +------- + 0 +(1 row) + +step s2ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y'; +step s1c: COMMIT; +step s3r: SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id; +id|balance +--+------- +X | 0 +Y | 20 +(2 rows) + +step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X'; +step s2c: COMMIT; +step s3c: COMMIT; diff --git a/src/test/isolation/expected/read-write-unique-2.out b/src/test/isolation/expected/read-write-unique-2.out new file mode 100644 index 0000000..13b7cdc --- /dev/null +++ b/src/test/isolation/expected/read-write-unique-2.out @@ -0,0 +1,37 @@ +Parsed test spec with 2 sessions + +starting permutation: r1 r2 w1 w2 c1 c2 +step r1: SELECT * FROM test WHERE i = 42; +i +- +(0 rows) + +step r2: SELECT * FROM test WHERE i = 42; +i +- +(0 rows) + +step w1: INSERT INTO test VALUES (42); +step w2: INSERT INTO test VALUES (42); <waiting ...> +step c1: COMMIT; +step w2: <... completed> +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: r1 w1 c1 r2 w2 c2 +step r1: SELECT * FROM test WHERE i = 42; +i +- +(0 rows) + +step w1: INSERT INTO test VALUES (42); +step c1: COMMIT; +step r2: SELECT * FROM test WHERE i = 42; + i +-- +42 +(1 row) + +step w2: INSERT INTO test VALUES (42); +ERROR: duplicate key value violates unique constraint "test_pkey" +step c2: COMMIT; diff --git a/src/test/isolation/expected/read-write-unique-3.out b/src/test/isolation/expected/read-write-unique-3.out new file mode 100644 index 0000000..7735d5e --- /dev/null +++ b/src/test/isolation/expected/read-write-unique-3.out @@ -0,0 +1,14 @@ +Parsed test spec with 2 sessions + +starting permutation: rw1 rw2 c1 c2 +step rw1: SELECT insert_unique(1, '1'); +insert_unique +------------- + +(1 row) + +step rw2: SELECT insert_unique(1, '2'); <waiting ...> +step c1: COMMIT; +step rw2: <... completed> +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; diff --git a/src/test/isolation/expected/read-write-unique-4.out b/src/test/isolation/expected/read-write-unique-4.out new file mode 100644 index 0000000..aa96530 --- /dev/null +++ b/src/test/isolation/expected/read-write-unique-4.out @@ -0,0 +1,49 @@ +Parsed test spec with 2 sessions + +starting permutation: r1 r2 w1 w2 c1 c2 +step r1: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016; +coalesce +-------- + 3 +(1 row) + +step r2: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016; +coalesce +-------- + 3 +(1 row) + +step w1: INSERT INTO invoice VALUES (2016, 3); +step w2: INSERT INTO invoice VALUES (2016, 3); <waiting ...> +step c1: COMMIT; +step w2: <... completed> +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: r1 w1 w2 c1 c2 +step r1: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016; +coalesce +-------- + 3 +(1 row) + +step w1: INSERT INTO invoice VALUES (2016, 3); +step w2: INSERT INTO invoice VALUES (2016, 3); <waiting ...> +step c1: COMMIT; +step w2: <... completed> +ERROR: duplicate key value violates unique constraint "invoice_pkey" +step c2: COMMIT; + +starting permutation: r2 w1 w2 c1 c2 +step r2: SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016; +coalesce +-------- + 3 +(1 row) + +step w1: INSERT INTO invoice VALUES (2016, 3); +step w2: INSERT INTO invoice VALUES (2016, 3); <waiting ...> +step c1: COMMIT; +step w2: <... completed> +ERROR: duplicate key value violates unique constraint "invoice_pkey" +step c2: COMMIT; diff --git a/src/test/isolation/expected/read-write-unique.out b/src/test/isolation/expected/read-write-unique.out new file mode 100644 index 0000000..2abecc6 --- /dev/null +++ b/src/test/isolation/expected/read-write-unique.out @@ -0,0 +1,37 @@ +Parsed test spec with 2 sessions + +starting permutation: r1 r2 w1 w2 c1 c2 +step r1: SELECT * FROM test; +i +- +(0 rows) + +step r2: SELECT * FROM test; +i +- +(0 rows) + +step w1: INSERT INTO test VALUES (42); +step w2: INSERT INTO test VALUES (42); <waiting ...> +step c1: COMMIT; +step w2: <... completed> +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: r1 w1 c1 r2 w2 c2 +step r1: SELECT * FROM test; +i +- +(0 rows) + +step w1: INSERT INTO test VALUES (42); +step c1: COMMIT; +step r2: SELECT * FROM test; + i +-- +42 +(1 row) + +step w2: INSERT INTO test VALUES (42); +ERROR: duplicate key value violates unique constraint "test_pkey" +step c2: COMMIT; diff --git a/src/test/isolation/expected/receipt-report.out b/src/test/isolation/expected/receipt-report.out new file mode 100644 index 0000000..1f25018 --- /dev/null +++ b/src/test/isolation/expected/receipt-report.out @@ -0,0 +1,4215 @@ +Parsed test spec with 3 sessions + +starting permutation: rxwy1 c1 wx2 c2 rx3 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; + +starting permutation: rxwy1 c1 wx2 rx3 c2 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; + +starting permutation: rxwy1 c1 wx2 rx3 ry3 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 c1 wx2 rx3 ry3 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 c1 rx3 wx2 c2 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; + +starting permutation: rxwy1 c1 rx3 wx2 ry3 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 c1 rx3 wx2 ry3 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 c1 rx3 ry3 wx2 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 c1 rx3 ry3 wx2 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 c1 rx3 ry3 c3 wx2 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; + +starting permutation: rxwy1 wx2 c1 c2 rx3 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; + +starting permutation: rxwy1 wx2 c1 rx3 c2 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; + +starting permutation: rxwy1 wx2 c1 rx3 ry3 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 wx2 c1 rx3 ry3 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 wx2 c2 c1 rx3 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; + +starting permutation: rxwy1 wx2 c2 rx3 c1 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: rxwy1 wx2 c2 rx3 ry3 c1 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: rxwy1 wx2 c2 rx3 ry3 c3 c1 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxwy1 wx2 rx3 c1 c2 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: rxwy1 wx2 rx3 c1 ry3 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 wx2 rx3 c1 ry3 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 wx2 rx3 c2 c1 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: rxwy1 wx2 rx3 c2 ry3 c1 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 wx2 rx3 c2 ry3 c3 c1 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy1 wx2 rx3 ry3 c1 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 wx2 rx3 ry3 c1 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 wx2 rx3 ry3 c2 c1 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 wx2 rx3 ry3 c2 c3 c1 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy1 wx2 rx3 ry3 c3 c1 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 wx2 rx3 ry3 c3 c2 c1 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy1 rx3 c1 wx2 c2 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: rxwy1 rx3 c1 wx2 ry3 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 rx3 c1 wx2 ry3 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 c1 ry3 wx2 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 rx3 c1 ry3 wx2 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 c1 ry3 c3 wx2 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 wx2 c1 c2 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: rxwy1 rx3 wx2 c1 ry3 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 rx3 wx2 c1 ry3 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 wx2 c2 c1 ry3 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: rxwy1 rx3 wx2 c2 ry3 c1 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 rx3 wx2 c2 ry3 c3 c1 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy1 rx3 wx2 ry3 c1 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 rx3 wx2 ry3 c1 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 wx2 ry3 c2 c1 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 rx3 wx2 ry3 c2 c3 c1 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy1 rx3 wx2 ry3 c3 c1 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 wx2 ry3 c3 c2 c1 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy1 rx3 ry3 c1 wx2 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 rx3 ry3 c1 wx2 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 ry3 c1 c3 wx2 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 ry3 wx2 c1 c2 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 rx3 ry3 wx2 c1 c3 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 ry3 wx2 c2 c1 c3 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy1 rx3 ry3 wx2 c2 c3 c1 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy1 rx3 ry3 wx2 c3 c1 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 ry3 wx2 c3 c2 c1 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy1 rx3 ry3 c3 c1 wx2 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 ry3 c3 wx2 c1 c2 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy1 rx3 ry3 c3 wx2 c2 c1 +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rxwy1 c1 c2 rx3 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; + +starting permutation: wx2 rxwy1 c1 rx3 c2 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; + +starting permutation: wx2 rxwy1 c1 rx3 ry3 c2 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rxwy1 c1 rx3 ry3 c3 c2 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: wx2 rxwy1 c2 c1 rx3 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 + 3| 12-22-2008| 4.00 +(3 rows) + +step c3: COMMIT; + +starting permutation: wx2 rxwy1 c2 rx3 c1 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: wx2 rxwy1 c2 rx3 ry3 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: wx2 rxwy1 c2 rx3 ry3 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wx2 rxwy1 rx3 c1 c2 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: wx2 rxwy1 rx3 c1 ry3 c2 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rxwy1 rx3 c1 ry3 c3 c2 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: wx2 rxwy1 rx3 c2 c1 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: wx2 rxwy1 rx3 c2 ry3 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rxwy1 rx3 c2 ry3 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rxwy1 rx3 ry3 c1 c2 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rxwy1 rx3 ry3 c1 c3 c2 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: wx2 rxwy1 rx3 ry3 c2 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rxwy1 rx3 ry3 c2 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rxwy1 rx3 ry3 c3 c1 c2 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: wx2 rxwy1 rx3 ry3 c3 c2 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 c2 rxwy1 c1 rx3 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: wx2 c2 rxwy1 rx3 c1 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: wx2 c2 rxwy1 rx3 ry3 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 c2 rxwy1 rx3 ry3 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 c2 rx3 rxwy1 c1 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: wx2 c2 rx3 rxwy1 ry3 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 c2 rx3 rxwy1 ry3 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 c2 rx3 ry3 rxwy1 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 c2 rx3 ry3 rxwy1 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 c2 rx3 ry3 c3 rxwy1 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-23-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; + +starting permutation: wx2 rx3 rxwy1 c1 c2 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: wx2 rx3 rxwy1 c1 ry3 c2 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rx3 rxwy1 c1 ry3 c3 c2 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: wx2 rx3 rxwy1 c2 c1 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: wx2 rx3 rxwy1 c2 ry3 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rx3 rxwy1 c2 ry3 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rx3 rxwy1 ry3 c1 c2 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rx3 rxwy1 ry3 c1 c3 c2 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: wx2 rx3 rxwy1 ry3 c2 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rx3 rxwy1 ry3 c2 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rx3 rxwy1 ry3 c3 c1 c2 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: wx2 rx3 rxwy1 ry3 c3 c2 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rx3 c2 rxwy1 c1 ry3 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: wx2 rx3 c2 rxwy1 ry3 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rx3 c2 rxwy1 ry3 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rx3 c2 ry3 rxwy1 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rx3 c2 ry3 rxwy1 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rx3 c2 ry3 c3 rxwy1 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; + +starting permutation: wx2 rx3 ry3 rxwy1 c1 c2 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rx3 ry3 rxwy1 c1 c3 c2 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: wx2 rx3 ry3 rxwy1 c2 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rx3 ry3 rxwy1 c2 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rx3 ry3 rxwy1 c3 c1 c2 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: wx2 rx3 ry3 rxwy1 c3 c2 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rx3 ry3 c2 rxwy1 c1 c3 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx2 rx3 ry3 c2 rxwy1 c3 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rx3 ry3 c2 c3 rxwy1 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; + +starting permutation: wx2 rx3 ry3 c3 rxwy1 c1 c2 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: wx2 rx3 ry3 c3 rxwy1 c2 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: wx2 rx3 ry3 c3 c2 rxwy1 c1 +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; + +starting permutation: rx3 rxwy1 c1 wx2 c2 ry3 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: rx3 rxwy1 c1 wx2 ry3 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 rxwy1 c1 wx2 ry3 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 c1 ry3 wx2 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 rxwy1 c1 ry3 wx2 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 c1 ry3 c3 wx2 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 wx2 c1 c2 ry3 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: rx3 rxwy1 wx2 c1 ry3 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 rxwy1 wx2 c1 ry3 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 wx2 c2 c1 ry3 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: rx3 rxwy1 wx2 c2 ry3 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 rxwy1 wx2 c2 ry3 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 rxwy1 wx2 ry3 c1 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 rxwy1 wx2 ry3 c1 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 wx2 ry3 c2 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 rxwy1 wx2 ry3 c2 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 rxwy1 wx2 ry3 c3 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 wx2 ry3 c3 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 rxwy1 ry3 c1 wx2 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 rxwy1 ry3 c1 wx2 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 ry3 c1 c3 wx2 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 ry3 wx2 c1 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 rxwy1 ry3 wx2 c1 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 ry3 wx2 c2 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 rxwy1 ry3 wx2 c2 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 rxwy1 ry3 wx2 c3 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 ry3 wx2 c3 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 rxwy1 ry3 c3 c1 wx2 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 ry3 c3 wx2 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 rxwy1 ry3 c3 wx2 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 wx2 rxwy1 c1 c2 ry3 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: rx3 wx2 rxwy1 c1 ry3 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 wx2 rxwy1 c1 ry3 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 wx2 rxwy1 c2 c1 ry3 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: rx3 wx2 rxwy1 c2 ry3 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 wx2 rxwy1 c2 ry3 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 wx2 rxwy1 ry3 c1 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 wx2 rxwy1 ry3 c1 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 wx2 rxwy1 ry3 c2 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 wx2 rxwy1 ry3 c2 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 wx2 rxwy1 ry3 c3 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 wx2 rxwy1 ry3 c3 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 wx2 c2 rxwy1 c1 ry3 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; + +starting permutation: rx3 wx2 c2 rxwy1 ry3 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 wx2 c2 rxwy1 ry3 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 wx2 c2 ry3 rxwy1 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 wx2 c2 ry3 rxwy1 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 wx2 c2 ry3 c3 rxwy1 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; + +starting permutation: rx3 wx2 ry3 rxwy1 c1 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 wx2 ry3 rxwy1 c1 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 wx2 ry3 rxwy1 c2 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 wx2 ry3 rxwy1 c2 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 wx2 ry3 rxwy1 c3 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 wx2 ry3 rxwy1 c3 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 wx2 ry3 c2 rxwy1 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 wx2 ry3 c2 rxwy1 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 wx2 ry3 c2 c3 rxwy1 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c2: COMMIT; +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; + +starting permutation: rx3 wx2 ry3 c3 rxwy1 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 wx2 ry3 c3 rxwy1 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 wx2 ry3 c3 c2 rxwy1 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; + +starting permutation: rx3 ry3 rxwy1 c1 wx2 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 ry3 rxwy1 c1 wx2 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 ry3 rxwy1 c1 c3 wx2 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; + +starting permutation: rx3 ry3 rxwy1 wx2 c1 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 ry3 rxwy1 wx2 c1 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 ry3 rxwy1 wx2 c2 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 ry3 rxwy1 wx2 c2 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 ry3 rxwy1 wx2 c3 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 ry3 rxwy1 wx2 c3 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 ry3 rxwy1 c3 c1 wx2 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; + +starting permutation: rx3 ry3 rxwy1 c3 wx2 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 ry3 rxwy1 c3 wx2 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 ry3 wx2 rxwy1 c1 c2 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 ry3 wx2 rxwy1 c1 c3 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 ry3 wx2 rxwy1 c2 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 ry3 wx2 rxwy1 c2 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 ry3 wx2 rxwy1 c3 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 ry3 wx2 rxwy1 c3 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 ry3 wx2 c2 rxwy1 c1 c3 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rx3 ry3 wx2 c2 rxwy1 c3 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 ry3 wx2 c2 c3 rxwy1 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; + +starting permutation: rx3 ry3 wx2 c3 rxwy1 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 ry3 wx2 c3 rxwy1 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 ry3 wx2 c3 c2 rxwy1 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c3: COMMIT; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; + +starting permutation: rx3 ry3 c3 rxwy1 c1 wx2 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; + +starting permutation: rx3 ry3 c3 rxwy1 wx2 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 ry3 c3 rxwy1 wx2 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 ry3 c3 wx2 rxwy1 c1 c2 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rx3 ry3 c3 wx2 rxwy1 c2 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rx3 ry3 c3 wx2 c2 rxwy1 c1 +step rx3: SELECT * FROM ctl WHERE k = 'receipt'; +k |deposit_date +-------+------------ +receipt| 12-22-2008 +(1 row) + +step ry3: SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; +receipt_no|deposit_date|amount +----------+------------+------ + 1| 12-22-2008| 1.00 + 2| 12-22-2008| 2.00 +(2 rows) + +step c3: COMMIT; +step wx2: UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; +step c2: COMMIT; +step rxwy1: INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); +step c1: COMMIT; diff --git a/src/test/isolation/expected/referential-integrity.out b/src/test/isolation/expected/referential-integrity.out new file mode 100644 index 0000000..7679397 --- /dev/null +++ b/src/test/isolation/expected/referential-integrity.out @@ -0,0 +1,839 @@ +Parsed test spec with 2 sessions + +starting permutation: rx1 wy1 c1 rx2 ry2 wx2 c2 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step c1: COMMIT; +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- + 1 +(1 row) + +step wx2: DELETE FROM a WHERE i = 1; +step c2: COMMIT; + +starting permutation: rx1 wy1 rx2 c1 ry2 wx2 c2 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step c1: COMMIT; +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx1 wy1 rx2 ry2 c1 wx2 c2 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step c1: COMMIT; +step wx2: DELETE FROM a WHERE i = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx1 wy1 rx2 ry2 wx2 c1 c2 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 wy1 rx2 ry2 wx2 c2 c1 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 rx2 wy1 c1 ry2 wx2 c2 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step c1: COMMIT; +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx1 rx2 wy1 ry2 c1 wx2 c2 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step c1: COMMIT; +step wx2: DELETE FROM a WHERE i = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx1 rx2 wy1 ry2 wx2 c1 c2 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 rx2 wy1 ry2 wx2 c2 c1 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 rx2 ry2 wy1 c1 wx2 c2 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wy1: INSERT INTO b VALUES (1); +step c1: COMMIT; +step wx2: DELETE FROM a WHERE i = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx1 rx2 ry2 wy1 wx2 c1 c2 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wy1: INSERT INTO b VALUES (1); +step wx2: DELETE FROM a WHERE i = 1; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 rx2 ry2 wy1 wx2 c2 c1 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wy1: INSERT INTO b VALUES (1); +step wx2: DELETE FROM a WHERE i = 1; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 rx2 ry2 wx2 wy1 c1 c2 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step wy1: INSERT INTO b VALUES (1); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 rx2 ry2 wx2 wy1 c2 c1 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step wy1: INSERT INTO b VALUES (1); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 rx2 ry2 wx2 c2 wy1 c1 +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step c2: COMMIT; +step wy1: INSERT INTO b VALUES (1); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: rx2 rx1 wy1 c1 ry2 wx2 c2 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step c1: COMMIT; +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx2 rx1 wy1 ry2 c1 wx2 c2 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step c1: COMMIT; +step wx2: DELETE FROM a WHERE i = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx2 rx1 wy1 ry2 wx2 c1 c2 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 rx1 wy1 ry2 wx2 c2 c1 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 rx1 ry2 wy1 c1 wx2 c2 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wy1: INSERT INTO b VALUES (1); +step c1: COMMIT; +step wx2: DELETE FROM a WHERE i = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx2 rx1 ry2 wy1 wx2 c1 c2 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wy1: INSERT INTO b VALUES (1); +step wx2: DELETE FROM a WHERE i = 1; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 rx1 ry2 wy1 wx2 c2 c1 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wy1: INSERT INTO b VALUES (1); +step wx2: DELETE FROM a WHERE i = 1; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 rx1 ry2 wx2 wy1 c1 c2 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step wy1: INSERT INTO b VALUES (1); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 rx1 ry2 wx2 wy1 c2 c1 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step wy1: INSERT INTO b VALUES (1); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 rx1 ry2 wx2 c2 wy1 c1 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step c2: COMMIT; +step wy1: INSERT INTO b VALUES (1); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: rx2 ry2 rx1 wy1 c1 wx2 c2 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step c1: COMMIT; +step wx2: DELETE FROM a WHERE i = 1; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx2 ry2 rx1 wy1 wx2 c1 c2 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step wx2: DELETE FROM a WHERE i = 1; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 ry2 rx1 wy1 wx2 c2 c1 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step wx2: DELETE FROM a WHERE i = 1; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 ry2 rx1 wx2 wy1 c1 c2 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wx2: DELETE FROM a WHERE i = 1; +step wy1: INSERT INTO b VALUES (1); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 ry2 rx1 wx2 wy1 c2 c1 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wx2: DELETE FROM a WHERE i = 1; +step wy1: INSERT INTO b VALUES (1); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 ry2 rx1 wx2 c2 wy1 c1 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wx2: DELETE FROM a WHERE i = 1; +step c2: COMMIT; +step wy1: INSERT INTO b VALUES (1); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: rx2 ry2 wx2 rx1 wy1 c1 c2 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 ry2 wx2 rx1 wy1 c2 c1 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step wy1: INSERT INTO b VALUES (1); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx2 ry2 wx2 rx1 c2 wy1 c1 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step rx1: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step c2: COMMIT; +step wy1: INSERT INTO b VALUES (1); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: rx2 ry2 wx2 c2 rx1 wy1 c1 +step rx2: SELECT i FROM a WHERE i = 1; +i +- +1 +(1 row) + +step ry2: SELECT a_id FROM b WHERE a_id = 1; +a_id +---- +(0 rows) + +step wx2: DELETE FROM a WHERE i = 1; +step c2: COMMIT; +step rx1: SELECT i FROM a WHERE i = 1; +i +- +(0 rows) + +step wy1: INSERT INTO b VALUES (1); +step c1: COMMIT; diff --git a/src/test/isolation/expected/reindex-concurrently-toast.out b/src/test/isolation/expected/reindex-concurrently-toast.out new file mode 100644 index 0000000..a6f1edc --- /dev/null +++ b/src/test/isolation/expected/reindex-concurrently-toast.out @@ -0,0 +1,775 @@ +Parsed test spec with 2 sessions + +starting permutation: lrex1 ins1 retab2 end1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 + 3|3333333333 +(3 rows) + + +starting permutation: lrex1 ins1 reind2 end1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 + 3|3333333333 +(3 rows) + + +starting permutation: lrex1 upd1 retab2 end1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|4444444444 + 2|2222222222 +(2 rows) + + +starting permutation: lrex1 upd1 reind2 end1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|4444444444 + 2|2222222222 +(2 rows) + + +starting permutation: lrex1 del1 retab2 end1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 +(1 row) + + +starting permutation: lrex1 del1 reind2 end1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 +(1 row) + + +starting permutation: lrex1 dro1 retab2 end1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step dro1: DROP TABLE reind_con_wide; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +ERROR: relation "pg_toast.reind_con_toast" does not exist +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lrex1 dro1 reind2 end1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step dro1: DROP TABLE reind_con_wide; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +ERROR: relation "pg_toast.reind_con_toast_idx" does not exist +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lrex1 retab2 dro1 end1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; +step dro1: DROP TABLE reind_con_wide; +step end1: COMMIT; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lrex1 reind2 dro1 end1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; +step dro1: DROP TABLE reind_con_wide; +step end1: COMMIT; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lsha1 ins1 retab2 end1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 + 3|3333333333 +(3 rows) + + +starting permutation: lsha1 ins1 reind2 end1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 + 3|3333333333 +(3 rows) + + +starting permutation: lsha1 upd1 retab2 end1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|4444444444 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 upd1 reind2 end1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|4444444444 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 del1 retab2 end1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 +(1 row) + + +starting permutation: lsha1 del1 reind2 end1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 +(1 row) + + +starting permutation: lsha1 dro1 retab2 end1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step dro1: DROP TABLE reind_con_wide; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +ERROR: relation "pg_toast.reind_con_toast" does not exist +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lsha1 dro1 reind2 end1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step dro1: DROP TABLE reind_con_wide; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +ERROR: relation "pg_toast.reind_con_toast_idx" does not exist +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lsha1 retab2 dro1 end1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; +step dro1: DROP TABLE reind_con_wide; +step end1: COMMIT; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lsha1 reind2 dro1 end1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; +step dro1: DROP TABLE reind_con_wide; +step end1: COMMIT; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lexc1 ins1 retab2 end1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 + 3|3333333333 +(3 rows) + + +starting permutation: lexc1 ins1 reind2 end1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 + 3|3333333333 +(3 rows) + + +starting permutation: lexc1 upd1 retab2 end1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|4444444444 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 upd1 reind2 end1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|4444444444 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 del1 retab2 end1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 +(1 row) + + +starting permutation: lexc1 del1 reind2 end1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 +(1 row) + + +starting permutation: lexc1 dro1 retab2 end1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step dro1: DROP TABLE reind_con_wide; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step end1: COMMIT; +step retab2: <... completed> +ERROR: relation "pg_toast.reind_con_toast" does not exist +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lexc1 dro1 reind2 end1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step dro1: DROP TABLE reind_con_wide; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step end1: COMMIT; +step reind2: <... completed> +ERROR: relation "pg_toast.reind_con_toast_idx" does not exist +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lexc1 retab2 dro1 end1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; +step dro1: DROP TABLE reind_con_wide; +step end1: COMMIT; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lexc1 reind2 dro1 end1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; +step dro1: DROP TABLE reind_con_wide; +step end1: COMMIT; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +ERROR: relation "reind_con_wide" does not exist + +starting permutation: lrex1 ins1 retab2 rol1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lrex1 ins1 reind2 rol1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lrex1 upd1 retab2 rol1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lrex1 upd1 reind2 rol1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lrex1 del1 retab2 rol1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lrex1 del1 reind2 rol1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lrex1 dro1 retab2 rol1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step dro1: DROP TABLE reind_con_wide; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lrex1 dro1 reind2 rol1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step dro1: DROP TABLE reind_con_wide; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lrex1 retab2 dro1 rol1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; +step dro1: DROP TABLE reind_con_wide; +step rol1: ROLLBACK; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lrex1 reind2 dro1 rol1 sel2 +step lrex1: lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; +step dro1: DROP TABLE reind_con_wide; +step rol1: ROLLBACK; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 ins1 retab2 rol1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 ins1 reind2 rol1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 upd1 retab2 rol1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 upd1 reind2 rol1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 del1 retab2 rol1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 del1 reind2 rol1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 dro1 retab2 rol1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step dro1: DROP TABLE reind_con_wide; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 dro1 reind2 rol1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step dro1: DROP TABLE reind_con_wide; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 retab2 dro1 rol1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; +step dro1: DROP TABLE reind_con_wide; +step rol1: ROLLBACK; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lsha1 reind2 dro1 rol1 sel2 +step lsha1: lock TABLE reind_con_wide in SHARE MODE; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; +step dro1: DROP TABLE reind_con_wide; +step rol1: ROLLBACK; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 ins1 retab2 rol1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 ins1 reind2 rol1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step ins1: INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 upd1 retab2 rol1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 upd1 reind2 rol1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step upd1: UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 del1 retab2 rol1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 del1 reind2 rol1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step del1: DELETE FROM reind_con_wide WHERE id = 2; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 dro1 retab2 rol1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step dro1: DROP TABLE reind_con_wide; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; <waiting ...> +step rol1: ROLLBACK; +step retab2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 dro1 reind2 rol1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step dro1: DROP TABLE reind_con_wide; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; <waiting ...> +step rol1: ROLLBACK; +step reind2: <... completed> +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 retab2 dro1 rol1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step retab2: REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; +step dro1: DROP TABLE reind_con_wide; +step rol1: ROLLBACK; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + + +starting permutation: lexc1 reind2 dro1 rol1 sel2 +step lexc1: lock TABLE reind_con_wide in EXCLUSIVE MODE; +step reind2: REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; +step dro1: DROP TABLE reind_con_wide; +step rol1: ROLLBACK; +step sel2: SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; +id| substr +--+---------- + 1|1111111111 + 2|2222222222 +(2 rows) + diff --git a/src/test/isolation/expected/reindex-concurrently.out b/src/test/isolation/expected/reindex-concurrently.out new file mode 100644 index 0000000..eea5b2b --- /dev/null +++ b/src/test/isolation/expected/reindex-concurrently.out @@ -0,0 +1,90 @@ +Parsed test spec with 3 sessions + +starting permutation: reindex sel1 upd2 ins2 del2 end1 end2 +step reindex: REINDEX TABLE CONCURRENTLY reind_con_tab; +step sel1: SELECT data FROM reind_con_tab WHERE id = 3; +data +---- +aaaa +(1 row) + +step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3; +step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc'); +step del2: DELETE FROM reind_con_tab WHERE data = 'cccc'; +step end1: COMMIT; +step end2: COMMIT; + +starting permutation: sel1 reindex upd2 ins2 del2 end1 end2 +step sel1: SELECT data FROM reind_con_tab WHERE id = 3; +data +---- +aaaa +(1 row) + +step reindex: REINDEX TABLE CONCURRENTLY reind_con_tab; <waiting ...> +step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3; +step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc'); +step del2: DELETE FROM reind_con_tab WHERE data = 'cccc'; +step end1: COMMIT; +step end2: COMMIT; +step reindex: <... completed> + +starting permutation: sel1 upd2 reindex ins2 del2 end1 end2 +step sel1: SELECT data FROM reind_con_tab WHERE id = 3; +data +---- +aaaa +(1 row) + +step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3; +step reindex: REINDEX TABLE CONCURRENTLY reind_con_tab; <waiting ...> +step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc'); +step del2: DELETE FROM reind_con_tab WHERE data = 'cccc'; +step end1: COMMIT; +step end2: COMMIT; +step reindex: <... completed> + +starting permutation: sel1 upd2 ins2 reindex del2 end1 end2 +step sel1: SELECT data FROM reind_con_tab WHERE id = 3; +data +---- +aaaa +(1 row) + +step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3; +step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc'); +step reindex: REINDEX TABLE CONCURRENTLY reind_con_tab; <waiting ...> +step del2: DELETE FROM reind_con_tab WHERE data = 'cccc'; +step end1: COMMIT; +step end2: COMMIT; +step reindex: <... completed> + +starting permutation: sel1 upd2 ins2 del2 reindex end1 end2 +step sel1: SELECT data FROM reind_con_tab WHERE id = 3; +data +---- +aaaa +(1 row) + +step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3; +step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc'); +step del2: DELETE FROM reind_con_tab WHERE data = 'cccc'; +step reindex: REINDEX TABLE CONCURRENTLY reind_con_tab; <waiting ...> +step end1: COMMIT; +step end2: COMMIT; +step reindex: <... completed> + +starting permutation: sel1 upd2 ins2 del2 end1 reindex end2 +step sel1: SELECT data FROM reind_con_tab WHERE id = 3; +data +---- +aaaa +(1 row) + +step upd2: UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3; +step ins2: INSERT INTO reind_con_tab(data) VALUES ('cccc'); +step del2: DELETE FROM reind_con_tab WHERE data = 'cccc'; +step end1: COMMIT; +step reindex: REINDEX TABLE CONCURRENTLY reind_con_tab; <waiting ...> +step end2: COMMIT; +step reindex: <... completed> diff --git a/src/test/isolation/expected/reindex-schema.out b/src/test/isolation/expected/reindex-schema.out new file mode 100644 index 0000000..0884e75 --- /dev/null +++ b/src/test/isolation/expected/reindex-schema.out @@ -0,0 +1,17 @@ +Parsed test spec with 3 sessions + +starting permutation: begin1 lock1 reindex2 drop3 end1 +step begin1: BEGIN; +step lock1: LOCK reindex_schema.tab_locked IN SHARE UPDATE EXCLUSIVE MODE; +step reindex2: REINDEX SCHEMA reindex_schema; <waiting ...> +step drop3: DROP TABLE reindex_schema.tab_dropped; +step end1: COMMIT; +step reindex2: <... completed> + +starting permutation: begin1 lock1 reindex_conc2 drop3 end1 +step begin1: BEGIN; +step lock1: LOCK reindex_schema.tab_locked IN SHARE UPDATE EXCLUSIVE MODE; +step reindex_conc2: REINDEX SCHEMA CONCURRENTLY reindex_schema; <waiting ...> +step drop3: DROP TABLE reindex_schema.tab_dropped; +step end1: COMMIT; +step reindex_conc2: <... completed> diff --git a/src/test/isolation/expected/ri-trigger.out b/src/test/isolation/expected/ri-trigger.out new file mode 100644 index 0000000..842df80 --- /dev/null +++ b/src/test/isolation/expected/ri-trigger.out @@ -0,0 +1,131 @@ +Parsed test spec with 2 sessions + +starting permutation: wxry1 c1 r2 wyrx2 c2 +step wxry1: INSERT INTO child (parent_id) VALUES (0); +step c1: COMMIT; +step r2: SELECT TRUE; +bool +---- +t +(1 row) + +step wyrx2: DELETE FROM parent WHERE parent_id = 0; +ERROR: child row exists +step c2: COMMIT; + +starting permutation: wxry1 r2 c1 wyrx2 c2 +step wxry1: INSERT INTO child (parent_id) VALUES (0); +step r2: SELECT TRUE; +bool +---- +t +(1 row) + +step c1: COMMIT; +step wyrx2: DELETE FROM parent WHERE parent_id = 0; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: wxry1 r2 wyrx2 c1 c2 +step wxry1: INSERT INTO child (parent_id) VALUES (0); +step r2: SELECT TRUE; +bool +---- +t +(1 row) + +step wyrx2: DELETE FROM parent WHERE parent_id = 0; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wxry1 r2 wyrx2 c2 c1 +step wxry1: INSERT INTO child (parent_id) VALUES (0); +step r2: SELECT TRUE; +bool +---- +t +(1 row) + +step wyrx2: DELETE FROM parent WHERE parent_id = 0; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: r2 wxry1 c1 wyrx2 c2 +step r2: SELECT TRUE; +bool +---- +t +(1 row) + +step wxry1: INSERT INTO child (parent_id) VALUES (0); +step c1: COMMIT; +step wyrx2: DELETE FROM parent WHERE parent_id = 0; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: r2 wxry1 wyrx2 c1 c2 +step r2: SELECT TRUE; +bool +---- +t +(1 row) + +step wxry1: INSERT INTO child (parent_id) VALUES (0); +step wyrx2: DELETE FROM parent WHERE parent_id = 0; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: r2 wxry1 wyrx2 c2 c1 +step r2: SELECT TRUE; +bool +---- +t +(1 row) + +step wxry1: INSERT INTO child (parent_id) VALUES (0); +step wyrx2: DELETE FROM parent WHERE parent_id = 0; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: r2 wyrx2 wxry1 c1 c2 +step r2: SELECT TRUE; +bool +---- +t +(1 row) + +step wyrx2: DELETE FROM parent WHERE parent_id = 0; +step wxry1: INSERT INTO child (parent_id) VALUES (0); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: r2 wyrx2 wxry1 c2 c1 +step r2: SELECT TRUE; +bool +---- +t +(1 row) + +step wyrx2: DELETE FROM parent WHERE parent_id = 0; +step wxry1: INSERT INTO child (parent_id) VALUES (0); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: r2 wyrx2 c2 wxry1 c1 +step r2: SELECT TRUE; +bool +---- +t +(1 row) + +step wyrx2: DELETE FROM parent WHERE parent_id = 0; +step c2: COMMIT; +step wxry1: INSERT INTO child (parent_id) VALUES (0); +ERROR: parent row missing +step c1: COMMIT; diff --git a/src/test/isolation/expected/sequence-ddl.out b/src/test/isolation/expected/sequence-ddl.out new file mode 100644 index 0000000..52b0538 --- /dev/null +++ b/src/test/isolation/expected/sequence-ddl.out @@ -0,0 +1,91 @@ +Parsed test spec with 2 sessions + +starting permutation: s1alter s1commit s2nv +step s1alter: ALTER SEQUENCE seq1 MAXVALUE 10; +step s1commit: COMMIT; +step s2nv: SELECT nextval('seq1') FROM generate_series(1, 15); +ERROR: nextval: reached maximum value of sequence "seq1" (10) + +starting permutation: s1alter s2nv s1commit +step s1alter: ALTER SEQUENCE seq1 MAXVALUE 10; +step s2nv: SELECT nextval('seq1') FROM generate_series(1, 15); <waiting ...> +step s1commit: COMMIT; +step s2nv: <... completed> +ERROR: nextval: reached maximum value of sequence "seq1" (10) + +starting permutation: s1restart s2nv s1commit +step s1restart: ALTER SEQUENCE seq1 RESTART WITH 5; +step s2nv: SELECT nextval('seq1') FROM generate_series(1, 15); <waiting ...> +step s1commit: COMMIT; +step s2nv: <... completed> +nextval +------- + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 +(15 rows) + + +starting permutation: s1restart s2nv s1commit +step s1restart: ALTER SEQUENCE seq1 RESTART WITH 5; +step s2nv: SELECT nextval('seq1') FROM generate_series(1, 15); <waiting ...> +step s1commit: COMMIT; +step s2nv: <... completed> +nextval +------- + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 +(15 rows) + + +starting permutation: s2begin s2nv s1alter2 s2commit s1commit +step s2begin: BEGIN; +step s2nv: SELECT nextval('seq1') FROM generate_series(1, 15); +nextval +------- + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 +(15 rows) + +step s1alter2: ALTER SEQUENCE seq1 MAXVALUE 20; <waiting ...> +step s2commit: COMMIT; +step s1alter2: <... completed> +step s1commit: COMMIT; diff --git a/src/test/isolation/expected/serializable-parallel-2.out b/src/test/isolation/expected/serializable-parallel-2.out new file mode 100644 index 0000000..92753cc --- /dev/null +++ b/src/test/isolation/expected/serializable-parallel-2.out @@ -0,0 +1,50 @@ +Parsed test spec with 2 sessions + +starting permutation: s1r s2r1 s1c s2r2 s2c +step s1r: SELECT * FROM foo; + a +-- + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +(10 rows) + +step s2r1: SELECT * FROM foo; + a +-- + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +(10 rows) + +step s1c: COMMIT; +step s2r2: SELECT * FROM foo; + a +-- + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +10 +(10 rows) + +step s2c: COMMIT; diff --git a/src/test/isolation/expected/serializable-parallel.out b/src/test/isolation/expected/serializable-parallel.out new file mode 100644 index 0000000..543ae89 --- /dev/null +++ b/src/test/isolation/expected/serializable-parallel.out @@ -0,0 +1,58 @@ +Parsed test spec with 3 sessions + +starting permutation: s2rx s2ry s1ry s1wy s1c s2wx s2c s3c +step s2rx: SELECT balance FROM bank_account WHERE id = 'X'; +balance +------- + 0 +(1 row) + +step s2ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y'; +step s1c: COMMIT; +step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X'; +step s2c: COMMIT; +step s3c: COMMIT; + +starting permutation: s2rx s2ry s1ry s1wy s1c s3r s3c s2wx +step s2rx: SELECT balance FROM bank_account WHERE id = 'X'; +balance +------- + 0 +(1 row) + +step s2ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1ry: SELECT balance FROM bank_account WHERE id = 'Y'; +balance +------- + 0 +(1 row) + +step s1wy: UPDATE bank_account SET balance = 20 WHERE id = 'Y'; +step s1c: COMMIT; +step s3r: SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id; +id|balance +--+------- +X | 0 +Y | 20 +(2 rows) + +step s3c: COMMIT; +step s2wx: UPDATE bank_account SET balance = -11 WHERE id = 'X'; +ERROR: could not serialize access due to read/write dependencies among transactions diff --git a/src/test/isolation/expected/simple-write-skew.out b/src/test/isolation/expected/simple-write-skew.out new file mode 100644 index 0000000..835500d --- /dev/null +++ b/src/test/isolation/expected/simple-write-skew.out @@ -0,0 +1,41 @@ +Parsed test spec with 2 sessions + +starting permutation: rwx1 c1 rwx2 c2 +step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear'; +step c1: COMMIT; +step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple' +step c2: COMMIT; + +starting permutation: rwx1 rwx2 c1 c2 +step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear'; +step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple' +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rwx1 rwx2 c2 c1 +step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear'; +step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple' +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rwx2 rwx1 c1 c2 +step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple' +step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear'; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rwx2 rwx1 c2 c1 +step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple' +step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear'; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rwx2 c2 rwx1 c1 +step rwx2: UPDATE test SET t = 'pear' WHERE t = 'apple' +step c2: COMMIT; +step rwx1: UPDATE test SET t = 'apple' WHERE t = 'pear'; +step c1: COMMIT; diff --git a/src/test/isolation/expected/skip-locked-2.out b/src/test/isolation/expected/skip-locked-2.out new file mode 100644 index 0000000..3302d2e --- /dev/null +++ b/src/test/isolation/expected/skip-locked-2.out @@ -0,0 +1,67 @@ +Parsed test spec with 2 sessions + +starting permutation: s1a s2a s2b s1b s2c +step s1a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: COMMIT; +step s2c: COMMIT; + +starting permutation: s2a s1a s2b s1b s2c +step s2a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: COMMIT; +step s2c: COMMIT; + +starting permutation: s2a s2b s1a s1b s2c +step s2a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1a: SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: COMMIT; +step s2c: COMMIT; diff --git a/src/test/isolation/expected/skip-locked-3.out b/src/test/isolation/expected/skip-locked-3.out new file mode 100644 index 0000000..be1f84d --- /dev/null +++ b/src/test/isolation/expected/skip-locked-3.out @@ -0,0 +1,25 @@ +Parsed test spec with 3 sessions + +starting permutation: s1a s2a s3a s1b s2b s3b +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE LIMIT 1; <waiting ...> +step s3a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: COMMIT; +step s2a: <... completed> +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2b: COMMIT; +step s3b: COMMIT; diff --git a/src/test/isolation/expected/skip-locked-4.out b/src/test/isolation/expected/skip-locked-4.out new file mode 100644 index 0000000..cfa9ae1 --- /dev/null +++ b/src/test/isolation/expected/skip-locked-4.out @@ -0,0 +1,27 @@ +Parsed test spec with 2 sessions + +starting permutation: s2a s1a s2b s2c s2d s2e s1b s2f +step s2a: SELECT pg_advisory_lock(0); +pg_advisory_lock +---------------- + +(1 row) + +step s1a: SELECT * FROM foo WHERE pg_advisory_lock(0) IS NOT NULL ORDER BY id LIMIT 1 FOR UPDATE SKIP LOCKED; <waiting ...> +step s2b: UPDATE foo SET data = data WHERE id = 1; +step s2c: BEGIN; +step s2d: UPDATE foo SET data = data WHERE id = 1; +step s2e: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1a: <... completed> +id|data +--+---- + 2|x +(1 row) + +step s1b: COMMIT; +step s2f: COMMIT; diff --git a/src/test/isolation/expected/skip-locked-4_1.out b/src/test/isolation/expected/skip-locked-4_1.out new file mode 100644 index 0000000..489dcab --- /dev/null +++ b/src/test/isolation/expected/skip-locked-4_1.out @@ -0,0 +1,23 @@ +Parsed test spec with 2 sessions + +starting permutation: s2a s1a s2b s2c s2d s2e s1b s2f +step s2a: SELECT pg_advisory_lock(0); +pg_advisory_lock +---------------- + +(1 row) + +step s1a: SELECT * FROM foo WHERE pg_advisory_lock(0) IS NOT NULL ORDER BY id LIMIT 1 FOR UPDATE SKIP LOCKED; <waiting ...> +step s2b: UPDATE foo SET data = data WHERE id = 1; +step s2c: BEGIN; +step s2d: UPDATE foo SET data = data WHERE id = 1; +step s2e: SELECT pg_advisory_unlock(0); +pg_advisory_unlock +------------------ +t +(1 row) + +step s1a: <... completed> +ERROR: could not serialize access due to concurrent update +step s1b: COMMIT; +step s2f: COMMIT; diff --git a/src/test/isolation/expected/skip-locked.out b/src/test/isolation/expected/skip-locked.out new file mode 100644 index 0000000..3dc5768 --- /dev/null +++ b/src/test/isolation/expected/skip-locked.out @@ -0,0 +1,561 @@ +Parsed test spec with 2 sessions + +starting permutation: s1a s1b s1c s2a s2b s2c +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1c: COMMIT; +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2c: COMMIT; + +starting permutation: s1a s1b s2a s1c s2b s2c +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1c: COMMIT; +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2c: COMMIT; + +starting permutation: s1a s1b s2a s2b s1c s2c +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; + +starting permutation: s1a s1b s2a s2b s2c s1c +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2c: COMMIT; +step s1c: COMMIT; + +starting permutation: s1a s2a s1b s1c s2b s2c +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1c: COMMIT; +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2c: COMMIT; + +starting permutation: s1a s2a s1b s2b s1c s2c +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; + +starting permutation: s1a s2a s1b s2b s2c s1c +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2c: COMMIT; +step s1c: COMMIT; + +starting permutation: s1a s2a s2b s1b s1c s2c +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; + +starting permutation: s1a s2a s2b s1b s2c s1c +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2c: COMMIT; +step s1c: COMMIT; + +starting permutation: s1a s2a s2b s2c s1b s1c +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2c: COMMIT; +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1c: COMMIT; + +starting permutation: s2a s1a s1b s1c s2b s2c +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1c: COMMIT; +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2c: COMMIT; + +starting permutation: s2a s1a s1b s2b s1c s2c +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; + +starting permutation: s2a s1a s1b s2b s2c s1c +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2c: COMMIT; +step s1c: COMMIT; + +starting permutation: s2a s1a s2b s1b s1c s2c +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; + +starting permutation: s2a s1a s2b s1b s2c s1c +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2c: COMMIT; +step s1c: COMMIT; + +starting permutation: s2a s1a s2b s2c s1b s1c +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2c: COMMIT; +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1c: COMMIT; + +starting permutation: s2a s2b s1a s1b s1c s2c +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1c: COMMIT; +step s2c: COMMIT; + +starting permutation: s2a s2b s1a s1b s2c s1c +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2c: COMMIT; +step s1c: COMMIT; + +starting permutation: s2a s2b s1a s2c s1b s1c +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 2|bar |NEW +(1 row) + +step s2c: COMMIT; +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1c: COMMIT; + +starting permutation: s2a s2b s2c s1a s1b s1c +step s2a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s2c: COMMIT; +step s1a: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1b: SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; +id|data|status +--+----+------ + 1|foo |NEW +(1 row) + +step s1c: COMMIT; diff --git a/src/test/isolation/expected/temp-schema-cleanup.out b/src/test/isolation/expected/temp-schema-cleanup.out new file mode 100644 index 0000000..a46e8a7 --- /dev/null +++ b/src/test/isolation/expected/temp-schema-cleanup.out @@ -0,0 +1,116 @@ +Parsed test spec with 2 sessions + +starting permutation: s1_create_temp_objects s1_discard_temp s2_check_schema +step s1_create_temp_objects: + + -- create function large enough to be toasted, to ensure we correctly clean those up, a prior bug + -- https://postgr.es/m/CAOFAq3BU5Mf2TTvu8D9n_ZOoFAeQswuzk7yziAb7xuw_qyw5gw%40mail.gmail.com + SELECT exec(format($outer$ + CREATE OR REPLACE FUNCTION pg_temp.long() RETURNS text LANGUAGE sql AS $body$ SELECT %L; $body$$outer$, + (SELECT string_agg(g.i::text||':'||random()::text, '|') FROM generate_series(1, 100) g(i)))); + + -- The above bug requirs function removal to happen after a catalog + -- invalidation. dependency.c sorts objects in descending oid order so + -- that newer objects are deleted before older objects, so create a + -- table after. + CREATE TEMPORARY TABLE invalidate_catalog_cache(); + + -- test non-temp function is dropped when depending on temp table + CREATE TEMPORARY TABLE just_give_me_a_type(id serial primary key); + + CREATE FUNCTION uses_a_temp_type(just_give_me_a_type) RETURNS int LANGUAGE sql AS $$SELECT 1;$$; + +exec +---- + +(1 row) + +step s1_discard_temp: + DISCARD TEMP; + +step s2_check_schema: + SELECT oid::regclass FROM pg_class WHERE relnamespace = (SELECT oid FROM s1_temp_schema); + SELECT oid::regproc FROM pg_proc WHERE pronamespace = (SELECT oid FROM s1_temp_schema); + SELECT oid::regproc FROM pg_type WHERE typnamespace = (SELECT oid FROM s1_temp_schema); + +oid +--- +(0 rows) + +oid +--- +(0 rows) + +oid +--- +(0 rows) + + +starting permutation: s1_advisory s2_advisory s1_create_temp_objects s1_exit s2_check_schema +step s1_advisory: + SELECT pg_advisory_lock('pg_namespace'::regclass::int8); + +pg_advisory_lock +---------------- + +(1 row) + +step s2_advisory: + SELECT pg_advisory_lock('pg_namespace'::regclass::int8); + <waiting ...> +step s1_create_temp_objects: + + -- create function large enough to be toasted, to ensure we correctly clean those up, a prior bug + -- https://postgr.es/m/CAOFAq3BU5Mf2TTvu8D9n_ZOoFAeQswuzk7yziAb7xuw_qyw5gw%40mail.gmail.com + SELECT exec(format($outer$ + CREATE OR REPLACE FUNCTION pg_temp.long() RETURNS text LANGUAGE sql AS $body$ SELECT %L; $body$$outer$, + (SELECT string_agg(g.i::text||':'||random()::text, '|') FROM generate_series(1, 100) g(i)))); + + -- The above bug requirs function removal to happen after a catalog + -- invalidation. dependency.c sorts objects in descending oid order so + -- that newer objects are deleted before older objects, so create a + -- table after. + CREATE TEMPORARY TABLE invalidate_catalog_cache(); + + -- test non-temp function is dropped when depending on temp table + CREATE TEMPORARY TABLE just_give_me_a_type(id serial primary key); + + CREATE FUNCTION uses_a_temp_type(just_give_me_a_type) RETURNS int LANGUAGE sql AS $$SELECT 1;$$; + +exec +---- + +(1 row) + +step s1_exit: + SELECT pg_terminate_backend(pg_backend_pid()); + +FATAL: terminating connection due to administrator command +FATAL: terminating connection due to administrator command +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. + +step s2_advisory: <... completed> +pg_advisory_lock +---------------- + +(1 row) + +step s2_check_schema: + SELECT oid::regclass FROM pg_class WHERE relnamespace = (SELECT oid FROM s1_temp_schema); + SELECT oid::regproc FROM pg_proc WHERE pronamespace = (SELECT oid FROM s1_temp_schema); + SELECT oid::regproc FROM pg_type WHERE typnamespace = (SELECT oid FROM s1_temp_schema); + +oid +--- +(0 rows) + +oid +--- +(0 rows) + +oid +--- +(0 rows) + diff --git a/src/test/isolation/expected/temporal-range-integrity.out b/src/test/isolation/expected/temporal-range-integrity.out new file mode 100644 index 0000000..039193e --- /dev/null +++ b/src/test/isolation/expected/temporal-range-integrity.out @@ -0,0 +1,379 @@ +Parsed test spec with 2 sessions + +starting permutation: rx1 wy1 c1 ry2 wx2 c2 +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step c1: COMMIT; +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 1 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step c2: COMMIT; + +starting permutation: rx1 wy1 ry2 c1 wx2 c2 +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step c1: COMMIT; +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx1 wy1 ry2 wx2 c1 c2 +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 wy1 ry2 wx2 c2 c1 +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wy1 c1 wx2 c2 +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step c1: COMMIT; +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: rx1 ry2 wy1 wx2 c1 c2 +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wy1 wx2 c2 c1 +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wx2 wy1 c1 c2 +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wx2 wy1 c2 c1 +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rx1 ry2 wx2 c2 wy1 c1 +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step c2: COMMIT; +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: ry2 rx1 wy1 c1 wx2 c2 +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step c1: COMMIT; +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: ry2 rx1 wy1 wx2 c1 c2 +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wy1 wx2 c2 c1 +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wx2 wy1 c1 c2 +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wx2 wy1 c2 c1 +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 rx1 wx2 c2 wy1 c1 +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step c2: COMMIT; +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: ry2 wx2 rx1 wy1 c1 c2 +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 wx2 rx1 wy1 c2 c1 +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry2 wx2 rx1 c2 wy1 c1 +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 1 +(1 row) + +step c2: COMMIT; +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: ry2 wx2 c2 rx1 wy1 c1 +step ry2: SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; +count +----- + 0 +(1 row) + +step wx2: DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; +step c2: COMMIT; +step rx1: SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); +count +----- + 0 +(1 row) + +step wy1: INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); +step c1: COMMIT; diff --git a/src/test/isolation/expected/timeouts.out b/src/test/isolation/expected/timeouts.out new file mode 100644 index 0000000..9328676 --- /dev/null +++ b/src/test/isolation/expected/timeouts.out @@ -0,0 +1,81 @@ +Parsed test spec with 2 sessions + +starting permutation: rdtbl sto locktbl +step rdtbl: SELECT * FROM accounts; +accountid|balance +---------+------- +checking | 600 +savings | 600 +(2 rows) + +step sto: SET statement_timeout = '10ms'; +step locktbl: LOCK TABLE accounts; <waiting ...> +step locktbl: <... completed> +ERROR: canceling statement due to statement timeout + +starting permutation: rdtbl lto locktbl +step rdtbl: SELECT * FROM accounts; +accountid|balance +---------+------- +checking | 600 +savings | 600 +(2 rows) + +step lto: SET lock_timeout = '10ms'; +step locktbl: LOCK TABLE accounts; <waiting ...> +step locktbl: <... completed> +ERROR: canceling statement due to lock timeout + +starting permutation: rdtbl lsto locktbl +step rdtbl: SELECT * FROM accounts; +accountid|balance +---------+------- +checking | 600 +savings | 600 +(2 rows) + +step lsto: SET lock_timeout = '10ms'; SET statement_timeout = '10s'; +step locktbl: LOCK TABLE accounts; <waiting ...> +step locktbl: <... completed> +ERROR: canceling statement due to lock timeout + +starting permutation: rdtbl slto locktbl +step rdtbl: SELECT * FROM accounts; +accountid|balance +---------+------- +checking | 600 +savings | 600 +(2 rows) + +step slto: SET lock_timeout = '10s'; SET statement_timeout = '10ms'; +step locktbl: LOCK TABLE accounts; <waiting ...> +step locktbl: <... completed> +ERROR: canceling statement due to statement timeout + +starting permutation: wrtbl sto update +step wrtbl: UPDATE accounts SET balance = balance + 100; +step sto: SET statement_timeout = '10ms'; +step update: DELETE FROM accounts WHERE accountid = 'checking'; <waiting ...> +step update: <... completed> +ERROR: canceling statement due to statement timeout + +starting permutation: wrtbl lto update +step wrtbl: UPDATE accounts SET balance = balance + 100; +step lto: SET lock_timeout = '10ms'; +step update: DELETE FROM accounts WHERE accountid = 'checking'; <waiting ...> +step update: <... completed> +ERROR: canceling statement due to lock timeout + +starting permutation: wrtbl lsto update +step wrtbl: UPDATE accounts SET balance = balance + 100; +step lsto: SET lock_timeout = '10ms'; SET statement_timeout = '10s'; +step update: DELETE FROM accounts WHERE accountid = 'checking'; <waiting ...> +step update: <... completed> +ERROR: canceling statement due to lock timeout + +starting permutation: wrtbl slto update +step wrtbl: UPDATE accounts SET balance = balance + 100; +step slto: SET lock_timeout = '10s'; SET statement_timeout = '10ms'; +step update: DELETE FROM accounts WHERE accountid = 'checking'; <waiting ...> +step update: <... completed> +ERROR: canceling statement due to statement timeout diff --git a/src/test/isolation/expected/total-cash.out b/src/test/isolation/expected/total-cash.out new file mode 100644 index 0000000..7b00e0d --- /dev/null +++ b/src/test/isolation/expected/total-cash.out @@ -0,0 +1,349 @@ +Parsed test spec with 2 sessions + +starting permutation: wx1 rxy1 c1 wy2 rxy2 c2 +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c1: COMMIT; +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy2: SELECT SUM(balance) FROM accounts; +sum +--- +800 +(1 row) + +step c2: COMMIT; + +starting permutation: wx1 rxy1 wy2 c1 rxy2 c2 +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step c1: COMMIT; +step rxy2: SELECT SUM(balance) FROM accounts; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: wx1 rxy1 wy2 rxy2 c1 c2 +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wx1 rxy1 wy2 rxy2 c2 c1 +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wx1 wy2 rxy1 c1 rxy2 c2 +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c1: COMMIT; +step rxy2: SELECT SUM(balance) FROM accounts; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: wx1 wy2 rxy1 rxy2 c1 c2 +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wx1 wy2 rxy1 rxy2 c2 c1 +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wx1 wy2 rxy2 rxy1 c1 c2 +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wx1 wy2 rxy2 rxy1 c2 c1 +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wx1 wy2 rxy2 c2 rxy1 c1 +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c2: COMMIT; +step rxy1: SELECT SUM(balance) FROM accounts; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: wy2 wx1 rxy1 c1 rxy2 c2 +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c1: COMMIT; +step rxy2: SELECT SUM(balance) FROM accounts; +ERROR: could not serialize access due to read/write dependencies among transactions +step c2: COMMIT; + +starting permutation: wy2 wx1 rxy1 rxy2 c1 c2 +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 wx1 rxy1 rxy2 c2 c1 +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 wx1 rxy2 rxy1 c1 c2 +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 wx1 rxy2 rxy1 c2 c1 +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 wx1 rxy2 c2 rxy1 c1 +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c2: COMMIT; +step rxy1: SELECT SUM(balance) FROM accounts; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: wy2 rxy2 wx1 rxy1 c1 c2 +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 rxy2 wx1 rxy1 c2 c1 +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy1: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c2: COMMIT; +step c1: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wy2 rxy2 wx1 c2 rxy1 c1 +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step c2: COMMIT; +step rxy1: SELECT SUM(balance) FROM accounts; +ERROR: could not serialize access due to read/write dependencies among transactions +step c1: COMMIT; + +starting permutation: wy2 rxy2 c2 wx1 rxy1 c1 +step wy2: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; +step rxy2: SELECT SUM(balance) FROM accounts; + sum +---- +1000 +(1 row) + +step c2: COMMIT; +step wx1: UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; +step rxy1: SELECT SUM(balance) FROM accounts; +sum +--- +800 +(1 row) + +step c1: COMMIT; diff --git a/src/test/isolation/expected/truncate-conflict.out b/src/test/isolation/expected/truncate-conflict.out new file mode 100644 index 0000000..00d5ce3 --- /dev/null +++ b/src/test/isolation/expected/truncate-conflict.out @@ -0,0 +1,115 @@ +Parsed test spec with 2 sessions + +starting permutation: s1_begin s1_tab_lookup s2_auth s2_truncate s1_commit s2_reset +step s1_begin: BEGIN; +step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab; +?column? +-------- +t +(1 row) + +step s2_auth: SET ROLE regress_truncate_conflict; +step s2_truncate: TRUNCATE truncate_tab; +ERROR: permission denied for table truncate_tab +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_auth s2_truncate s1_tab_lookup s1_commit s2_reset +step s1_begin: BEGIN; +step s2_auth: SET ROLE regress_truncate_conflict; +step s2_truncate: TRUNCATE truncate_tab; +ERROR: permission denied for table truncate_tab +step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab; +?column? +-------- +t +(1 row) + +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_auth s1_tab_lookup s2_truncate s1_commit s2_reset +step s1_begin: BEGIN; +step s2_auth: SET ROLE regress_truncate_conflict; +step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab; +?column? +-------- +t +(1 row) + +step s2_truncate: TRUNCATE truncate_tab; +ERROR: permission denied for table truncate_tab +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s2_auth s2_truncate s1_begin s1_tab_lookup s1_commit s2_reset +step s2_auth: SET ROLE regress_truncate_conflict; +step s2_truncate: TRUNCATE truncate_tab; +ERROR: permission denied for table truncate_tab +step s1_begin: BEGIN; +step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab; +?column? +-------- +t +(1 row) + +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s1_tab_lookup s2_grant s2_auth s2_truncate s1_commit s2_reset +step s1_begin: BEGIN; +step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab; +?column? +-------- +t +(1 row) + +step s2_grant: GRANT TRUNCATE ON truncate_tab TO regress_truncate_conflict; +step s2_auth: SET ROLE regress_truncate_conflict; +step s2_truncate: TRUNCATE truncate_tab; <waiting ...> +step s1_commit: COMMIT; +step s2_truncate: <... completed> +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_grant s2_auth s2_truncate s1_tab_lookup s1_commit s2_reset +step s1_begin: BEGIN; +step s2_grant: GRANT TRUNCATE ON truncate_tab TO regress_truncate_conflict; +step s2_auth: SET ROLE regress_truncate_conflict; +step s2_truncate: TRUNCATE truncate_tab; +step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab; +?column? +-------- +t +(1 row) + +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_grant s2_auth s1_tab_lookup s2_truncate s1_commit s2_reset +step s1_begin: BEGIN; +step s2_grant: GRANT TRUNCATE ON truncate_tab TO regress_truncate_conflict; +step s2_auth: SET ROLE regress_truncate_conflict; +step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab; +?column? +-------- +t +(1 row) + +step s2_truncate: TRUNCATE truncate_tab; <waiting ...> +step s1_commit: COMMIT; +step s2_truncate: <... completed> +step s2_reset: RESET ROLE; + +starting permutation: s2_grant s2_auth s2_truncate s1_begin s1_tab_lookup s1_commit s2_reset +step s2_grant: GRANT TRUNCATE ON truncate_tab TO regress_truncate_conflict; +step s2_auth: SET ROLE regress_truncate_conflict; +step s2_truncate: TRUNCATE truncate_tab; +step s1_begin: BEGIN; +step s1_tab_lookup: SELECT count(*) >= 0 FROM truncate_tab; +?column? +-------- +t +(1 row) + +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; diff --git a/src/test/isolation/expected/tuplelock-conflict.out b/src/test/isolation/expected/tuplelock-conflict.out new file mode 100644 index 0000000..d629314 --- /dev/null +++ b/src/test/isolation/expected/tuplelock-conflict.out @@ -0,0 +1,629 @@ +Parsed test spec with 2 sessions + +starting permutation: s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock1 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock2 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock3 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock4 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock4: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock1 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock2 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock3 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock3: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock4 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock4: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock1 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; +a +- +1 +(1 row) + +step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock2 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; +a +- +1 +(1 row) + +step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock2: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock3 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; +a +- +1 +(1 row) + +step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock3: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock4 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; +a +- +1 +(1 row) + +step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock4: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock1 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; +a +- +1 +(1 row) + +step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock1: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock2 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; +a +- +1 +(1 row) + +step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock2: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock3 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; +a +- +1 +(1 row) + +step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock3: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock4 s1_commit +step s1_begin: BEGIN; +step s1_lcksvpt: SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; +a +- +1 +(1 row) + +step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; +a +- +1 +(1 row) + +step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock4: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_tuplock1 s2_tuplock1 s1_commit +step s1_begin: BEGIN; +step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_tuplock1 s2_tuplock2 s1_commit +step s1_begin: BEGIN; +step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_tuplock1 s2_tuplock3 s1_commit +step s1_begin: BEGIN; +step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_tuplock1 s2_tuplock4 s1_commit +step s1_begin: BEGIN; +step s1_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock4: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_tuplock2 s2_tuplock1 s1_commit +step s1_begin: BEGIN; +step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_tuplock2 s2_tuplock2 s1_commit +step s1_begin: BEGIN; +step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_tuplock2 s2_tuplock3 s1_commit +step s1_begin: BEGIN; +step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock3: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_tuplock2 s2_tuplock4 s1_commit +step s1_begin: BEGIN; +step s1_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; +a +- +1 +(1 row) + +step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock4: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_tuplock3 s2_tuplock1 s1_commit +step s1_begin: BEGIN; +step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; +a +- +1 +(1 row) + +step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; +a +- +1 +(1 row) + +step s1_commit: COMMIT; + +starting permutation: s1_begin s1_tuplock3 s2_tuplock2 s1_commit +step s1_begin: BEGIN; +step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; +a +- +1 +(1 row) + +step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock2: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_tuplock3 s2_tuplock3 s1_commit +step s1_begin: BEGIN; +step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; +a +- +1 +(1 row) + +step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock3: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_tuplock3 s2_tuplock4 s1_commit +step s1_begin: BEGIN; +step s1_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; +a +- +1 +(1 row) + +step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock4: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_tuplock4 s2_tuplock1 s1_commit +step s1_begin: BEGIN; +step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; +a +- +1 +(1 row) + +step s2_tuplock1: SELECT * FROM multixact_conflict FOR KEY SHARE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock1: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_tuplock4 s2_tuplock2 s1_commit +step s1_begin: BEGIN; +step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; +a +- +1 +(1 row) + +step s2_tuplock2: SELECT * FROM multixact_conflict FOR SHARE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock2: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_tuplock4 s2_tuplock3 s1_commit +step s1_begin: BEGIN; +step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; +a +- +1 +(1 row) + +step s2_tuplock3: SELECT * FROM multixact_conflict FOR NO KEY UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock3: <... completed> +a +- +1 +(1 row) + + +starting permutation: s1_begin s1_tuplock4 s2_tuplock4 s1_commit +step s1_begin: BEGIN; +step s1_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; +a +- +1 +(1 row) + +step s2_tuplock4: SELECT * FROM multixact_conflict FOR UPDATE; <waiting ...> +step s1_commit: COMMIT; +step s2_tuplock4: <... completed> +a +- +1 +(1 row) + diff --git a/src/test/isolation/expected/tuplelock-partition.out b/src/test/isolation/expected/tuplelock-partition.out new file mode 100644 index 0000000..369ddf9 --- /dev/null +++ b/src/test/isolation/expected/tuplelock-partition.out @@ -0,0 +1,24 @@ +Parsed test spec with 2 sessions + +starting permutation: s1b s1update_nokey s2locktuple s1c +step s1b: BEGIN; +step s1update_nokey: INSERT INTO parttab (key, col1, col2) VALUES (1, 'a', 'b') ON CONFLICT (key) DO UPDATE SET col1 = 'x', col2 = 'y'; +step s2locktuple: SELECT * FROM parttab FOR KEY SHARE; +col1|key|col2 +----+---+---- +a | 1|b +(1 row) + +step s1c: COMMIT; + +starting permutation: s1b s1update_key s2locktuple s1c +step s1b: BEGIN; +step s1update_key: INSERT INTO parttab (key, col1, col2) VALUES (1, 'a', 'b') ON CONFLICT (key) DO UPDATE SET key=1; +step s2locktuple: SELECT * FROM parttab FOR KEY SHARE; <waiting ...> +step s1c: COMMIT; +step s2locktuple: <... completed> +col1|key|col2 +----+---+---- +a | 1|b +(1 row) + diff --git a/src/test/isolation/expected/tuplelock-update.out b/src/test/isolation/expected/tuplelock-update.out new file mode 100644 index 0000000..1d37d45 --- /dev/null +++ b/src/test/isolation/expected/tuplelock-update.out @@ -0,0 +1,49 @@ +Parsed test spec with 4 sessions + +starting permutation: s1_advlock s2_update s3_update s4_update s1_chain s1_begin s1_grablock s1_advunlock1 s1_advunlock2 s1_advunlock3 s1_commit +step s1_advlock: + SELECT pg_advisory_lock(142857), + pg_advisory_lock(285714), + pg_advisory_lock(571428); + +pg_advisory_lock|pg_advisory_lock|pg_advisory_lock +----------------+----------------+---------------- + | | +(1 row) + +step s2_update: UPDATE pktab SET data = DEFAULT WHERE pg_advisory_lock_shared(142857) IS NOT NULL; <waiting ...> +step s3_update: UPDATE pktab SET data = DEFAULT WHERE pg_advisory_lock_shared(285714) IS NOT NULL; <waiting ...> +step s4_update: UPDATE pktab SET data = DEFAULT WHERE pg_advisory_lock_shared(571428) IS NOT NULL; <waiting ...> +step s1_chain: UPDATE pktab SET data = DEFAULT; +step s1_begin: BEGIN; +step s1_grablock: SELECT * FROM pktab FOR KEY SHARE; +id|data +--+---- + 1| 2 +(1 row) + +step s1_advunlock1: SELECT pg_advisory_unlock(142857); <waiting ...> +step s2_update: <... completed> +step s1_advunlock1: <... completed> +pg_advisory_unlock +------------------ +t +(1 row) + +step s1_advunlock2: SELECT pg_advisory_unlock(285714); <waiting ...> +step s3_update: <... completed> +step s1_advunlock2: <... completed> +pg_advisory_unlock +------------------ +t +(1 row) + +step s1_advunlock3: SELECT pg_advisory_unlock(571428); <waiting ...> +step s4_update: <... completed> +step s1_advunlock3: <... completed> +pg_advisory_unlock +------------------ +t +(1 row) + +step s1_commit: COMMIT; diff --git a/src/test/isolation/expected/tuplelock-upgrade-no-deadlock.out b/src/test/isolation/expected/tuplelock-upgrade-no-deadlock.out new file mode 100644 index 0000000..2159092 --- /dev/null +++ b/src/test/isolation/expected/tuplelock-upgrade-no-deadlock.out @@ -0,0 +1,253 @@ +Parsed test spec with 4 sessions + +starting permutation: s1_share s2_for_update s3_share s3_for_update s1_rollback s3_rollback s2_rollback +step s1_share: select id from tlu_job where id = 1 for share; +id +-- + 1 +(1 row) + +step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...> +step s3_share: select id from tlu_job where id = 1 for share; +id +-- + 1 +(1 row) + +step s3_for_update: select id from tlu_job where id = 1 for update; <waiting ...> +step s1_rollback: rollback; +step s3_for_update: <... completed> +id +-- + 1 +(1 row) + +step s3_rollback: rollback; +step s2_for_update: <... completed> +id +-- + 1 +(1 row) + +step s2_rollback: rollback; + +starting permutation: s1_keyshare s2_for_update s3_keyshare s1_update s3_update s1_rollback s3_rollback s2_rollback +step s1_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...> +step s3_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s1_update: update tlu_job set name = 'b' where id = 1; +step s3_update: update tlu_job set name = 'c' where id = 1; <waiting ...> +step s1_rollback: rollback; +step s3_update: <... completed> +step s3_rollback: rollback; +step s2_for_update: <... completed> +id +-- + 1 +(1 row) + +step s2_rollback: rollback; + +starting permutation: s1_keyshare s2_for_update s3_keyshare s1_update s3_update s1_commit s3_rollback s2_rollback +step s1_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...> +step s3_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s1_update: update tlu_job set name = 'b' where id = 1; +step s3_update: update tlu_job set name = 'c' where id = 1; <waiting ...> +step s1_commit: commit; +step s3_update: <... completed> +step s3_rollback: rollback; +step s2_for_update: <... completed> +id +-- + 1 +(1 row) + +step s2_rollback: rollback; + +starting permutation: s1_keyshare s2_for_update s3_keyshare s3_delete s1_rollback s3_rollback s2_rollback +step s1_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...> +step s3_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s3_delete: delete from tlu_job where id = 1; <waiting ...> +step s1_rollback: rollback; +step s3_delete: <... completed> +step s3_rollback: rollback; +step s2_for_update: <... completed> +id +-- + 1 +(1 row) + +step s2_rollback: rollback; + +starting permutation: s1_keyshare s2_for_update s3_keyshare s3_delete s1_rollback s3_commit s2_rollback +step s1_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...> +step s3_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s3_delete: delete from tlu_job where id = 1; <waiting ...> +step s1_rollback: rollback; +step s3_delete: <... completed> +step s3_commit: commit; +step s2_for_update: <... completed> +id +-- +(0 rows) + +step s2_rollback: rollback; + +starting permutation: s1_share s2_for_update s3_for_update s1_rollback s2_rollback s3_rollback +step s1_share: select id from tlu_job where id = 1 for share; +id +-- + 1 +(1 row) + +step s2_for_update: select id from tlu_job where id = 1 for update; <waiting ...> +step s3_for_update: select id from tlu_job where id = 1 for update; <waiting ...> +step s1_rollback: rollback; +step s2_for_update: <... completed> +id +-- + 1 +(1 row) + +step s2_rollback: rollback; +step s3_for_update: <... completed> +id +-- + 1 +(1 row) + +step s3_rollback: rollback; + +starting permutation: s1_share s2_update s3_update s1_rollback s2_rollback s3_rollback +step s1_share: select id from tlu_job where id = 1 for share; +id +-- + 1 +(1 row) + +step s2_update: update tlu_job set name = 'b' where id = 1; <waiting ...> +step s3_update: update tlu_job set name = 'c' where id = 1; <waiting ...> +step s1_rollback: rollback; +step s2_update: <... completed> +step s2_rollback: rollback; +step s3_update: <... completed> +step s3_rollback: rollback; + +starting permutation: s1_share s2_delete s3_delete s1_rollback s2_rollback s3_rollback +step s1_share: select id from tlu_job where id = 1 for share; +id +-- + 1 +(1 row) + +step s2_delete: delete from tlu_job where id = 1; <waiting ...> +step s3_delete: delete from tlu_job where id = 1; <waiting ...> +step s1_rollback: rollback; +step s2_delete: <... completed> +step s2_rollback: rollback; +step s3_delete: <... completed> +step s3_rollback: rollback; + +starting permutation: s1_keyshare s3_for_update s2_for_keyshare s1_savept_e s1_share s1_savept_f s1_fornokeyupd s2_fornokeyupd s0_begin s0_keyshare s1_rollback_f s0_keyshare s1_rollback_e s1_rollback s2_rollback s0_rollback s3_rollback +step s1_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s3_for_update: select id from tlu_job where id = 1 for update; <waiting ...> +step s2_for_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s1_savept_e: savepoint s1_e; +step s1_share: select id from tlu_job where id = 1 for share; +id +-- + 1 +(1 row) + +step s1_savept_f: savepoint s1_f; +step s1_fornokeyupd: select id from tlu_job where id = 1 for no key update; +id +-- + 1 +(1 row) + +step s2_fornokeyupd: select id from tlu_job where id = 1 for no key update; <waiting ...> +step s0_begin: begin; +step s0_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s1_rollback_f: rollback to s1_f; +step s0_keyshare: select id from tlu_job where id = 1 for key share; +id +-- + 1 +(1 row) + +step s1_rollback_e: rollback to s1_e; +step s2_fornokeyupd: <... completed> +id +-- + 1 +(1 row) + +step s1_rollback: rollback; +step s2_rollback: rollback; +step s0_rollback: rollback; +step s3_for_update: <... completed> +id +-- + 1 +(1 row) + +step s3_rollback: rollback; diff --git a/src/test/isolation/expected/two-ids.out b/src/test/isolation/expected/two-ids.out new file mode 100644 index 0000000..2ebd73f --- /dev/null +++ b/src/test/isolation/expected/two-ids.out @@ -0,0 +1,1187 @@ +Parsed test spec with 3 sessions + +starting permutation: wx1 c1 rxwy2 c2 ry3 c3 +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step ry3: select id from D2; +id +-- + 3 +(1 row) + +step c3: COMMIT; + +starting permutation: wx1 c1 rxwy2 ry3 c2 c3 +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: wx1 c1 rxwy2 ry3 c3 c2 +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: wx1 c1 ry3 rxwy2 c2 c3 +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: wx1 c1 ry3 rxwy2 c3 c2 +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: wx1 c1 ry3 c3 rxwy2 c2 +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; + +starting permutation: wx1 rxwy2 c1 c2 ry3 c3 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c1: COMMIT; +step c2: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c3: COMMIT; + +starting permutation: wx1 rxwy2 c1 ry3 c2 c3 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c1: COMMIT; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: wx1 rxwy2 c1 ry3 c3 c2 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c1: COMMIT; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wx1 rxwy2 c2 c1 ry3 c3 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c1: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c3: COMMIT; + +starting permutation: wx1 rxwy2 c2 ry3 c1 c3 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx1 rxwy2 c2 ry3 c3 c1 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx1 rxwy2 ry3 c1 c2 c3 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: wx1 rxwy2 ry3 c1 c3 c2 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wx1 rxwy2 ry3 c2 c1 c3 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx1 rxwy2 ry3 c2 c3 c1 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx1 rxwy2 ry3 c3 c1 c2 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: wx1 rxwy2 ry3 c3 c2 c1 +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: wx1 ry3 c1 rxwy2 c2 c3 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c1: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: wx1 ry3 c1 rxwy2 c3 c2 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c1: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: wx1 ry3 c1 c3 rxwy2 c2 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c1: COMMIT; +step c3: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; + +starting permutation: wx1 ry3 rxwy2 c1 c2 c3 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: wx1 ry3 rxwy2 c1 c3 c2 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: wx1 ry3 rxwy2 c2 c1 c3 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: wx1 ry3 rxwy2 c2 c3 c1 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: wx1 ry3 rxwy2 c3 c1 c2 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: wx1 ry3 rxwy2 c3 c2 c1 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: wx1 ry3 c3 c1 rxwy2 c2 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step c1: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; + +starting permutation: wx1 ry3 c3 rxwy2 c1 c2 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: wx1 ry3 c3 rxwy2 c2 c1 +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy2 wx1 c1 c2 ry3 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c2: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c3: COMMIT; + +starting permutation: rxwy2 wx1 c1 ry3 c2 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: rxwy2 wx1 c1 ry3 c3 c2 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxwy2 wx1 c2 c1 ry3 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c2: COMMIT; +step c1: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c3: COMMIT; + +starting permutation: rxwy2 wx1 c2 ry3 c1 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c2: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy2 wx1 c2 ry3 c3 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c2: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy2 wx1 ry3 c1 c2 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: rxwy2 wx1 ry3 c1 c3 c2 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxwy2 wx1 ry3 c2 c1 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy2 wx1 ry3 c2 c3 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy2 wx1 ry3 c3 c1 c2 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy2 wx1 ry3 c3 c2 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy2 c2 wx1 c1 ry3 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c3: COMMIT; + +starting permutation: rxwy2 c2 wx1 ry3 c1 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy2 c2 wx1 ry3 c3 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step wx1: update D1 set id = id + 1; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy2 c2 ry3 wx1 c1 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy2 c2 ry3 wx1 c3 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step wx1: update D1 set id = id + 1; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy2 c2 ry3 c3 wx1 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step ry3: select id from D2; +id +-- + 2 +(1 row) + +step c3: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; + +starting permutation: rxwy2 ry3 wx1 c1 c2 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: rxwy2 ry3 wx1 c1 c3 c2 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: rxwy2 ry3 wx1 c2 c1 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy2 ry3 wx1 c2 c3 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy2 ry3 wx1 c3 c1 c2 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy2 ry3 wx1 c3 c2 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy2 ry3 c2 wx1 c1 c3 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c2: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: rxwy2 ry3 c2 wx1 c3 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c2: COMMIT; +step wx1: update D1 set id = id + 1; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy2 ry3 c2 c3 wx1 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c2: COMMIT; +step c3: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; + +starting permutation: rxwy2 ry3 c3 wx1 c1 c2 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: rxwy2 ry3 c3 wx1 c2 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step wx1: update D1 set id = id + 1; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: rxwy2 ry3 c3 c2 wx1 c1 +step rxwy2: update D2 set id = (select id+1 from D1); +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step c2: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; + +starting permutation: ry3 wx1 c1 rxwy2 c2 c3 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c3: COMMIT; + +starting permutation: ry3 wx1 c1 rxwy2 c3 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c3: COMMIT; +step c2: COMMIT; + +starting permutation: ry3 wx1 c1 c3 rxwy2 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c3: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; + +starting permutation: ry3 wx1 rxwy2 c1 c2 c3 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: ry3 wx1 rxwy2 c1 c3 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry3 wx1 rxwy2 c2 c1 c3 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: ry3 wx1 rxwy2 c2 c3 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: ry3 wx1 rxwy2 c3 c1 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: ry3 wx1 rxwy2 c3 c2 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: ry3 wx1 c3 c1 rxwy2 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c3: COMMIT; +step c1: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; + +starting permutation: ry3 wx1 c3 rxwy2 c1 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c3: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: ry3 wx1 c3 rxwy2 c2 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step wx1: update D1 set id = id + 1; +step c3: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: ry3 rxwy2 wx1 c1 c2 c3 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions +step c3: COMMIT; + +starting permutation: ry3 rxwy2 wx1 c1 c3 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c3: COMMIT; +step c2: COMMIT; +ERROR: could not serialize access due to read/write dependencies among transactions + +starting permutation: ry3 rxwy2 wx1 c2 c1 c3 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c2: COMMIT; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: ry3 rxwy2 wx1 c2 c3 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c2: COMMIT; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: ry3 rxwy2 wx1 c3 c1 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c3: COMMIT; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: ry3 rxwy2 wx1 c3 c2 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c3: COMMIT; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: ry3 rxwy2 c2 wx1 c1 c3 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c3: COMMIT; + +starting permutation: ry3 rxwy2 c2 wx1 c3 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step wx1: update D1 set id = id + 1; +step c3: COMMIT; +step c1: COMMIT; + +starting permutation: ry3 rxwy2 c2 c3 wx1 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c3: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; + +starting permutation: ry3 rxwy2 c3 wx1 c1 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c3: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: ry3 rxwy2 c3 wx1 c2 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c3: COMMIT; +step wx1: update D1 set id = id + 1; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: ry3 rxwy2 c3 c2 wx1 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step rxwy2: update D2 set id = (select id+1 from D1); +step c3: COMMIT; +step c2: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; + +starting permutation: ry3 c3 wx1 c1 rxwy2 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; + +starting permutation: ry3 c3 wx1 rxwy2 c1 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: ry3 c3 wx1 rxwy2 c2 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step wx1: update D1 set id = id + 1; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: ry3 c3 rxwy2 wx1 c1 c2 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c1: COMMIT; +step c2: COMMIT; + +starting permutation: ry3 c3 rxwy2 wx1 c2 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step wx1: update D1 set id = id + 1; +step c2: COMMIT; +step c1: COMMIT; + +starting permutation: ry3 c3 rxwy2 c2 wx1 c1 +step ry3: select id from D2; +id +-- + 1 +(1 row) + +step c3: COMMIT; +step rxwy2: update D2 set id = (select id+1 from D1); +step c2: COMMIT; +step wx1: update D1 set id = id + 1; +step c1: COMMIT; diff --git a/src/test/isolation/expected/update-conflict-out.out b/src/test/isolation/expected/update-conflict-out.out new file mode 100644 index 0000000..1e82bd4 --- /dev/null +++ b/src/test/isolation/expected/update-conflict-out.out @@ -0,0 +1,31 @@ +Parsed test spec with 3 sessions + +starting permutation: foo_select bar_insert foo_insert foo_commit trouble_update bar_select bar_commit trouble_abort +step foo_select: SELECT * FROM txn0 WHERE id = 42; +id|val +--+--- +(0 rows) + +step bar_insert: INSERT INTO txn0 SELECT 42, 'bar_insert'; +step foo_insert: INSERT INTO txn1 SELECT 7, 'foo_insert'; +step foo_commit: COMMIT; +step trouble_update: UPDATE txn1 SET val = 'add physical version for "bar_select"' WHERE id = 7; +step bar_select: SELECT * FROM txn1 WHERE id = 7; +ERROR: could not serialize access due to read/write dependencies among transactions +step bar_commit: COMMIT; +step trouble_abort: ABORT; + +starting permutation: foo_select bar_insert foo_insert foo_commit trouble_delete bar_select bar_commit trouble_abort +step foo_select: SELECT * FROM txn0 WHERE id = 42; +id|val +--+--- +(0 rows) + +step bar_insert: INSERT INTO txn0 SELECT 42, 'bar_insert'; +step foo_insert: INSERT INTO txn1 SELECT 7, 'foo_insert'; +step foo_commit: COMMIT; +step trouble_delete: DELETE FROM txn1 WHERE id = 7; +step bar_select: SELECT * FROM txn1 WHERE id = 7; +ERROR: could not serialize access due to read/write dependencies among transactions +step bar_commit: COMMIT; +step trouble_abort: ABORT; diff --git a/src/test/isolation/expected/update-locked-tuple.out b/src/test/isolation/expected/update-locked-tuple.out new file mode 100644 index 0000000..1982c75 --- /dev/null +++ b/src/test/isolation/expected/update-locked-tuple.out @@ -0,0 +1,55 @@ +Parsed test spec with 2 sessions + +starting permutation: s1b s2b s2u s2c s1u1 s1u2 s1c +step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s2b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s2u: UPDATE users SET sometime = '1830-10-04' WHERE id = 1; +step s2c: COMMIT; +step s1u1: UPDATE orders SET name = 'order of olivier (2)', user_id = 1 WHERE id = 1; +step s1u2: UPDATE orders SET name = 'order of olivier (3)', user_id = 1 WHERE id = 1; +step s1c: COMMIT; + +starting permutation: s1b s2b s2u s1u1 s2c s1u2 s1c +step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s2b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s2u: UPDATE users SET sometime = '1830-10-04' WHERE id = 1; +step s1u1: UPDATE orders SET name = 'order of olivier (2)', user_id = 1 WHERE id = 1; +step s2c: COMMIT; +step s1u2: UPDATE orders SET name = 'order of olivier (3)', user_id = 1 WHERE id = 1; +step s1c: COMMIT; + +starting permutation: s1b s2b s1u1 s2u s2c s1u2 s1c +step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s2b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1u1: UPDATE orders SET name = 'order of olivier (2)', user_id = 1 WHERE id = 1; +step s2u: UPDATE users SET sometime = '1830-10-04' WHERE id = 1; +step s2c: COMMIT; +step s1u2: UPDATE orders SET name = 'order of olivier (3)', user_id = 1 WHERE id = 1; +step s1c: COMMIT; + +starting permutation: s1b s1u1 s2b s2u s2c s1u2 s1c +step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1u1: UPDATE orders SET name = 'order of olivier (2)', user_id = 1 WHERE id = 1; +step s2b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s2u: UPDATE users SET sometime = '1830-10-04' WHERE id = 1; +step s2c: COMMIT; +step s1u2: UPDATE orders SET name = 'order of olivier (3)', user_id = 1 WHERE id = 1; +step s1c: COMMIT; + +starting permutation: s1b s1u1 s2b s1u2 s2u s2c s1c +step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1u1: UPDATE orders SET name = 'order of olivier (2)', user_id = 1 WHERE id = 1; +step s2b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1u2: UPDATE orders SET name = 'order of olivier (3)', user_id = 1 WHERE id = 1; +step s2u: UPDATE users SET sometime = '1830-10-04' WHERE id = 1; +step s2c: COMMIT; +step s1c: COMMIT; + +starting permutation: s1b s1u1 s1u2 s2b s2u s2c s1c +step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s1u1: UPDATE orders SET name = 'order of olivier (2)', user_id = 1 WHERE id = 1; +step s1u2: UPDATE orders SET name = 'order of olivier (3)', user_id = 1 WHERE id = 1; +step s2b: BEGIN ISOLATION LEVEL REPEATABLE READ; +step s2u: UPDATE users SET sometime = '1830-10-04' WHERE id = 1; +step s2c: COMMIT; +step s1c: COMMIT; diff --git a/src/test/isolation/expected/vacuum-concurrent-drop.out b/src/test/isolation/expected/vacuum-concurrent-drop.out new file mode 100644 index 0000000..cf348d7 --- /dev/null +++ b/src/test/isolation/expected/vacuum-concurrent-drop.out @@ -0,0 +1,76 @@ +Parsed test spec with 2 sessions + +starting permutation: lock vac_specified drop_and_commit +step lock: + BEGIN; + LOCK part1 IN SHARE MODE; + +step vac_specified: VACUUM part1, part2; <waiting ...> +step drop_and_commit: + DROP TABLE part2; + COMMIT; + +s2: WARNING: skipping vacuum of "part2" --- relation no longer exists +step vac_specified: <... completed> + +starting permutation: lock vac_all_parts drop_and_commit +step lock: + BEGIN; + LOCK part1 IN SHARE MODE; + +step vac_all_parts: VACUUM parted; <waiting ...> +step drop_and_commit: + DROP TABLE part2; + COMMIT; + +step vac_all_parts: <... completed> + +starting permutation: lock analyze_specified drop_and_commit +step lock: + BEGIN; + LOCK part1 IN SHARE MODE; + +step analyze_specified: ANALYZE part1, part2; <waiting ...> +step drop_and_commit: + DROP TABLE part2; + COMMIT; + +s2: WARNING: skipping analyze of "part2" --- relation no longer exists +step analyze_specified: <... completed> + +starting permutation: lock analyze_all_parts drop_and_commit +step lock: + BEGIN; + LOCK part1 IN SHARE MODE; + +step analyze_all_parts: ANALYZE parted; <waiting ...> +step drop_and_commit: + DROP TABLE part2; + COMMIT; + +step analyze_all_parts: <... completed> + +starting permutation: lock vac_analyze_specified drop_and_commit +step lock: + BEGIN; + LOCK part1 IN SHARE MODE; + +step vac_analyze_specified: VACUUM ANALYZE part1, part2; <waiting ...> +step drop_and_commit: + DROP TABLE part2; + COMMIT; + +s2: WARNING: skipping vacuum of "part2" --- relation no longer exists +step vac_analyze_specified: <... completed> + +starting permutation: lock vac_analyze_all_parts drop_and_commit +step lock: + BEGIN; + LOCK part1 IN SHARE MODE; + +step vac_analyze_all_parts: VACUUM ANALYZE parted; <waiting ...> +step drop_and_commit: + DROP TABLE part2; + COMMIT; + +step vac_analyze_all_parts: <... completed> diff --git a/src/test/isolation/expected/vacuum-conflict.out b/src/test/isolation/expected/vacuum-conflict.out new file mode 100644 index 0000000..ffde537 --- /dev/null +++ b/src/test/isolation/expected/vacuum-conflict.out @@ -0,0 +1,149 @@ +Parsed test spec with 2 sessions + +starting permutation: s1_begin s1_lock s2_auth s2_vacuum s1_commit s2_reset +step s1_begin: BEGIN; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s2_auth: SET ROLE regress_vacuum_conflict; +s2: WARNING: skipping "vacuum_tab" --- only table or database owner can vacuum it +step s2_vacuum: VACUUM vacuum_tab; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_auth s2_vacuum s1_lock s1_commit s2_reset +step s1_begin: BEGIN; +step s2_auth: SET ROLE regress_vacuum_conflict; +s2: WARNING: skipping "vacuum_tab" --- only table or database owner can vacuum it +step s2_vacuum: VACUUM vacuum_tab; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_auth s1_lock s2_vacuum s1_commit s2_reset +step s1_begin: BEGIN; +step s2_auth: SET ROLE regress_vacuum_conflict; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +s2: WARNING: skipping "vacuum_tab" --- only table or database owner can vacuum it +step s2_vacuum: VACUUM vacuum_tab; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s2_auth s2_vacuum s1_begin s1_lock s1_commit s2_reset +step s2_auth: SET ROLE regress_vacuum_conflict; +s2: WARNING: skipping "vacuum_tab" --- only table or database owner can vacuum it +step s2_vacuum: VACUUM vacuum_tab; +step s1_begin: BEGIN; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s1_lock s2_auth s2_analyze s1_commit s2_reset +step s1_begin: BEGIN; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s2_auth: SET ROLE regress_vacuum_conflict; +s2: WARNING: skipping "vacuum_tab" --- only table or database owner can analyze it +step s2_analyze: ANALYZE vacuum_tab; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_auth s2_analyze s1_lock s1_commit s2_reset +step s1_begin: BEGIN; +step s2_auth: SET ROLE regress_vacuum_conflict; +s2: WARNING: skipping "vacuum_tab" --- only table or database owner can analyze it +step s2_analyze: ANALYZE vacuum_tab; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_auth s1_lock s2_analyze s1_commit s2_reset +step s1_begin: BEGIN; +step s2_auth: SET ROLE regress_vacuum_conflict; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +s2: WARNING: skipping "vacuum_tab" --- only table or database owner can analyze it +step s2_analyze: ANALYZE vacuum_tab; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s2_auth s2_analyze s1_begin s1_lock s1_commit s2_reset +step s2_auth: SET ROLE regress_vacuum_conflict; +s2: WARNING: skipping "vacuum_tab" --- only table or database owner can analyze it +step s2_analyze: ANALYZE vacuum_tab; +step s1_begin: BEGIN; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_grant s1_lock s2_auth s2_vacuum s1_commit s2_reset +step s1_begin: BEGIN; +step s2_grant: ALTER TABLE vacuum_tab OWNER TO regress_vacuum_conflict; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s2_auth: SET ROLE regress_vacuum_conflict; +step s2_vacuum: VACUUM vacuum_tab; <waiting ...> +step s1_commit: COMMIT; +step s2_vacuum: <... completed> +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_grant s2_auth s2_vacuum s1_lock s1_commit s2_reset +step s1_begin: BEGIN; +step s2_grant: ALTER TABLE vacuum_tab OWNER TO regress_vacuum_conflict; +step s2_auth: SET ROLE regress_vacuum_conflict; +step s2_vacuum: VACUUM vacuum_tab; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_grant s2_auth s1_lock s2_vacuum s1_commit s2_reset +step s1_begin: BEGIN; +step s2_grant: ALTER TABLE vacuum_tab OWNER TO regress_vacuum_conflict; +step s2_auth: SET ROLE regress_vacuum_conflict; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s2_vacuum: VACUUM vacuum_tab; <waiting ...> +step s1_commit: COMMIT; +step s2_vacuum: <... completed> +step s2_reset: RESET ROLE; + +starting permutation: s2_grant s2_auth s2_vacuum s1_begin s1_lock s1_commit s2_reset +step s2_grant: ALTER TABLE vacuum_tab OWNER TO regress_vacuum_conflict; +step s2_auth: SET ROLE regress_vacuum_conflict; +step s2_vacuum: VACUUM vacuum_tab; +step s1_begin: BEGIN; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_grant s1_lock s2_auth s2_analyze s1_commit s2_reset +step s1_begin: BEGIN; +step s2_grant: ALTER TABLE vacuum_tab OWNER TO regress_vacuum_conflict; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s2_auth: SET ROLE regress_vacuum_conflict; +step s2_analyze: ANALYZE vacuum_tab; <waiting ...> +step s1_commit: COMMIT; +step s2_analyze: <... completed> +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_grant s2_auth s2_analyze s1_lock s1_commit s2_reset +step s1_begin: BEGIN; +step s2_grant: ALTER TABLE vacuum_tab OWNER TO regress_vacuum_conflict; +step s2_auth: SET ROLE regress_vacuum_conflict; +step s2_analyze: ANALYZE vacuum_tab; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; + +starting permutation: s1_begin s2_grant s2_auth s1_lock s2_analyze s1_commit s2_reset +step s1_begin: BEGIN; +step s2_grant: ALTER TABLE vacuum_tab OWNER TO regress_vacuum_conflict; +step s2_auth: SET ROLE regress_vacuum_conflict; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s2_analyze: ANALYZE vacuum_tab; <waiting ...> +step s1_commit: COMMIT; +step s2_analyze: <... completed> +step s2_reset: RESET ROLE; + +starting permutation: s2_grant s2_auth s2_analyze s1_begin s1_lock s1_commit s2_reset +step s2_grant: ALTER TABLE vacuum_tab OWNER TO regress_vacuum_conflict; +step s2_auth: SET ROLE regress_vacuum_conflict; +step s2_analyze: ANALYZE vacuum_tab; +step s1_begin: BEGIN; +step s1_lock: LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; +step s1_commit: COMMIT; +step s2_reset: RESET ROLE; diff --git a/src/test/isolation/expected/vacuum-reltuples.out b/src/test/isolation/expected/vacuum-reltuples.out new file mode 100644 index 0000000..cdbe7f3 --- /dev/null +++ b/src/test/isolation/expected/vacuum-reltuples.out @@ -0,0 +1,67 @@ +Parsed test spec with 2 sessions + +starting permutation: modify vac stats +step modify: + insert into smalltbl select max(id)+1 from smalltbl; + +step vac: + vacuum smalltbl; + +step stats: + select relpages, reltuples from pg_class + where oid='smalltbl'::regclass; + +relpages|reltuples +--------+--------- + 1| 21 +(1 row) + + +starting permutation: modify open fetch1 vac close stats +step modify: + insert into smalltbl select max(id)+1 from smalltbl; + +step open: + begin; + declare c1 cursor for select 1 as dummy from smalltbl; + +step fetch1: + fetch next from c1; + +dummy +----- + 1 +(1 row) + +step vac: + vacuum smalltbl; + +step close: + commit; + +step stats: + select relpages, reltuples from pg_class + where oid='smalltbl'::regclass; + +relpages|reltuples +--------+--------- + 1| 20 +(1 row) + + +starting permutation: modify vac stats +step modify: + insert into smalltbl select max(id)+1 from smalltbl; + +step vac: + vacuum smalltbl; + +step stats: + select relpages, reltuples from pg_class + where oid='smalltbl'::regclass; + +relpages|reltuples +--------+--------- + 1| 21 +(1 row) + diff --git a/src/test/isolation/expected/vacuum-skip-locked.out b/src/test/isolation/expected/vacuum-skip-locked.out new file mode 100644 index 0000000..99db281 --- /dev/null +++ b/src/test/isolation/expected/vacuum-skip-locked.out @@ -0,0 +1,171 @@ +Parsed test spec with 2 sessions + +starting permutation: lock_share vac_specified commit +step lock_share: + BEGIN; + LOCK part1 IN SHARE MODE; + +s2: WARNING: skipping vacuum of "part1" --- lock not available +step vac_specified: VACUUM (SKIP_LOCKED) part1, part2; +step commit: + COMMIT; + + +starting permutation: lock_share vac_all_parts commit +step lock_share: + BEGIN; + LOCK part1 IN SHARE MODE; + +step vac_all_parts: VACUUM (SKIP_LOCKED) parted; +step commit: + COMMIT; + + +starting permutation: lock_share analyze_specified commit +step lock_share: + BEGIN; + LOCK part1 IN SHARE MODE; + +s2: WARNING: skipping analyze of "part1" --- lock not available +step analyze_specified: ANALYZE (SKIP_LOCKED) part1, part2; +step commit: + COMMIT; + + +starting permutation: lock_share analyze_all_parts commit +step lock_share: + BEGIN; + LOCK part1 IN SHARE MODE; + +step analyze_all_parts: ANALYZE (SKIP_LOCKED) parted; +step commit: + COMMIT; + + +starting permutation: lock_share vac_analyze_specified commit +step lock_share: + BEGIN; + LOCK part1 IN SHARE MODE; + +s2: WARNING: skipping vacuum of "part1" --- lock not available +step vac_analyze_specified: VACUUM (ANALYZE, SKIP_LOCKED) part1, part2; +step commit: + COMMIT; + + +starting permutation: lock_share vac_analyze_all_parts commit +step lock_share: + BEGIN; + LOCK part1 IN SHARE MODE; + +step vac_analyze_all_parts: VACUUM (ANALYZE, SKIP_LOCKED) parted; +step commit: + COMMIT; + + +starting permutation: lock_share vac_full_specified commit +step lock_share: + BEGIN; + LOCK part1 IN SHARE MODE; + +s2: WARNING: skipping vacuum of "part1" --- lock not available +step vac_full_specified: VACUUM (SKIP_LOCKED, FULL) part1, part2; +step commit: + COMMIT; + + +starting permutation: lock_share vac_full_all_parts commit +step lock_share: + BEGIN; + LOCK part1 IN SHARE MODE; + +step vac_full_all_parts: VACUUM (SKIP_LOCKED, FULL) parted; +step commit: + COMMIT; + + +starting permutation: lock_access_exclusive vac_specified commit +step lock_access_exclusive: + BEGIN; + LOCK part1 IN ACCESS EXCLUSIVE MODE; + +s2: WARNING: skipping vacuum of "part1" --- lock not available +step vac_specified: VACUUM (SKIP_LOCKED) part1, part2; +step commit: + COMMIT; + + +starting permutation: lock_access_exclusive vac_all_parts commit +step lock_access_exclusive: + BEGIN; + LOCK part1 IN ACCESS EXCLUSIVE MODE; + +step vac_all_parts: VACUUM (SKIP_LOCKED) parted; +step commit: + COMMIT; + + +starting permutation: lock_access_exclusive analyze_specified commit +step lock_access_exclusive: + BEGIN; + LOCK part1 IN ACCESS EXCLUSIVE MODE; + +s2: WARNING: skipping analyze of "part1" --- lock not available +step analyze_specified: ANALYZE (SKIP_LOCKED) part1, part2; +step commit: + COMMIT; + + +starting permutation: lock_access_exclusive analyze_all_parts commit +step lock_access_exclusive: + BEGIN; + LOCK part1 IN ACCESS EXCLUSIVE MODE; + +step analyze_all_parts: ANALYZE (SKIP_LOCKED) parted; <waiting ...> +step commit: + COMMIT; + +step analyze_all_parts: <... completed> + +starting permutation: lock_access_exclusive vac_analyze_specified commit +step lock_access_exclusive: + BEGIN; + LOCK part1 IN ACCESS EXCLUSIVE MODE; + +s2: WARNING: skipping vacuum of "part1" --- lock not available +step vac_analyze_specified: VACUUM (ANALYZE, SKIP_LOCKED) part1, part2; +step commit: + COMMIT; + + +starting permutation: lock_access_exclusive vac_analyze_all_parts commit +step lock_access_exclusive: + BEGIN; + LOCK part1 IN ACCESS EXCLUSIVE MODE; + +step vac_analyze_all_parts: VACUUM (ANALYZE, SKIP_LOCKED) parted; <waiting ...> +step commit: + COMMIT; + +step vac_analyze_all_parts: <... completed> + +starting permutation: lock_access_exclusive vac_full_specified commit +step lock_access_exclusive: + BEGIN; + LOCK part1 IN ACCESS EXCLUSIVE MODE; + +s2: WARNING: skipping vacuum of "part1" --- lock not available +step vac_full_specified: VACUUM (SKIP_LOCKED, FULL) part1, part2; +step commit: + COMMIT; + + +starting permutation: lock_access_exclusive vac_full_all_parts commit +step lock_access_exclusive: + BEGIN; + LOCK part1 IN ACCESS EXCLUSIVE MODE; + +step vac_full_all_parts: VACUUM (SKIP_LOCKED, FULL) parted; +step commit: + COMMIT; + diff --git a/src/test/isolation/isolation_main.c b/src/test/isolation/isolation_main.c new file mode 100644 index 0000000..eff9c4f --- /dev/null +++ b/src/test/isolation/isolation_main.c @@ -0,0 +1,152 @@ +/*------------------------------------------------------------------------- + * + * isolation_main --- pg_regress test launcher for isolation tests + * + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/test/isolation/isolation_main.c + * + *------------------------------------------------------------------------- + */ + +#include "postgres_fe.h" + +#include "pg_regress.h" + +char saved_argv0[MAXPGPATH]; +char isolation_exec[MAXPGPATH]; +bool looked_up_isolation_exec = false; + +#define PG_ISOLATION_VERSIONSTR "isolationtester (PostgreSQL) " PG_VERSION "\n" + +/* + * start an isolation tester process for specified file (including + * redirection), and return process ID + */ +static PID_TYPE +isolation_start_test(const char *testname, + _stringlist **resultfiles, + _stringlist **expectfiles, + _stringlist **tags) +{ + PID_TYPE pid; + char infile[MAXPGPATH]; + char outfile[MAXPGPATH]; + char expectfile[MAXPGPATH]; + char psql_cmd[MAXPGPATH * 3]; + size_t offset = 0; + char *appnameenv; + + /* need to do the path lookup here, check isolation_init() for details */ + if (!looked_up_isolation_exec) + { + /* look for isolationtester binary */ + if (find_other_exec(saved_argv0, "isolationtester", + PG_ISOLATION_VERSIONSTR, isolation_exec) != 0) + { + fprintf(stderr, _("could not find proper isolationtester binary\n")); + exit(2); + } + looked_up_isolation_exec = true; + } + + /* + * Look for files in the output dir first, consistent with a vpath search. + * This is mainly to create more reasonable error messages if the file is + * not found. It also allows local test overrides when running pg_regress + * outside of the source tree. + */ + snprintf(infile, sizeof(infile), "%s/specs/%s.spec", + outputdir, testname); + if (!file_exists(infile)) + snprintf(infile, sizeof(infile), "%s/specs/%s.spec", + inputdir, testname); + + snprintf(outfile, sizeof(outfile), "%s/results/%s.out", + outputdir, testname); + + snprintf(expectfile, sizeof(expectfile), "%s/expected/%s.out", + outputdir, testname); + if (!file_exists(expectfile)) + snprintf(expectfile, sizeof(expectfile), "%s/expected/%s.out", + inputdir, testname); + + add_stringlist_item(resultfiles, outfile); + add_stringlist_item(expectfiles, expectfile); + + if (launcher) + { + offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, + "%s ", launcher); + if (offset >= sizeof(psql_cmd)) + { + fprintf(stderr, _("command too long\n")); + exit(2); + } + } + + offset += snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset, + "\"%s\" \"dbname=%s\" < \"%s\" > \"%s\" 2>&1", + isolation_exec, + dblist->str, + infile, + outfile); + if (offset >= sizeof(psql_cmd)) + { + fprintf(stderr, _("command too long\n")); + exit(2); + } + + appnameenv = psprintf("isolation/%s", testname); + setenv("PGAPPNAME", appnameenv, 1); + free(appnameenv); + + pid = spawn_process(psql_cmd); + + if (pid == INVALID_PID) + { + fprintf(stderr, _("could not start process for test %s\n"), + testname); + exit(2); + } + + unsetenv("PGAPPNAME"); + + return pid; +} + +static void +isolation_init(int argc, char **argv) +{ + size_t argv0_len; + + /* + * We unfortunately cannot do the find_other_exec() lookup to find the + * "isolationtester" binary here. regression_main() calls the + * initialization functions before parsing the commandline arguments and + * thus hasn't changed the library search path at this point which in turn + * can cause the "isolationtester -V" invocation that find_other_exec() + * does to fail since it's linked to libpq. So we instead copy argv[0] + * and do the lookup the first time through isolation_start_test(). + */ + argv0_len = strlcpy(saved_argv0, argv[0], MAXPGPATH); + if (argv0_len >= MAXPGPATH) + { + fprintf(stderr, _("path for isolationtester executable is longer than %d bytes\n"), + (int) (MAXPGPATH - 1)); + exit(2); + } + + /* set default regression database name */ + add_stringlist_item(&dblist, "isolation_regression"); +} + +int +main(int argc, char *argv[]) +{ + return regression_main(argc, argv, + isolation_init, + isolation_start_test, + NULL /* no postfunc needed */ ); +} diff --git a/src/test/isolation/isolation_schedule b/src/test/isolation/isolation_schedule new file mode 100644 index 0000000..8e87098 --- /dev/null +++ b/src/test/isolation/isolation_schedule @@ -0,0 +1,101 @@ +test: read-only-anomaly +test: read-only-anomaly-2 +test: read-only-anomaly-3 +test: read-write-unique +test: read-write-unique-2 +test: read-write-unique-3 +test: read-write-unique-4 +test: simple-write-skew +test: receipt-report +test: temporal-range-integrity +test: project-manager +test: classroom-scheduling +test: total-cash +test: referential-integrity +test: ri-trigger +test: partial-index +test: two-ids +test: multiple-row-versions +test: index-only-scan +test: predicate-lock-hot-tuple +test: update-conflict-out +test: deadlock-simple +test: deadlock-hard +test: deadlock-soft +test: deadlock-soft-2 +test: deadlock-parallel +test: detach-partition-concurrently-1 +test: detach-partition-concurrently-2 +test: detach-partition-concurrently-3 +test: detach-partition-concurrently-4 +test: fk-contention +test: fk-deadlock +test: fk-deadlock2 +test: fk-partitioned-1 +test: fk-partitioned-2 +test: eval-plan-qual +test: eval-plan-qual-trigger +test: lock-update-delete +test: lock-update-traversal +test: inherit-temp +test: temp-schema-cleanup +test: insert-conflict-do-nothing +test: insert-conflict-do-nothing-2 +test: insert-conflict-do-update +test: insert-conflict-do-update-2 +test: insert-conflict-do-update-3 +test: insert-conflict-specconflict +test: delete-abort-savept +test: delete-abort-savept-2 +test: aborted-keyrevoke +test: multixact-no-deadlock +test: multixact-no-forget +test: lock-committed-update +test: lock-committed-keyupdate +test: update-locked-tuple +test: reindex-concurrently +test: reindex-concurrently-toast +test: reindex-schema +test: propagate-lock-delete +test: tuplelock-conflict +test: tuplelock-update +test: tuplelock-upgrade-no-deadlock +test: tuplelock-partition +test: freeze-the-dead +test: nowait +test: nowait-2 +test: nowait-3 +test: nowait-4 +test: nowait-5 +test: skip-locked +test: skip-locked-2 +test: skip-locked-3 +test: skip-locked-4 +test: drop-index-concurrently-1 +test: multiple-cic +test: alter-table-1 +test: alter-table-2 +test: alter-table-3 +test: alter-table-4 +test: create-trigger +test: sequence-ddl +test: async-notify +test: vacuum-reltuples +test: timeouts +test: vacuum-concurrent-drop +test: vacuum-conflict +test: vacuum-skip-locked +test: horizons +test: predicate-hash +test: predicate-gist +test: predicate-gin +test: partition-concurrent-attach +test: partition-drop-index-locking +test: partition-key-update-1 +test: partition-key-update-2 +test: partition-key-update-3 +test: partition-key-update-4 +test: plpgsql-toast +test: truncate-conflict +test: serializable-parallel +test: serializable-parallel-2 diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c new file mode 100644 index 0000000..12179f2 --- /dev/null +++ b/src/test/isolation/isolationtester.c @@ -0,0 +1,1149 @@ +/* + * src/test/isolation/isolationtester.c + * + * isolationtester.c + * Runs an isolation test specified by a spec file. + */ + +#include "postgres_fe.h" + +#include <sys/time.h> +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif + +#include "datatype/timestamp.h" +#include "isolationtester.h" +#include "libpq-fe.h" +#include "pg_getopt.h" +#include "pqexpbuffer.h" + +#define PREP_WAITING "isolationtester_waiting" + +/* + * conns[0] is the global setup, teardown, and watchdog connection. Additional + * connections represent spec-defined sessions. + */ +typedef struct IsoConnInfo +{ + /* The libpq connection object for this connection. */ + PGconn *conn; + /* The backend PID, in numeric and string formats. */ + int backend_pid; + const char *backend_pid_str; + /* Name of the associated session. */ + const char *sessionname; + /* Active step on this connection, or NULL if idle. */ + PermutationStep *active_step; + /* Number of NOTICE messages received from connection. */ + int total_notices; +} IsoConnInfo; + +static IsoConnInfo *conns = NULL; +static int nconns = 0; + +/* Flag indicating some new NOTICE has arrived */ +static bool any_new_notice = false; + +/* Maximum time to wait before giving up on a step (in usec) */ +static int64 max_step_wait = 300 * USECS_PER_SEC; + + +static void check_testspec(TestSpec *testspec); +static void run_testspec(TestSpec *testspec); +static void run_all_permutations(TestSpec *testspec); +static void run_all_permutations_recurse(TestSpec *testspec, int *piles, + int nsteps, PermutationStep **steps); +static void run_named_permutations(TestSpec *testspec); +static void run_permutation(TestSpec *testspec, int nsteps, + PermutationStep **steps); + +/* Flag bits for try_complete_step(s) */ +#define STEP_NONBLOCK 0x1 /* return as soon as cmd waits for a lock */ +#define STEP_RETRY 0x2 /* this is a retry of a previously-waiting cmd */ + +static int try_complete_steps(TestSpec *testspec, PermutationStep **waiting, + int nwaiting, int flags); +static bool try_complete_step(TestSpec *testspec, PermutationStep *pstep, + int flags); + +static int step_qsort_cmp(const void *a, const void *b); +static int step_bsearch_cmp(const void *a, const void *b); + +static bool step_has_blocker(PermutationStep *pstep); +static void printResultSet(PGresult *res); +static void isotesterNoticeProcessor(void *arg, const char *message); +static void blackholeNoticeProcessor(void *arg, const char *message); + +static void +disconnect_atexit(void) +{ + int i; + + for (i = 0; i < nconns; i++) + if (conns[i].conn) + PQfinish(conns[i].conn); +} + +int +main(int argc, char **argv) +{ + const char *conninfo; + const char *env_wait; + TestSpec *testspec; + PGresult *res; + PQExpBufferData wait_query; + int opt; + int i; + + while ((opt = getopt(argc, argv, "V")) != -1) + { + switch (opt) + { + case 'V': + puts("isolationtester (PostgreSQL) " PG_VERSION); + exit(0); + default: + fprintf(stderr, "Usage: isolationtester [CONNINFO]\n"); + return EXIT_FAILURE; + } + } + + /* + * Make stdout unbuffered to match stderr; and ensure stderr is unbuffered + * too, which it should already be everywhere except sometimes in Windows. + */ + setbuf(stdout, NULL); + setbuf(stderr, NULL); + + /* + * If the user supplies a non-option parameter on the command line, use it + * as the conninfo string; otherwise default to setting dbname=postgres + * and using environment variables or defaults for all other connection + * parameters. + */ + if (argc > optind) + conninfo = argv[optind]; + else + conninfo = "dbname = postgres"; + + /* + * If PGISOLATIONTIMEOUT is set in the environment, adopt its value (given + * in seconds) as the max time to wait for any one step to complete. + */ + env_wait = getenv("PGISOLATIONTIMEOUT"); + if (env_wait != NULL) + max_step_wait = ((int64) atoi(env_wait)) * USECS_PER_SEC; + + /* Read the test spec from stdin */ + spec_yyparse(); + testspec = &parseresult; + + /* Perform post-parse checking, and fill in linking fields */ + check_testspec(testspec); + + printf("Parsed test spec with %d sessions\n", testspec->nsessions); + + /* + * Establish connections to the database, one for each session and an + * extra for lock wait detection and global work. + */ + nconns = 1 + testspec->nsessions; + conns = (IsoConnInfo *) pg_malloc0(nconns * sizeof(IsoConnInfo)); + atexit(disconnect_atexit); + + for (i = 0; i < nconns; i++) + { + const char *sessionname; + + if (i == 0) + sessionname = "control connection"; + else + sessionname = testspec->sessions[i - 1]->name; + + conns[i].sessionname = sessionname; + + conns[i].conn = PQconnectdb(conninfo); + if (PQstatus(conns[i].conn) != CONNECTION_OK) + { + fprintf(stderr, "Connection %d failed: %s", + i, PQerrorMessage(conns[i].conn)); + exit(1); + } + + /* + * Set up notice processors for the user-defined connections, so that + * messages can get printed prefixed with the session names. The + * control connection gets a "blackhole" processor instead (hides all + * messages). + */ + if (i != 0) + PQsetNoticeProcessor(conns[i].conn, + isotesterNoticeProcessor, + (void *) &conns[i]); + else + PQsetNoticeProcessor(conns[i].conn, + blackholeNoticeProcessor, + NULL); + + /* + * Similarly, append the session name to application_name to make it + * easier to map spec file sessions to log output and + * pg_stat_activity. The reason to append instead of just setting the + * name is that we don't know the name of the test currently running. + */ + res = PQexecParams(conns[i].conn, + "SELECT set_config('application_name',\n" + " current_setting('application_name') || '/' || $1,\n" + " false)", + 1, NULL, + &sessionname, + NULL, NULL, 0); + if (PQresultStatus(res) != PGRES_TUPLES_OK) + { + fprintf(stderr, "setting of application name failed: %s", + PQerrorMessage(conns[i].conn)); + exit(1); + } + + /* Save each connection's backend PID for subsequent use. */ + conns[i].backend_pid = PQbackendPID(conns[i].conn); + conns[i].backend_pid_str = psprintf("%d", conns[i].backend_pid); + } + + /* + * Build the query we'll use to detect lock contention among sessions in + * the test specification. Most of the time, we could get away with + * simply checking whether a session is waiting for *any* lock: we don't + * exactly expect concurrent use of test tables. However, autovacuum will + * occasionally take AccessExclusiveLock to truncate a table, and we must + * ignore that transient wait. + */ + initPQExpBuffer(&wait_query); + appendPQExpBufferStr(&wait_query, + "SELECT pg_catalog.pg_isolation_test_session_is_blocked($1, '{"); + /* The spec syntax requires at least one session; assume that here. */ + appendPQExpBufferStr(&wait_query, conns[1].backend_pid_str); + for (i = 2; i < nconns; i++) + appendPQExpBuffer(&wait_query, ",%s", conns[i].backend_pid_str); + appendPQExpBufferStr(&wait_query, "}')"); + + res = PQprepare(conns[0].conn, PREP_WAITING, wait_query.data, 0, NULL); + if (PQresultStatus(res) != PGRES_COMMAND_OK) + { + fprintf(stderr, "prepare of lock wait query failed: %s", + PQerrorMessage(conns[0].conn)); + exit(1); + } + PQclear(res); + termPQExpBuffer(&wait_query); + + /* + * Run the permutations specified in the spec, or all if none were + * explicitly specified. + */ + run_testspec(testspec); + + return 0; +} + +/* + * Validity-check the test spec and fill in cross-links between nodes. + */ +static void +check_testspec(TestSpec *testspec) +{ + int nallsteps; + Step **allsteps; + int i, + j, + k; + + /* Create a sorted lookup table of all steps. */ + nallsteps = 0; + for (i = 0; i < testspec->nsessions; i++) + nallsteps += testspec->sessions[i]->nsteps; + + allsteps = pg_malloc(nallsteps * sizeof(Step *)); + + k = 0; + for (i = 0; i < testspec->nsessions; i++) + { + for (j = 0; j < testspec->sessions[i]->nsteps; j++) + allsteps[k++] = testspec->sessions[i]->steps[j]; + } + + qsort(allsteps, nallsteps, sizeof(Step *), step_qsort_cmp); + + /* Verify that all step names are unique. */ + for (i = 1; i < nallsteps; i++) + { + if (strcmp(allsteps[i - 1]->name, + allsteps[i]->name) == 0) + { + fprintf(stderr, "duplicate step name: %s\n", + allsteps[i]->name); + exit(1); + } + } + + /* Set the session index fields in steps. */ + for (i = 0; i < testspec->nsessions; i++) + { + Session *session = testspec->sessions[i]; + + for (j = 0; j < session->nsteps; j++) + session->steps[j]->session = i; + } + + /* + * If we have manually-specified permutations, link PermutationSteps to + * Steps, and fill in blocker links. + */ + for (i = 0; i < testspec->npermutations; i++) + { + Permutation *p = testspec->permutations[i]; + + for (j = 0; j < p->nsteps; j++) + { + PermutationStep *pstep = p->steps[j]; + Step **this = (Step **) bsearch(pstep->name, + allsteps, + nallsteps, + sizeof(Step *), + step_bsearch_cmp); + + if (this == NULL) + { + fprintf(stderr, "undefined step \"%s\" specified in permutation\n", + pstep->name); + exit(1); + } + pstep->step = *this; + + /* Mark the step used, for check below */ + pstep->step->used = true; + } + + /* + * Identify any blocker steps. We search only the current + * permutation, since steps not used there couldn't be concurrent. + * Note that it's OK to reference later permutation steps, so this + * can't be combined with the previous loop. + */ + for (j = 0; j < p->nsteps; j++) + { + PermutationStep *pstep = p->steps[j]; + + for (k = 0; k < pstep->nblockers; k++) + { + PermutationStepBlocker *blocker = pstep->blockers[k]; + int n; + + if (blocker->blocktype == PSB_ONCE) + continue; /* nothing to link to */ + + blocker->step = NULL; + for (n = 0; n < p->nsteps; n++) + { + PermutationStep *otherp = p->steps[n]; + + if (strcmp(otherp->name, blocker->stepname) == 0) + { + blocker->step = otherp->step; + break; + } + } + if (blocker->step == NULL) + { + fprintf(stderr, "undefined blocking step \"%s\" referenced in permutation step \"%s\"\n", + blocker->stepname, pstep->name); + exit(1); + } + /* can't block on completion of step of own session */ + if (blocker->step->session == pstep->step->session) + { + fprintf(stderr, "permutation step \"%s\" cannot block on its own session\n", + pstep->name); + exit(1); + } + } + } + } + + /* + * If we have manually-specified permutations, verify that all steps have + * been used, warning about anything defined but not used. We can skip + * this when using automatically-generated permutations. + */ + if (testspec->permutations) + { + for (i = 0; i < nallsteps; i++) + { + if (!allsteps[i]->used) + fprintf(stderr, "unused step name: %s\n", allsteps[i]->name); + } + } + + free(allsteps); +} + +/* + * Run the permutations specified in the spec, or all if none were + * explicitly specified. + */ +static void +run_testspec(TestSpec *testspec) +{ + if (testspec->permutations) + run_named_permutations(testspec); + else + run_all_permutations(testspec); +} + +/* + * Run all permutations of the steps and sessions. + */ +static void +run_all_permutations(TestSpec *testspec) +{ + int nsteps; + int i; + PermutationStep *steps; + PermutationStep **stepptrs; + int *piles; + + /* Count the total number of steps in all sessions */ + nsteps = 0; + for (i = 0; i < testspec->nsessions; i++) + nsteps += testspec->sessions[i]->nsteps; + + /* Create PermutationStep workspace array */ + steps = (PermutationStep *) pg_malloc0(sizeof(PermutationStep) * nsteps); + stepptrs = (PermutationStep **) pg_malloc(sizeof(PermutationStep *) * nsteps); + for (i = 0; i < nsteps; i++) + stepptrs[i] = steps + i; + + /* + * To generate the permutations, we conceptually put the steps of each + * session on a pile. To generate a permutation, we pick steps from the + * piles until all piles are empty. By picking steps from piles in + * different order, we get different permutations. + * + * A pile is actually just an integer which tells how many steps we've + * already picked from this pile. + */ + piles = pg_malloc(sizeof(int) * testspec->nsessions); + for (i = 0; i < testspec->nsessions; i++) + piles[i] = 0; + + run_all_permutations_recurse(testspec, piles, 0, stepptrs); + + free(steps); + free(stepptrs); + free(piles); +} + +static void +run_all_permutations_recurse(TestSpec *testspec, int *piles, + int nsteps, PermutationStep **steps) +{ + int i; + bool found = false; + + for (i = 0; i < testspec->nsessions; i++) + { + /* If there's any more steps in this pile, pick it and recurse */ + if (piles[i] < testspec->sessions[i]->nsteps) + { + Step *newstep = testspec->sessions[i]->steps[piles[i]]; + + /* + * These automatically-generated PermutationSteps never have + * blocker conditions. So we need only fill these fields, relying + * on run_all_permutations() to have zeroed the rest: + */ + steps[nsteps]->name = newstep->name; + steps[nsteps]->step = newstep; + + piles[i]++; + + run_all_permutations_recurse(testspec, piles, nsteps + 1, steps); + + piles[i]--; + + found = true; + } + } + + /* If all the piles were empty, this permutation is completed. Run it */ + if (!found) + run_permutation(testspec, nsteps, steps); +} + +/* + * Run permutations given in the test spec + */ +static void +run_named_permutations(TestSpec *testspec) +{ + int i; + + for (i = 0; i < testspec->npermutations; i++) + { + Permutation *p = testspec->permutations[i]; + + run_permutation(testspec, p->nsteps, p->steps); + } +} + +static int +step_qsort_cmp(const void *a, const void *b) +{ + Step *stepa = *((Step **) a); + Step *stepb = *((Step **) b); + + return strcmp(stepa->name, stepb->name); +} + +static int +step_bsearch_cmp(const void *a, const void *b) +{ + char *stepname = (char *) a; + Step *step = *((Step **) b); + + return strcmp(stepname, step->name); +} + +/* + * Run one permutation + */ +static void +run_permutation(TestSpec *testspec, int nsteps, PermutationStep **steps) +{ + PGresult *res; + int i; + int nwaiting = 0; + PermutationStep **waiting; + + waiting = pg_malloc(sizeof(PermutationStep *) * testspec->nsessions); + + printf("\nstarting permutation:"); + for (i = 0; i < nsteps; i++) + printf(" %s", steps[i]->name); + printf("\n"); + + /* Perform setup */ + for (i = 0; i < testspec->nsetupsqls; i++) + { + res = PQexec(conns[0].conn, testspec->setupsqls[i]); + if (PQresultStatus(res) == PGRES_TUPLES_OK) + { + printResultSet(res); + } + else if (PQresultStatus(res) != PGRES_COMMAND_OK) + { + fprintf(stderr, "setup failed: %s", PQerrorMessage(conns[0].conn)); + exit(1); + } + PQclear(res); + } + + /* Perform per-session setup */ + for (i = 0; i < testspec->nsessions; i++) + { + if (testspec->sessions[i]->setupsql) + { + res = PQexec(conns[i + 1].conn, testspec->sessions[i]->setupsql); + if (PQresultStatus(res) == PGRES_TUPLES_OK) + { + printResultSet(res); + } + else if (PQresultStatus(res) != PGRES_COMMAND_OK) + { + fprintf(stderr, "setup of session %s failed: %s", + conns[i + 1].sessionname, + PQerrorMessage(conns[i + 1].conn)); + exit(1); + } + PQclear(res); + } + } + + /* Perform steps */ + for (i = 0; i < nsteps; i++) + { + PermutationStep *pstep = steps[i]; + Step *step = pstep->step; + IsoConnInfo *iconn = &conns[1 + step->session]; + PGconn *conn = iconn->conn; + bool mustwait; + int j; + + /* + * Check whether the session that needs to perform the next step is + * still blocked on an earlier step. If so, wait for it to finish. + */ + if (iconn->active_step != NULL) + { + struct timeval start_time; + + gettimeofday(&start_time, NULL); + + while (iconn->active_step != NULL) + { + PermutationStep *oldstep = iconn->active_step; + + /* + * Wait for oldstep. But even though we don't use + * STEP_NONBLOCK, it might not complete because of blocker + * conditions. + */ + if (!try_complete_step(testspec, oldstep, STEP_RETRY)) + { + /* Done, so remove oldstep from the waiting[] array. */ + int w; + + for (w = 0; w < nwaiting; w++) + { + if (oldstep == waiting[w]) + break; + } + if (w >= nwaiting) + abort(); /* can't happen */ + if (w + 1 < nwaiting) + memmove(&waiting[w], &waiting[w + 1], + (nwaiting - (w + 1)) * sizeof(PermutationStep *)); + nwaiting--; + } + + /* + * Check for other steps that have finished. We should do + * this if oldstep completed, as it might have unblocked + * something. On the other hand, if oldstep hasn't completed, + * we must poll all the active steps in hopes of unblocking + * oldstep. So either way, poll them. + */ + nwaiting = try_complete_steps(testspec, waiting, nwaiting, + STEP_NONBLOCK | STEP_RETRY); + + /* + * If the target session is still busy, apply a timeout to + * keep from hanging indefinitely, which could happen with + * incorrect blocker annotations. Use the same 2 * + * max_step_wait limit as try_complete_step does for deciding + * to die. (We don't bother with trying to cancel anything, + * since it's unclear what to cancel in this case.) + */ + if (iconn->active_step != NULL) + { + struct timeval current_time; + int64 td; + + gettimeofday(¤t_time, NULL); + td = (int64) current_time.tv_sec - (int64) start_time.tv_sec; + td *= USECS_PER_SEC; + td += (int64) current_time.tv_usec - (int64) start_time.tv_usec; + if (td > 2 * max_step_wait) + { + fprintf(stderr, "step %s timed out after %d seconds\n", + iconn->active_step->name, + (int) (td / USECS_PER_SEC)); + fprintf(stderr, "active steps are:"); + for (j = 1; j < nconns; j++) + { + IsoConnInfo *oconn = &conns[j]; + + if (oconn->active_step != NULL) + fprintf(stderr, " %s", + oconn->active_step->name); + } + fprintf(stderr, "\n"); + exit(1); + } + } + } + } + + /* Send the query for this step. */ + if (!PQsendQuery(conn, step->sql)) + { + fprintf(stdout, "failed to send query for step %s: %s\n", + step->name, PQerrorMessage(conn)); + exit(1); + } + + /* Remember we launched a step. */ + iconn->active_step = pstep; + + /* Remember target number of NOTICEs for any blocker conditions. */ + for (j = 0; j < pstep->nblockers; j++) + { + PermutationStepBlocker *blocker = pstep->blockers[j]; + + if (blocker->blocktype == PSB_NUM_NOTICES) + blocker->target_notices = blocker->num_notices + + conns[blocker->step->session + 1].total_notices; + } + + /* Try to complete this step without blocking. */ + mustwait = try_complete_step(testspec, pstep, STEP_NONBLOCK); + + /* Check for completion of any steps that were previously waiting. */ + nwaiting = try_complete_steps(testspec, waiting, nwaiting, + STEP_NONBLOCK | STEP_RETRY); + + /* If this step is waiting, add it to the array of waiters. */ + if (mustwait) + waiting[nwaiting++] = pstep; + } + + /* Wait for any remaining queries. */ + nwaiting = try_complete_steps(testspec, waiting, nwaiting, STEP_RETRY); + if (nwaiting != 0) + { + fprintf(stderr, "failed to complete permutation due to mutually-blocking steps\n"); + exit(1); + } + + /* Perform per-session teardown */ + for (i = 0; i < testspec->nsessions; i++) + { + if (testspec->sessions[i]->teardownsql) + { + res = PQexec(conns[i + 1].conn, testspec->sessions[i]->teardownsql); + if (PQresultStatus(res) == PGRES_TUPLES_OK) + { + printResultSet(res); + } + else if (PQresultStatus(res) != PGRES_COMMAND_OK) + { + fprintf(stderr, "teardown of session %s failed: %s", + conns[i + 1].sessionname, + PQerrorMessage(conns[i + 1].conn)); + /* don't exit on teardown failure */ + } + PQclear(res); + } + } + + /* Perform teardown */ + if (testspec->teardownsql) + { + res = PQexec(conns[0].conn, testspec->teardownsql); + if (PQresultStatus(res) == PGRES_TUPLES_OK) + { + printResultSet(res); + } + else if (PQresultStatus(res) != PGRES_COMMAND_OK) + { + fprintf(stderr, "teardown failed: %s", + PQerrorMessage(conns[0].conn)); + /* don't exit on teardown failure */ + } + PQclear(res); + } + + free(waiting); +} + +/* + * Check for completion of any waiting step(s). + * Remove completed ones from the waiting[] array, + * and return the new value of nwaiting. + * See try_complete_step for the meaning of the flags. + */ +static int +try_complete_steps(TestSpec *testspec, PermutationStep **waiting, + int nwaiting, int flags) +{ + int old_nwaiting; + bool have_blocker; + + do + { + int w = 0; + + /* Reset latch; we only care about notices received within loop. */ + any_new_notice = false; + + /* Likewise, these variables reset for each retry. */ + old_nwaiting = nwaiting; + have_blocker = false; + + /* Scan the array, try to complete steps. */ + while (w < nwaiting) + { + if (try_complete_step(testspec, waiting[w], flags)) + { + /* Still blocked, leave it alone. */ + if (waiting[w]->nblockers > 0) + have_blocker = true; + w++; + } + else + { + /* Done, remove it from array. */ + if (w + 1 < nwaiting) + memmove(&waiting[w], &waiting[w + 1], + (nwaiting - (w + 1)) * sizeof(PermutationStep *)); + nwaiting--; + } + } + + /* + * If any of the still-waiting steps have blocker conditions attached, + * it's possible that one of the steps we examined afterwards has + * released them (either by completing, or by sending a NOTICE). If + * any step completions or NOTICEs happened, repeat the loop until + * none occurs. Without this provision, completion timing could vary + * depending on the order in which the steps appear in the array. + */ + } while (have_blocker && (nwaiting < old_nwaiting || any_new_notice)); + return nwaiting; +} + +/* + * Our caller already sent the query associated with this step. Wait for it + * to either complete, or hit a blocking condition. + * + * When calling this function on behalf of a given step for a second or later + * time, pass the STEP_RETRY flag. Do not pass it on the first call. + * + * Returns true if the step was *not* completed, false if it was completed. + * Reasons for non-completion are (a) the STEP_NONBLOCK flag was specified + * and the query is waiting to acquire a lock, or (b) the step has an + * unsatisfied blocker condition. When STEP_NONBLOCK is given, we assume + * that any lock wait will persist until we have executed additional steps. + */ +static bool +try_complete_step(TestSpec *testspec, PermutationStep *pstep, int flags) +{ + Step *step = pstep->step; + IsoConnInfo *iconn = &conns[1 + step->session]; + PGconn *conn = iconn->conn; + fd_set read_set; + struct timeval start_time; + struct timeval timeout; + int sock = PQsocket(conn); + int ret; + PGresult *res; + PGnotify *notify; + bool canceled = false; + + /* + * If the step is annotated with (*), then on the first call, force it to + * wait. This is useful for ensuring consistent output when the step + * might or might not complete so fast that we don't observe it waiting. + */ + if (!(flags & STEP_RETRY)) + { + int i; + + for (i = 0; i < pstep->nblockers; i++) + { + PermutationStepBlocker *blocker = pstep->blockers[i]; + + if (blocker->blocktype == PSB_ONCE) + { + printf("step %s: %s <waiting ...>\n", + step->name, step->sql); + return true; + } + } + } + + if (sock < 0) + { + fprintf(stderr, "invalid socket: %s", PQerrorMessage(conn)); + exit(1); + } + + gettimeofday(&start_time, NULL); + FD_ZERO(&read_set); + + while (PQisBusy(conn)) + { + FD_SET(sock, &read_set); + timeout.tv_sec = 0; + timeout.tv_usec = 10000; /* Check for lock waits every 10ms. */ + + ret = select(sock + 1, &read_set, NULL, NULL, &timeout); + if (ret < 0) /* error in select() */ + { + if (errno == EINTR) + continue; + fprintf(stderr, "select failed: %s\n", strerror(errno)); + exit(1); + } + else if (ret == 0) /* select() timeout: check for lock wait */ + { + struct timeval current_time; + int64 td; + + /* If it's OK for the step to block, check whether it has. */ + if (flags & STEP_NONBLOCK) + { + bool waiting; + + res = PQexecPrepared(conns[0].conn, PREP_WAITING, 1, + &conns[step->session + 1].backend_pid_str, + NULL, NULL, 0); + if (PQresultStatus(res) != PGRES_TUPLES_OK || + PQntuples(res) != 1) + { + fprintf(stderr, "lock wait query failed: %s", + PQerrorMessage(conns[0].conn)); + exit(1); + } + waiting = ((PQgetvalue(res, 0, 0))[0] == 't'); + PQclear(res); + + if (waiting) /* waiting to acquire a lock */ + { + /* + * Since it takes time to perform the lock-check query, + * some data --- notably, NOTICE messages --- might have + * arrived since we looked. We must call PQconsumeInput + * and then PQisBusy to collect and process any such + * messages. In the (unlikely) case that PQisBusy then + * returns false, we might as well go examine the + * available result. + */ + if (!PQconsumeInput(conn)) + { + fprintf(stderr, "PQconsumeInput failed: %s\n", + PQerrorMessage(conn)); + exit(1); + } + if (!PQisBusy(conn)) + break; + + /* + * conn is still busy, so conclude that the step really is + * waiting. + */ + if (!(flags & STEP_RETRY)) + printf("step %s: %s <waiting ...>\n", + step->name, step->sql); + return true; + } + /* else, not waiting */ + } + + /* Figure out how long we've been waiting for this step. */ + gettimeofday(¤t_time, NULL); + td = (int64) current_time.tv_sec - (int64) start_time.tv_sec; + td *= USECS_PER_SEC; + td += (int64) current_time.tv_usec - (int64) start_time.tv_usec; + + /* + * After max_step_wait microseconds, try to cancel the query. + * + * If the user tries to test an invalid permutation, we don't want + * to hang forever, especially when this is running in the + * buildfarm. This will presumably lead to this permutation + * failing, but remaining permutations and tests should still be + * OK. + */ + if (td > max_step_wait && !canceled) + { + PGcancel *cancel = PQgetCancel(conn); + + if (cancel != NULL) + { + char buf[256]; + + if (PQcancel(cancel, buf, sizeof(buf))) + { + /* + * print to stdout not stderr, as this should appear + * in the test case's results + */ + printf("isolationtester: canceling step %s after %d seconds\n", + step->name, (int) (td / USECS_PER_SEC)); + canceled = true; + } + else + fprintf(stderr, "PQcancel failed: %s\n", buf); + PQfreeCancel(cancel); + } + } + + /* + * After twice max_step_wait, just give up and die. + * + * Since cleanup steps won't be run in this case, this may cause + * later tests to fail. That stinks, but it's better than waiting + * forever for the server to respond to the cancel. + */ + if (td > 2 * max_step_wait) + { + fprintf(stderr, "step %s timed out after %d seconds\n", + step->name, (int) (td / USECS_PER_SEC)); + exit(1); + } + } + else if (!PQconsumeInput(conn)) /* select(): data available */ + { + fprintf(stderr, "PQconsumeInput failed: %s\n", + PQerrorMessage(conn)); + exit(1); + } + } + + /* + * The step is done, but we won't report it as complete so long as there + * are blockers. + */ + if (step_has_blocker(pstep)) + { + if (!(flags & STEP_RETRY)) + printf("step %s: %s <waiting ...>\n", + step->name, step->sql); + return true; + } + + /* Otherwise, go ahead and complete it. */ + if (flags & STEP_RETRY) + printf("step %s: <... completed>\n", step->name); + else + printf("step %s: %s\n", step->name, step->sql); + + while ((res = PQgetResult(conn))) + { + switch (PQresultStatus(res)) + { + case PGRES_COMMAND_OK: + case PGRES_EMPTY_QUERY: + break; + case PGRES_TUPLES_OK: + printResultSet(res); + break; + case PGRES_FATAL_ERROR: + + /* + * Detail may contain XID values, so we want to just show + * primary. Beware however that libpq-generated error results + * may not contain subfields, only an old-style message. + */ + { + const char *sev = PQresultErrorField(res, + PG_DIAG_SEVERITY); + const char *msg = PQresultErrorField(res, + PG_DIAG_MESSAGE_PRIMARY); + + if (sev && msg) + printf("%s: %s\n", sev, msg); + else + printf("%s\n", PQresultErrorMessage(res)); + } + break; + default: + printf("unexpected result status: %s\n", + PQresStatus(PQresultStatus(res))); + } + PQclear(res); + } + + /* Report any available NOTIFY messages, too */ + PQconsumeInput(conn); + while ((notify = PQnotifies(conn)) != NULL) + { + /* Try to identify which session it came from */ + const char *sendername = NULL; + char pidstring[32]; + int i; + + for (i = 0; i < testspec->nsessions; i++) + { + if (notify->be_pid == conns[i + 1].backend_pid) + { + sendername = conns[i + 1].sessionname; + break; + } + } + if (sendername == NULL) + { + /* Doesn't seem to be any test session, so show the hard way */ + snprintf(pidstring, sizeof(pidstring), "PID %d", notify->be_pid); + sendername = pidstring; + } + printf("%s: NOTIFY \"%s\" with payload \"%s\" from %s\n", + testspec->sessions[step->session]->name, + notify->relname, notify->extra, sendername); + PQfreemem(notify); + PQconsumeInput(conn); + } + + /* Connection is now idle. */ + iconn->active_step = NULL; + + return false; +} + +/* Detect whether a step has any unsatisfied blocker conditions */ +static bool +step_has_blocker(PermutationStep *pstep) +{ + int i; + + for (i = 0; i < pstep->nblockers; i++) + { + PermutationStepBlocker *blocker = pstep->blockers[i]; + IsoConnInfo *iconn; + + switch (blocker->blocktype) + { + case PSB_ONCE: + /* Ignore; try_complete_step handles this specially */ + break; + case PSB_OTHER_STEP: + /* Block if referenced step is active */ + iconn = &conns[1 + blocker->step->session]; + if (iconn->active_step && + iconn->active_step->step == blocker->step) + return true; + break; + case PSB_NUM_NOTICES: + /* Block if not enough notices received yet */ + iconn = &conns[1 + blocker->step->session]; + if (iconn->total_notices < blocker->target_notices) + return true; + break; + } + } + return false; +} + +static void +printResultSet(PGresult *res) +{ + PQprintOpt popt; + + memset(&popt, 0, sizeof(popt)); + popt.header = true; + popt.align = true; + popt.fieldSep = "|"; + PQprint(stdout, res, &popt); +} + +/* notice processor for regular user sessions */ +static void +isotesterNoticeProcessor(void *arg, const char *message) +{ + IsoConnInfo *myconn = (IsoConnInfo *) arg; + + /* Prefix the backend's message with the session name. */ + printf("%s: %s", myconn->sessionname, message); + /* Record notices, since we may need this to decide to unblock a step. */ + myconn->total_notices++; + any_new_notice = true; +} + +/* notice processor, hides the message */ +static void +blackholeNoticeProcessor(void *arg, const char *message) +{ + /* do nothing */ +} diff --git a/src/test/isolation/isolationtester.h b/src/test/isolation/isolationtester.h new file mode 100644 index 0000000..5f30021 --- /dev/null +++ b/src/test/isolation/isolationtester.h @@ -0,0 +1,93 @@ +/*------------------------------------------------------------------------- + * + * isolationtester.h + * include file for isolation tests + * + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * IDENTIFICATION + * src/test/isolation/isolationtester.h + * + *------------------------------------------------------------------------- + */ +#ifndef ISOLATIONTESTER_H +#define ISOLATIONTESTER_H + +/* + * The structs declared here are used in the output of specparse.y. + * Except where noted, all fields are set in the grammar and not + * changed thereafter. + */ +typedef struct Step Step; + +typedef struct +{ + char *name; + char *setupsql; + char *teardownsql; + Step **steps; + int nsteps; +} Session; + +struct Step +{ + char *name; + char *sql; + /* These fields are filled by check_testspec(): */ + int session; /* identifies owning session */ + bool used; /* has step been used in a permutation? */ +}; + +typedef enum +{ + PSB_ONCE, /* force step to wait once */ + PSB_OTHER_STEP, /* wait for another step to complete first */ + PSB_NUM_NOTICES /* wait for N notices from another session */ +} PermutationStepBlockerType; + +typedef struct +{ + char *stepname; + PermutationStepBlockerType blocktype; + int num_notices; /* only used for PSB_NUM_NOTICES */ + /* These fields are filled by check_testspec(): */ + Step *step; /* link to referenced step (if any) */ + /* These fields are runtime workspace: */ + int target_notices; /* total notices needed from other session */ +} PermutationStepBlocker; + +typedef struct +{ + char *name; /* name of referenced Step */ + PermutationStepBlocker **blockers; + int nblockers; + /* These fields are filled by check_testspec(): */ + Step *step; /* link to referenced Step */ +} PermutationStep; + +typedef struct +{ + int nsteps; + PermutationStep **steps; +} Permutation; + +typedef struct +{ + char **setupsqls; + int nsetupsqls; + char *teardownsql; + Session **sessions; + int nsessions; + Permutation **permutations; + int npermutations; +} TestSpec; + +extern TestSpec parseresult; + +extern int spec_yyparse(void); + +extern int spec_yylex(void); +extern void spec_yyerror(const char *str); + +#endif /* ISOLATIONTESTER_H */ diff --git a/src/test/isolation/specparse.c b/src/test/isolation/specparse.c new file mode 100644 index 0000000..07da64a --- /dev/null +++ b/src/test/isolation/specparse.c @@ -0,0 +1,1689 @@ +/* A Bison parser, made by GNU Bison 3.7.5. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output, and Bison version. */ +#define YYBISON 30705 + +/* Bison version string. */ +#define YYBISON_VERSION "3.7.5" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + +/* Substitute the variable and function names. */ +#define yyparse spec_yyparse +#define yylex spec_yylex +#define yyerror spec_yyerror +#define yydebug spec_yydebug +#define yynerrs spec_yynerrs +#define yylval spec_yylval +#define yychar spec_yychar + +/* First part of user prologue. */ +#line 1 "specparse.y" + +/*------------------------------------------------------------------------- + * + * specparse.y + * bison grammar for the isolation test file format + * + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + *------------------------------------------------------------------------- + */ + +#include "postgres_fe.h" + +#include "isolationtester.h" + + +TestSpec parseresult; /* result of parsing is left here */ + + +#line 99 "specparse.c" + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast<Type> (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + + +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int spec_yydebug; +#endif + +/* Token kinds. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + sqlblock = 258, /* sqlblock */ + identifier = 259, /* identifier */ + INTEGER = 260, /* INTEGER */ + NOTICES = 261, /* NOTICES */ + PERMUTATION = 262, /* PERMUTATION */ + SESSION = 263, /* SESSION */ + SETUP = 264, /* SETUP */ + STEP = 265, /* STEP */ + TEARDOWN = 266, /* TEARDOWN */ + TEST = 267 /* TEST */ + }; + typedef enum yytokentype yytoken_kind_t; +#endif + +/* Value type. */ +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +union YYSTYPE +{ +#line 26 "specparse.y" + + char *str; + int integer; + Session *session; + Step *step; + Permutation *permutation; + PermutationStep *permutationstep; + PermutationStepBlocker *blocker; + struct + { + void **elements; + int nelements; + } ptr_list; + +#line 173 "specparse.c" + +}; +typedef union YYSTYPE YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 +#endif + + +extern YYSTYPE spec_yylval; + +int spec_yyparse (void); + + +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_sqlblock = 3, /* sqlblock */ + YYSYMBOL_identifier = 4, /* identifier */ + YYSYMBOL_INTEGER = 5, /* INTEGER */ + YYSYMBOL_NOTICES = 6, /* NOTICES */ + YYSYMBOL_PERMUTATION = 7, /* PERMUTATION */ + YYSYMBOL_SESSION = 8, /* SESSION */ + YYSYMBOL_SETUP = 9, /* SETUP */ + YYSYMBOL_STEP = 10, /* STEP */ + YYSYMBOL_TEARDOWN = 11, /* TEARDOWN */ + YYSYMBOL_TEST = 12, /* TEST */ + YYSYMBOL_13_ = 13, /* '(' */ + YYSYMBOL_14_ = 14, /* ')' */ + YYSYMBOL_15_ = 15, /* ',' */ + YYSYMBOL_16_ = 16, /* '*' */ + YYSYMBOL_YYACCEPT = 17, /* $accept */ + YYSYMBOL_TestSpec = 18, /* TestSpec */ + YYSYMBOL_setup_list = 19, /* setup_list */ + YYSYMBOL_opt_setup = 20, /* opt_setup */ + YYSYMBOL_setup = 21, /* setup */ + YYSYMBOL_opt_teardown = 22, /* opt_teardown */ + YYSYMBOL_session_list = 23, /* session_list */ + YYSYMBOL_session = 24, /* session */ + YYSYMBOL_step_list = 25, /* step_list */ + YYSYMBOL_step = 26, /* step */ + YYSYMBOL_opt_permutation_list = 27, /* opt_permutation_list */ + YYSYMBOL_permutation_list = 28, /* permutation_list */ + YYSYMBOL_permutation = 29, /* permutation */ + YYSYMBOL_permutation_step_list = 30, /* permutation_step_list */ + YYSYMBOL_permutation_step = 31, /* permutation_step */ + YYSYMBOL_blocker_list = 32, /* blocker_list */ + YYSYMBOL_blocker = 33 /* blocker */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + + + + +#ifdef short +# undef short +#endif + +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + <limits.h> and (if available) <stdint.h> are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include <limits.h> /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include <stdint.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif +#endif + +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; +#else +typedef signed char yytype_int8; +#endif + +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; +#else +typedef short yytype_int16; +#endif + +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; +#else +typedef short yytype_uint8; +#endif + +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; +#else +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned +# endif +#endif + +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + + +/* Stored state numbers (used for stacks). */ +typedef yytype_int8 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + + +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YY_USE(E) ((void) (E)) +#else +# define YY_USE(E) /* empty */ +#endif + +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + + +#define YY_ASSERT(E) ((void) (0 && (E))) + +#if !defined yyoverflow + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* !defined yyoverflow */ + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yy_state_t yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYPTRDIFF_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ + } \ + while (0) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYPTRDIFF_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 3 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 41 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 17 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 17 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 29 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 43 + +/* YYMAXUTOK -- Last valid token kind. */ +#define YYMAXUTOK 267 + + +/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, with out-of-bounds checking. */ +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) + +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex. */ +static const yytype_int8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 13, 14, 16, 2, 15, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12 +}; + +#if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +static const yytype_int16 yyrline[] = +{ + 0, 59, 59, 76, 80, 90, 91, 95, 99, 100, + 104, 111, 120, 132, 139, 149, 161, 166, 172, 179, + 189, 198, 205, 214, 222, 233, 240, 249, 258, 267 +}; +#endif + +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if YYDEBUG || 0 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "\"end of file\"", "error", "\"invalid token\"", "sqlblock", + "identifier", "INTEGER", "NOTICES", "PERMUTATION", "SESSION", "SETUP", + "STEP", "TEARDOWN", "TEST", "'('", "')'", "','", "'*'", "$accept", + "TestSpec", "setup_list", "opt_setup", "setup", "opt_teardown", + "session_list", "session", "step_list", "step", "opt_permutation_list", + "permutation_list", "permutation", "permutation_step_list", + "permutation_step", "blocker_list", "blocker", YY_NULLPTR +}; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} +#endif + +#ifdef YYPRINT +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ +static const yytype_int16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 40, 41, 44, 42 +}; +#endif + +#define YYPACT_NINF (-14) + +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) + +#define YYTABLE_NINF (-1) + +#define yytable_value_is_error(Yyn) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int8 yypact[] = +{ + -14, 2, -8, -14, 3, 4, -14, 7, -14, -14, + 6, -3, -14, 8, 12, -14, -14, 11, -14, 1, + -14, 9, 12, -14, -14, 15, -2, -14, -4, -14, + 17, -14, -14, 18, -14, -1, -14, -14, 16, -14, + -4, -14, -14 +}; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_int8 yydefact[] = +{ + 3, 0, 8, 1, 0, 0, 4, 0, 7, 9, + 0, 17, 11, 5, 0, 10, 2, 16, 19, 0, + 6, 23, 20, 22, 18, 0, 8, 14, 0, 21, + 0, 12, 13, 27, 29, 0, 26, 15, 0, 24, + 0, 28, 25 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -14, -14, -14, -14, 10, 0, -14, 14, -14, 5, + -14, -14, 13, -14, 19, -14, -13 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + 0, 1, 2, 19, 6, 7, 11, 12, 26, 27, + 16, 17, 18, 22, 23, 35, 36 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_int8 yytable[] = +{ + 33, 4, 3, 5, 14, 10, 8, 9, 25, 5, + 13, 25, 34, 39, 40, 10, 21, 4, 14, 30, + 37, 41, 28, 20, 38, 15, 31, 42, 0, 0, + 24, 32, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 29 +}; + +static const yytype_int8 yycheck[] = +{ + 4, 9, 0, 11, 7, 8, 3, 3, 10, 11, + 4, 10, 16, 14, 15, 8, 4, 9, 7, 4, + 3, 5, 13, 13, 6, 11, 26, 40, -1, -1, + 17, 26, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 22 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_int8 yystos[] = +{ + 0, 18, 19, 0, 9, 11, 21, 22, 3, 3, + 8, 23, 24, 4, 7, 24, 27, 28, 29, 20, + 21, 4, 30, 31, 29, 10, 25, 26, 13, 31, + 4, 22, 26, 4, 16, 32, 33, 3, 6, 14, + 15, 5, 33 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_int8 yyr1[] = +{ + 0, 17, 18, 19, 19, 20, 20, 21, 22, 22, + 23, 23, 24, 25, 25, 26, 27, 27, 28, 28, + 29, 30, 30, 31, 31, 32, 32, 33, 33, 33 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_int8 yyr2[] = +{ + 0, 2, 4, 0, 2, 0, 1, 2, 0, 2, + 2, 1, 5, 2, 1, 3, 1, 0, 2, 1, + 2, 2, 1, 1, 4, 3, 1, 1, 3, 1 +}; + + +enum { YYENOMEM = -2 }; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ + while (0) + +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF + + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +# ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif + + +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Kind, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*-----------------------------------. +| Print this symbol's value on YYO. | +`-----------------------------------*/ + +static void +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) +{ + FILE *yyoutput = yyo; + YY_USE (yyoutput); + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); +# endif + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ + +static void +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) +{ + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); + + yy_symbol_value_print (yyo, yykind, yyvaluep); + YYFPRINTF (yyo, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +static void +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +static void +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule) +{ + int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)]); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + + + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +static void +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep) +{ + YY_USE (yyvaluep); + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END +} + + +/* Lookahead token kind. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; +/* Number of syntax errors so far. */ +int yynerrs; + + + + +/*----------. +| yyparse. | +`----------*/ + +int +yyparse (void) +{ + yy_state_fast_t yystate = 0; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus = 0; + + /* Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; + + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; + + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; + + int yyn; + /* The return value of yyparse. */ + int yyresult; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + + +/*------------------------------------------------------------. +| yynewstate -- push a new state, which is found in yystate. | +`------------------------------------------------------------*/ +yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + +/*--------------------------------------------------------------------. +| yysetstate -- set current state (the top of the stack) to yystate. | +`--------------------------------------------------------------------*/ +yysetstate: + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); + + if (yyss + yystacksize - 1 <= yyssp) +#if !defined yyoverflow && !defined YYSTACK_RELOCATE + goto yyexhaustedlab; +#else + { + /* Get the current used size of the three stacks, in elements. */ + YYPTRDIFF_T yysize = yyssp - yyss + 1; + +# if defined yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + yy_state_t *yyss1 = yyss; + YYSTYPE *yyvs1 = yyvs; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yystacksize); + yyss = yyss1; + yyvs = yyvs1; + } +# else /* defined YYSTACK_RELOCATE */ + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yy_state_t *yyss1 = yyss; + union yyalloc *yyptr = + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } +#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (); + } + + if (yychar <= YYEOF) + { + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + goto yyerrlab1; + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + /* Discard the shifted token. */ + yychar = YYEMPTY; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: /* TestSpec: setup_list opt_teardown session_list opt_permutation_list */ +#line 63 "specparse.y" + { + parseresult.setupsqls = (char **) (yyvsp[-3].ptr_list).elements; + parseresult.nsetupsqls = (yyvsp[-3].ptr_list).nelements; + parseresult.teardownsql = (yyvsp[-2].str); + parseresult.sessions = (Session **) (yyvsp[-1].ptr_list).elements; + parseresult.nsessions = (yyvsp[-1].ptr_list).nelements; + parseresult.permutations = (Permutation **) (yyvsp[0].ptr_list).elements; + parseresult.npermutations = (yyvsp[0].ptr_list).nelements; + } +#line 1219 "specparse.c" + break; + + case 3: /* setup_list: %empty */ +#line 76 "specparse.y" + { + (yyval.ptr_list).elements = NULL; + (yyval.ptr_list).nelements = 0; + } +#line 1228 "specparse.c" + break; + + case 4: /* setup_list: setup_list setup */ +#line 81 "specparse.y" + { + (yyval.ptr_list).elements = pg_realloc((yyvsp[-1].ptr_list).elements, + ((yyvsp[-1].ptr_list).nelements + 1) * sizeof(void *)); + (yyval.ptr_list).elements[(yyvsp[-1].ptr_list).nelements] = (yyvsp[0].str); + (yyval.ptr_list).nelements = (yyvsp[-1].ptr_list).nelements + 1; + } +#line 1239 "specparse.c" + break; + + case 5: /* opt_setup: %empty */ +#line 90 "specparse.y" + { (yyval.str) = NULL; } +#line 1245 "specparse.c" + break; + + case 6: /* opt_setup: setup */ +#line 91 "specparse.y" + { (yyval.str) = (yyvsp[0].str); } +#line 1251 "specparse.c" + break; + + case 7: /* setup: SETUP sqlblock */ +#line 95 "specparse.y" + { (yyval.str) = (yyvsp[0].str); } +#line 1257 "specparse.c" + break; + + case 8: /* opt_teardown: %empty */ +#line 99 "specparse.y" + { (yyval.str) = NULL; } +#line 1263 "specparse.c" + break; + + case 9: /* opt_teardown: TEARDOWN sqlblock */ +#line 100 "specparse.y" + { (yyval.str) = (yyvsp[0].str); } +#line 1269 "specparse.c" + break; + + case 10: /* session_list: session_list session */ +#line 105 "specparse.y" + { + (yyval.ptr_list).elements = pg_realloc((yyvsp[-1].ptr_list).elements, + ((yyvsp[-1].ptr_list).nelements + 1) * sizeof(void *)); + (yyval.ptr_list).elements[(yyvsp[-1].ptr_list).nelements] = (yyvsp[0].session); + (yyval.ptr_list).nelements = (yyvsp[-1].ptr_list).nelements + 1; + } +#line 1280 "specparse.c" + break; + + case 11: /* session_list: session */ +#line 112 "specparse.y" + { + (yyval.ptr_list).nelements = 1; + (yyval.ptr_list).elements = pg_malloc(sizeof(void *)); + (yyval.ptr_list).elements[0] = (yyvsp[0].session); + } +#line 1290 "specparse.c" + break; + + case 12: /* session: SESSION identifier opt_setup step_list opt_teardown */ +#line 121 "specparse.y" + { + (yyval.session) = pg_malloc(sizeof(Session)); + (yyval.session)->name = (yyvsp[-3].str); + (yyval.session)->setupsql = (yyvsp[-2].str); + (yyval.session)->steps = (Step **) (yyvsp[-1].ptr_list).elements; + (yyval.session)->nsteps = (yyvsp[-1].ptr_list).nelements; + (yyval.session)->teardownsql = (yyvsp[0].str); + } +#line 1303 "specparse.c" + break; + + case 13: /* step_list: step_list step */ +#line 133 "specparse.y" + { + (yyval.ptr_list).elements = pg_realloc((yyvsp[-1].ptr_list).elements, + ((yyvsp[-1].ptr_list).nelements + 1) * sizeof(void *)); + (yyval.ptr_list).elements[(yyvsp[-1].ptr_list).nelements] = (yyvsp[0].step); + (yyval.ptr_list).nelements = (yyvsp[-1].ptr_list).nelements + 1; + } +#line 1314 "specparse.c" + break; + + case 14: /* step_list: step */ +#line 140 "specparse.y" + { + (yyval.ptr_list).nelements = 1; + (yyval.ptr_list).elements = pg_malloc(sizeof(void *)); + (yyval.ptr_list).elements[0] = (yyvsp[0].step); + } +#line 1324 "specparse.c" + break; + + case 15: /* step: STEP identifier sqlblock */ +#line 150 "specparse.y" + { + (yyval.step) = pg_malloc(sizeof(Step)); + (yyval.step)->name = (yyvsp[-1].str); + (yyval.step)->sql = (yyvsp[0].str); + (yyval.step)->session = -1; /* until filled */ + (yyval.step)->used = false; + } +#line 1336 "specparse.c" + break; + + case 16: /* opt_permutation_list: permutation_list */ +#line 162 "specparse.y" + { + (yyval.ptr_list) = (yyvsp[0].ptr_list); + } +#line 1344 "specparse.c" + break; + + case 17: /* opt_permutation_list: %empty */ +#line 166 "specparse.y" + { + (yyval.ptr_list).elements = NULL; + (yyval.ptr_list).nelements = 0; + } +#line 1353 "specparse.c" + break; + + case 18: /* permutation_list: permutation_list permutation */ +#line 173 "specparse.y" + { + (yyval.ptr_list).elements = pg_realloc((yyvsp[-1].ptr_list).elements, + ((yyvsp[-1].ptr_list).nelements + 1) * sizeof(void *)); + (yyval.ptr_list).elements[(yyvsp[-1].ptr_list).nelements] = (yyvsp[0].permutation); + (yyval.ptr_list).nelements = (yyvsp[-1].ptr_list).nelements + 1; + } +#line 1364 "specparse.c" + break; + + case 19: /* permutation_list: permutation */ +#line 180 "specparse.y" + { + (yyval.ptr_list).nelements = 1; + (yyval.ptr_list).elements = pg_malloc(sizeof(void *)); + (yyval.ptr_list).elements[0] = (yyvsp[0].permutation); + } +#line 1374 "specparse.c" + break; + + case 20: /* permutation: PERMUTATION permutation_step_list */ +#line 190 "specparse.y" + { + (yyval.permutation) = pg_malloc(sizeof(Permutation)); + (yyval.permutation)->nsteps = (yyvsp[0].ptr_list).nelements; + (yyval.permutation)->steps = (PermutationStep **) (yyvsp[0].ptr_list).elements; + } +#line 1384 "specparse.c" + break; + + case 21: /* permutation_step_list: permutation_step_list permutation_step */ +#line 199 "specparse.y" + { + (yyval.ptr_list).elements = pg_realloc((yyvsp[-1].ptr_list).elements, + ((yyvsp[-1].ptr_list).nelements + 1) * sizeof(void *)); + (yyval.ptr_list).elements[(yyvsp[-1].ptr_list).nelements] = (yyvsp[0].permutationstep); + (yyval.ptr_list).nelements = (yyvsp[-1].ptr_list).nelements + 1; + } +#line 1395 "specparse.c" + break; + + case 22: /* permutation_step_list: permutation_step */ +#line 206 "specparse.y" + { + (yyval.ptr_list).nelements = 1; + (yyval.ptr_list).elements = pg_malloc(sizeof(void *)); + (yyval.ptr_list).elements[0] = (yyvsp[0].permutationstep); + } +#line 1405 "specparse.c" + break; + + case 23: /* permutation_step: identifier */ +#line 215 "specparse.y" + { + (yyval.permutationstep) = pg_malloc(sizeof(PermutationStep)); + (yyval.permutationstep)->name = (yyvsp[0].str); + (yyval.permutationstep)->blockers = NULL; + (yyval.permutationstep)->nblockers = 0; + (yyval.permutationstep)->step = NULL; + } +#line 1417 "specparse.c" + break; + + case 24: /* permutation_step: identifier '(' blocker_list ')' */ +#line 223 "specparse.y" + { + (yyval.permutationstep) = pg_malloc(sizeof(PermutationStep)); + (yyval.permutationstep)->name = (yyvsp[-3].str); + (yyval.permutationstep)->blockers = (PermutationStepBlocker **) (yyvsp[-1].ptr_list).elements; + (yyval.permutationstep)->nblockers = (yyvsp[-1].ptr_list).nelements; + (yyval.permutationstep)->step = NULL; + } +#line 1429 "specparse.c" + break; + + case 25: /* blocker_list: blocker_list ',' blocker */ +#line 234 "specparse.y" + { + (yyval.ptr_list).elements = pg_realloc((yyvsp[-2].ptr_list).elements, + ((yyvsp[-2].ptr_list).nelements + 1) * sizeof(void *)); + (yyval.ptr_list).elements[(yyvsp[-2].ptr_list).nelements] = (yyvsp[0].blocker); + (yyval.ptr_list).nelements = (yyvsp[-2].ptr_list).nelements + 1; + } +#line 1440 "specparse.c" + break; + + case 26: /* blocker_list: blocker */ +#line 241 "specparse.y" + { + (yyval.ptr_list).nelements = 1; + (yyval.ptr_list).elements = pg_malloc(sizeof(void *)); + (yyval.ptr_list).elements[0] = (yyvsp[0].blocker); + } +#line 1450 "specparse.c" + break; + + case 27: /* blocker: identifier */ +#line 250 "specparse.y" + { + (yyval.blocker) = pg_malloc(sizeof(PermutationStepBlocker)); + (yyval.blocker)->stepname = (yyvsp[0].str); + (yyval.blocker)->blocktype = PSB_OTHER_STEP; + (yyval.blocker)->num_notices = -1; + (yyval.blocker)->step = NULL; + (yyval.blocker)->target_notices = -1; + } +#line 1463 "specparse.c" + break; + + case 28: /* blocker: identifier NOTICES INTEGER */ +#line 259 "specparse.y" + { + (yyval.blocker) = pg_malloc(sizeof(PermutationStepBlocker)); + (yyval.blocker)->stepname = (yyvsp[-2].str); + (yyval.blocker)->blocktype = PSB_NUM_NOTICES; + (yyval.blocker)->num_notices = (yyvsp[0].integer); + (yyval.blocker)->step = NULL; + (yyval.blocker)->target_notices = -1; + } +#line 1476 "specparse.c" + break; + + case 29: /* blocker: '*' */ +#line 268 "specparse.y" + { + (yyval.blocker) = pg_malloc(sizeof(PermutationStepBlocker)); + (yyval.blocker)->stepname = NULL; + (yyval.blocker)->blocktype = PSB_ONCE; + (yyval.blocker)->num_notices = -1; + (yyval.blocker)->step = NULL; + (yyval.blocker)->target_notices = -1; + } +#line 1489 "specparse.c" + break; + + +#line 1493 "specparse.c" + + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + + *++yyvsp = yyval; + + /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + { + const int yylhs = yyr1[yyn] - YYNTOKENS; + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); + } + + goto yynewstate; + + +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; + yyerror (YY_("syntax error")); + } + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + /* Pacify compilers when the user code never invokes YYERROR and the + label yyerrorlab therefore never appears in user code. */ + if (0) + YYERROR; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + /* Pop stack until we find a state that shifts the error token. */ + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + YY_ACCESSING_SYMBOL (yystate), yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + + +#if !defined yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + goto yyreturn; +#endif + + +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + + return yyresult; +} + +#line 278 "specparse.y" + + +#include "specscanner.c" diff --git a/src/test/isolation/specparse.y b/src/test/isolation/specparse.y new file mode 100644 index 0000000..c25aa1a --- /dev/null +++ b/src/test/isolation/specparse.y @@ -0,0 +1,280 @@ +%{ +/*------------------------------------------------------------------------- + * + * specparse.y + * bison grammar for the isolation test file format + * + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + *------------------------------------------------------------------------- + */ + +#include "postgres_fe.h" + +#include "isolationtester.h" + + +TestSpec parseresult; /* result of parsing is left here */ + +%} + +%expect 0 +%name-prefix="spec_yy" + +%union +{ + char *str; + int integer; + Session *session; + Step *step; + Permutation *permutation; + PermutationStep *permutationstep; + PermutationStepBlocker *blocker; + struct + { + void **elements; + int nelements; + } ptr_list; +} + +%type <ptr_list> setup_list +%type <str> opt_setup opt_teardown +%type <str> setup +%type <ptr_list> step_list session_list permutation_list opt_permutation_list +%type <ptr_list> permutation_step_list blocker_list +%type <session> session +%type <step> step +%type <permutation> permutation +%type <permutationstep> permutation_step +%type <blocker> blocker + +%token <str> sqlblock identifier +%token <integer> INTEGER +%token NOTICES PERMUTATION SESSION SETUP STEP TEARDOWN TEST + +%% + +TestSpec: + setup_list + opt_teardown + session_list + opt_permutation_list + { + parseresult.setupsqls = (char **) $1.elements; + parseresult.nsetupsqls = $1.nelements; + parseresult.teardownsql = $2; + parseresult.sessions = (Session **) $3.elements; + parseresult.nsessions = $3.nelements; + parseresult.permutations = (Permutation **) $4.elements; + parseresult.npermutations = $4.nelements; + } + ; + +setup_list: + /* EMPTY */ + { + $$.elements = NULL; + $$.nelements = 0; + } + | setup_list setup + { + $$.elements = pg_realloc($1.elements, + ($1.nelements + 1) * sizeof(void *)); + $$.elements[$1.nelements] = $2; + $$.nelements = $1.nelements + 1; + } + ; + +opt_setup: + /* EMPTY */ { $$ = NULL; } + | setup { $$ = $1; } + ; + +setup: + SETUP sqlblock { $$ = $2; } + ; + +opt_teardown: + /* EMPTY */ { $$ = NULL; } + | TEARDOWN sqlblock { $$ = $2; } + ; + +session_list: + session_list session + { + $$.elements = pg_realloc($1.elements, + ($1.nelements + 1) * sizeof(void *)); + $$.elements[$1.nelements] = $2; + $$.nelements = $1.nelements + 1; + } + | session + { + $$.nelements = 1; + $$.elements = pg_malloc(sizeof(void *)); + $$.elements[0] = $1; + } + ; + +session: + SESSION identifier opt_setup step_list opt_teardown + { + $$ = pg_malloc(sizeof(Session)); + $$->name = $2; + $$->setupsql = $3; + $$->steps = (Step **) $4.elements; + $$->nsteps = $4.nelements; + $$->teardownsql = $5; + } + ; + +step_list: + step_list step + { + $$.elements = pg_realloc($1.elements, + ($1.nelements + 1) * sizeof(void *)); + $$.elements[$1.nelements] = $2; + $$.nelements = $1.nelements + 1; + } + | step + { + $$.nelements = 1; + $$.elements = pg_malloc(sizeof(void *)); + $$.elements[0] = $1; + } + ; + + +step: + STEP identifier sqlblock + { + $$ = pg_malloc(sizeof(Step)); + $$->name = $2; + $$->sql = $3; + $$->session = -1; /* until filled */ + $$->used = false; + } + ; + + +opt_permutation_list: + permutation_list + { + $$ = $1; + } + | /* EMPTY */ + { + $$.elements = NULL; + $$.nelements = 0; + } + +permutation_list: + permutation_list permutation + { + $$.elements = pg_realloc($1.elements, + ($1.nelements + 1) * sizeof(void *)); + $$.elements[$1.nelements] = $2; + $$.nelements = $1.nelements + 1; + } + | permutation + { + $$.nelements = 1; + $$.elements = pg_malloc(sizeof(void *)); + $$.elements[0] = $1; + } + ; + + +permutation: + PERMUTATION permutation_step_list + { + $$ = pg_malloc(sizeof(Permutation)); + $$->nsteps = $2.nelements; + $$->steps = (PermutationStep **) $2.elements; + } + ; + +permutation_step_list: + permutation_step_list permutation_step + { + $$.elements = pg_realloc($1.elements, + ($1.nelements + 1) * sizeof(void *)); + $$.elements[$1.nelements] = $2; + $$.nelements = $1.nelements + 1; + } + | permutation_step + { + $$.nelements = 1; + $$.elements = pg_malloc(sizeof(void *)); + $$.elements[0] = $1; + } + ; + +permutation_step: + identifier + { + $$ = pg_malloc(sizeof(PermutationStep)); + $$->name = $1; + $$->blockers = NULL; + $$->nblockers = 0; + $$->step = NULL; + } + | identifier '(' blocker_list ')' + { + $$ = pg_malloc(sizeof(PermutationStep)); + $$->name = $1; + $$->blockers = (PermutationStepBlocker **) $3.elements; + $$->nblockers = $3.nelements; + $$->step = NULL; + } + ; + +blocker_list: + blocker_list ',' blocker + { + $$.elements = pg_realloc($1.elements, + ($1.nelements + 1) * sizeof(void *)); + $$.elements[$1.nelements] = $3; + $$.nelements = $1.nelements + 1; + } + | blocker + { + $$.nelements = 1; + $$.elements = pg_malloc(sizeof(void *)); + $$.elements[0] = $1; + } + ; + +blocker: + identifier + { + $$ = pg_malloc(sizeof(PermutationStepBlocker)); + $$->stepname = $1; + $$->blocktype = PSB_OTHER_STEP; + $$->num_notices = -1; + $$->step = NULL; + $$->target_notices = -1; + } + | identifier NOTICES INTEGER + { + $$ = pg_malloc(sizeof(PermutationStepBlocker)); + $$->stepname = $1; + $$->blocktype = PSB_NUM_NOTICES; + $$->num_notices = $3; + $$->step = NULL; + $$->target_notices = -1; + } + | '*' + { + $$ = pg_malloc(sizeof(PermutationStepBlocker)); + $$->stepname = NULL; + $$->blocktype = PSB_ONCE; + $$->num_notices = -1; + $$->step = NULL; + $$->target_notices = -1; + } + ; + +%% + +#include "specscanner.c" diff --git a/src/test/isolation/specs/aborted-keyrevoke.spec b/src/test/isolation/specs/aborted-keyrevoke.spec new file mode 100644 index 0000000..4f6f902 --- /dev/null +++ b/src/test/isolation/specs/aborted-keyrevoke.spec @@ -0,0 +1,46 @@ +# When a tuple that has been updated is locked, the locking command +# should traverse the update chain; thus, a DELETE should not be able +# to proceed until the lock has been released. + +setup +{ + CREATE TABLE foo ( + key int PRIMARY KEY, + value int + ); + + INSERT INTO foo VALUES (1, 1); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +setup { BEGIN; } +step s1s { SAVEPOINT f; } +step s1u { UPDATE foo SET key = 2; } # obtain KEY REVOKE +step s1r { ROLLBACK TO f; } # lose KEY REVOKE +step s1l { SELECT * FROM foo FOR KEY SHARE; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN; } +step s2l { SELECT * FROM foo FOR KEY SHARE; } +step s2c { COMMIT; } + +permutation s1s s1u s1r s1l s1c s2l s2c +permutation s1s s1u s1r s1l s2l s1c s2c +permutation s1s s1u s1r s1l s2l s2c s1c +permutation s1s s1u s1r s2l s1l s1c s2c +permutation s1s s1u s1r s2l s1l s2c s1c +permutation s1s s1u s1r s2l s2c s1l s1c +permutation s1s s1u s2l s1r s1l s1c s2c +permutation s1s s1u s2l s1r s1l s2c s1c +permutation s1s s1u s2l s1r s2c s1l s1c +permutation s1s s2l s1u s2c s1r s1l s1c +permutation s1s s2l s2c s1u s1r s1l s1c +permutation s2l s1s s1u s2c s1r s1l s1c +permutation s2l s1s s2c s1u s1r s1l s1c +permutation s2l s2c s1s s1u s1r s1l s1c diff --git a/src/test/isolation/specs/alter-table-1.spec b/src/test/isolation/specs/alter-table-1.spec new file mode 100644 index 0000000..dfd0ce7 --- /dev/null +++ b/src/test/isolation/specs/alter-table-1.spec @@ -0,0 +1,170 @@ +# ALTER TABLE - Add and Validate constraint with concurrent writes +# +# VALIDATE allows a minimum of ShareUpdateExclusiveLock +# so we mix reads with it to see what works or waits + +setup +{ + CREATE TABLE a (i int PRIMARY KEY); + CREATE TABLE b (a_id int); + INSERT INTO a VALUES (0), (1), (2), (3); + INSERT INTO b SELECT generate_series(1,1000) % 4; +} + +teardown +{ + DROP TABLE a, b; +} + +session s1 +step s1 { BEGIN; } +step at1 { ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; } +step sc1 { COMMIT; } +step s2 { BEGIN; } +step at2 { ALTER TABLE b VALIDATE CONSTRAINT bfk; } +step sc2 { COMMIT; } + +session s2 +setup { BEGIN; } +step rx1 { SELECT * FROM b WHERE a_id = 1 LIMIT 1; } +step wx { INSERT INTO b VALUES (0); } +step rx3 { SELECT * FROM b WHERE a_id = 3 LIMIT 3; } +step c2 { COMMIT; } + +permutation s1 at1 sc1 s2 at2 sc2 rx1 wx rx3 c2 +permutation s1 at1 sc1 s2 at2 rx1 sc2 wx rx3 c2 +permutation s1 at1 sc1 s2 at2 rx1 wx sc2 rx3 c2 +permutation s1 at1 sc1 s2 at2 rx1 wx rx3 sc2 c2 +permutation s1 at1 sc1 s2 at2 rx1 wx rx3 c2 sc2 +permutation s1 at1 sc1 s2 rx1 at2 sc2 wx rx3 c2 +permutation s1 at1 sc1 s2 rx1 at2 wx sc2 rx3 c2 +permutation s1 at1 sc1 s2 rx1 at2 wx rx3 sc2 c2 +permutation s1 at1 sc1 s2 rx1 at2 wx rx3 c2 sc2 +permutation s1 at1 sc1 s2 rx1 wx at2 sc2 rx3 c2 +permutation s1 at1 sc1 s2 rx1 wx at2 rx3 sc2 c2 +permutation s1 at1 sc1 s2 rx1 wx at2 rx3 c2 sc2 +permutation s1 at1 sc1 s2 rx1 wx rx3 at2 sc2 c2 +permutation s1 at1 sc1 s2 rx1 wx rx3 at2 c2 sc2 +permutation s1 at1 sc1 s2 rx1 wx rx3 c2 at2 sc2 +permutation s1 at1 sc1 rx1 s2 at2 sc2 wx rx3 c2 +permutation s1 at1 sc1 rx1 s2 at2 wx sc2 rx3 c2 +permutation s1 at1 sc1 rx1 s2 at2 wx rx3 sc2 c2 +permutation s1 at1 sc1 rx1 s2 at2 wx rx3 c2 sc2 +permutation s1 at1 sc1 rx1 s2 wx at2 sc2 rx3 c2 +permutation s1 at1 sc1 rx1 s2 wx at2 rx3 sc2 c2 +permutation s1 at1 sc1 rx1 s2 wx at2 rx3 c2 sc2 +permutation s1 at1 sc1 rx1 s2 wx rx3 at2 sc2 c2 +permutation s1 at1 sc1 rx1 s2 wx rx3 at2 c2 sc2 +permutation s1 at1 sc1 rx1 s2 wx rx3 c2 at2 sc2 +permutation s1 at1 sc1 rx1 wx s2 at2 sc2 rx3 c2 +permutation s1 at1 sc1 rx1 wx s2 at2 rx3 sc2 c2 +permutation s1 at1 sc1 rx1 wx s2 at2 rx3 c2 sc2 +permutation s1 at1 sc1 rx1 wx s2 rx3 at2 sc2 c2 +permutation s1 at1 sc1 rx1 wx s2 rx3 at2 c2 sc2 +permutation s1 at1 sc1 rx1 wx s2 rx3 c2 at2 sc2 +permutation s1 at1 sc1 rx1 wx rx3 s2 at2 sc2 c2 +permutation s1 at1 sc1 rx1 wx rx3 s2 at2 c2 sc2 +permutation s1 at1 sc1 rx1 wx rx3 s2 c2 at2 sc2 +permutation s1 at1 sc1 rx1 wx rx3 c2 s2 at2 sc2 +permutation s1 at1 rx1 sc1 s2 at2 sc2 wx rx3 c2 +permutation s1 at1 rx1 sc1 s2 at2 wx sc2 rx3 c2 +permutation s1 at1 rx1 sc1 s2 at2 wx rx3 sc2 c2 +permutation s1 at1 rx1 sc1 s2 at2 wx rx3 c2 sc2 +permutation s1 at1 rx1 sc1 s2 wx at2 sc2 rx3 c2 +permutation s1 at1 rx1 sc1 s2 wx at2 rx3 sc2 c2 +permutation s1 at1 rx1 sc1 s2 wx at2 rx3 c2 sc2 +permutation s1 at1 rx1 sc1 s2 wx rx3 at2 sc2 c2 +permutation s1 at1 rx1 sc1 s2 wx rx3 at2 c2 sc2 +permutation s1 at1 rx1 sc1 s2 wx rx3 c2 at2 sc2 +permutation s1 at1 rx1 sc1 wx s2 at2 sc2 rx3 c2 +permutation s1 at1 rx1 sc1 wx s2 at2 rx3 sc2 c2 +permutation s1 at1 rx1 sc1 wx s2 at2 rx3 c2 sc2 +permutation s1 at1 rx1 sc1 wx s2 rx3 at2 sc2 c2 +permutation s1 at1 rx1 sc1 wx s2 rx3 at2 c2 sc2 +permutation s1 at1 rx1 sc1 wx s2 rx3 c2 at2 sc2 +permutation s1 at1 rx1 sc1 wx rx3 s2 at2 sc2 c2 +permutation s1 at1 rx1 sc1 wx rx3 s2 at2 c2 sc2 +permutation s1 at1 rx1 sc1 wx rx3 s2 c2 at2 sc2 +permutation s1 at1 rx1 sc1 wx rx3 c2 s2 at2 sc2 +permutation s1 at1 rx1 wx sc1 s2 at2 sc2 rx3 c2 +permutation s1 at1 rx1 wx sc1 s2 at2 rx3 sc2 c2 +permutation s1 at1 rx1 wx sc1 s2 at2 rx3 c2 sc2 +permutation s1 at1 rx1 wx sc1 s2 rx3 at2 sc2 c2 +permutation s1 at1 rx1 wx sc1 s2 rx3 at2 c2 sc2 +permutation s1 at1 rx1 wx sc1 s2 rx3 c2 at2 sc2 +permutation s1 at1 rx1 wx sc1 rx3 s2 at2 sc2 c2 +permutation s1 at1 rx1 wx sc1 rx3 s2 at2 c2 sc2 +permutation s1 at1 rx1 wx sc1 rx3 s2 c2 at2 sc2 +permutation s1 at1 rx1 wx sc1 rx3 c2 s2 at2 sc2 +permutation s1 rx1 at1 sc1 s2 at2 sc2 wx rx3 c2 +permutation s1 rx1 at1 sc1 s2 at2 wx sc2 rx3 c2 +permutation s1 rx1 at1 sc1 s2 at2 wx rx3 sc2 c2 +permutation s1 rx1 at1 sc1 s2 at2 wx rx3 c2 sc2 +permutation s1 rx1 at1 sc1 s2 wx at2 sc2 rx3 c2 +permutation s1 rx1 at1 sc1 s2 wx at2 rx3 sc2 c2 +permutation s1 rx1 at1 sc1 s2 wx at2 rx3 c2 sc2 +permutation s1 rx1 at1 sc1 s2 wx rx3 at2 sc2 c2 +permutation s1 rx1 at1 sc1 s2 wx rx3 at2 c2 sc2 +permutation s1 rx1 at1 sc1 s2 wx rx3 c2 at2 sc2 +permutation s1 rx1 at1 sc1 wx s2 at2 sc2 rx3 c2 +permutation s1 rx1 at1 sc1 wx s2 at2 rx3 sc2 c2 +permutation s1 rx1 at1 sc1 wx s2 at2 rx3 c2 sc2 +permutation s1 rx1 at1 sc1 wx s2 rx3 at2 sc2 c2 +permutation s1 rx1 at1 sc1 wx s2 rx3 at2 c2 sc2 +permutation s1 rx1 at1 sc1 wx s2 rx3 c2 at2 sc2 +permutation s1 rx1 at1 sc1 wx rx3 s2 at2 sc2 c2 +permutation s1 rx1 at1 sc1 wx rx3 s2 at2 c2 sc2 +permutation s1 rx1 at1 sc1 wx rx3 s2 c2 at2 sc2 +permutation s1 rx1 at1 sc1 wx rx3 c2 s2 at2 sc2 +permutation s1 rx1 at1 wx sc1 s2 at2 sc2 rx3 c2 +permutation s1 rx1 at1 wx sc1 s2 at2 rx3 sc2 c2 +permutation s1 rx1 at1 wx sc1 s2 at2 rx3 c2 sc2 +permutation s1 rx1 at1 wx sc1 s2 rx3 at2 sc2 c2 +permutation s1 rx1 at1 wx sc1 s2 rx3 at2 c2 sc2 +permutation s1 rx1 at1 wx sc1 s2 rx3 c2 at2 sc2 +permutation s1 rx1 at1 wx sc1 rx3 s2 at2 sc2 c2 +permutation s1 rx1 at1 wx sc1 rx3 s2 at2 c2 sc2 +permutation s1 rx1 at1 wx sc1 rx3 s2 c2 at2 sc2 +permutation s1 rx1 at1 wx sc1 rx3 c2 s2 at2 sc2 +permutation s1 rx1 wx at1 rx3 c2 sc1 s2 at2 sc2 +permutation s1 rx1 wx rx3 at1 c2 sc1 s2 at2 sc2 +permutation s1 rx1 wx rx3 c2 at1 sc1 s2 at2 sc2 +permutation rx1 s1 at1 sc1 s2 at2 sc2 wx rx3 c2 +permutation rx1 s1 at1 sc1 s2 at2 wx sc2 rx3 c2 +permutation rx1 s1 at1 sc1 s2 at2 wx rx3 sc2 c2 +permutation rx1 s1 at1 sc1 s2 at2 wx rx3 c2 sc2 +permutation rx1 s1 at1 sc1 s2 wx at2 sc2 rx3 c2 +permutation rx1 s1 at1 sc1 s2 wx at2 rx3 sc2 c2 +permutation rx1 s1 at1 sc1 s2 wx at2 rx3 c2 sc2 +permutation rx1 s1 at1 sc1 s2 wx rx3 at2 sc2 c2 +permutation rx1 s1 at1 sc1 s2 wx rx3 at2 c2 sc2 +permutation rx1 s1 at1 sc1 s2 wx rx3 c2 at2 sc2 +permutation rx1 s1 at1 sc1 wx s2 at2 sc2 rx3 c2 +permutation rx1 s1 at1 sc1 wx s2 at2 rx3 sc2 c2 +permutation rx1 s1 at1 sc1 wx s2 at2 rx3 c2 sc2 +permutation rx1 s1 at1 sc1 wx s2 rx3 at2 sc2 c2 +permutation rx1 s1 at1 sc1 wx s2 rx3 at2 c2 sc2 +permutation rx1 s1 at1 sc1 wx s2 rx3 c2 at2 sc2 +permutation rx1 s1 at1 sc1 wx rx3 s2 at2 sc2 c2 +permutation rx1 s1 at1 sc1 wx rx3 s2 at2 c2 sc2 +permutation rx1 s1 at1 sc1 wx rx3 s2 c2 at2 sc2 +permutation rx1 s1 at1 sc1 wx rx3 c2 s2 at2 sc2 +permutation rx1 s1 at1 wx sc1 s2 at2 sc2 rx3 c2 +permutation rx1 s1 at1 wx sc1 s2 at2 rx3 sc2 c2 +permutation rx1 s1 at1 wx sc1 s2 at2 rx3 c2 sc2 +permutation rx1 s1 at1 wx sc1 s2 rx3 at2 sc2 c2 +permutation rx1 s1 at1 wx sc1 s2 rx3 at2 c2 sc2 +permutation rx1 s1 at1 wx sc1 s2 rx3 c2 at2 sc2 +permutation rx1 s1 at1 wx sc1 rx3 s2 at2 sc2 c2 +permutation rx1 s1 at1 wx sc1 rx3 s2 at2 c2 sc2 +permutation rx1 s1 at1 wx sc1 rx3 s2 c2 at2 sc2 +permutation rx1 s1 at1 wx sc1 rx3 c2 s2 at2 sc2 +permutation rx1 s1 wx at1 rx3 c2 sc1 s2 at2 sc2 +permutation rx1 s1 wx rx3 at1 c2 sc1 s2 at2 sc2 +permutation rx1 s1 wx rx3 c2 at1 sc1 s2 at2 sc2 +permutation rx1 wx s1 at1 rx3 c2 sc1 s2 at2 sc2 +permutation rx1 wx s1 rx3 at1 c2 sc1 s2 at2 sc2 +permutation rx1 wx s1 rx3 c2 at1 sc1 s2 at2 sc2 +permutation rx1 wx rx3 s1 at1 c2 sc1 s2 at2 sc2 +permutation rx1 wx rx3 s1 c2 at1 sc1 s2 at2 sc2 +permutation rx1 wx rx3 c2 s1 at1 sc1 s2 at2 sc2 diff --git a/src/test/isolation/specs/alter-table-2.spec b/src/test/isolation/specs/alter-table-2.spec new file mode 100644 index 0000000..a3e3131 --- /dev/null +++ b/src/test/isolation/specs/alter-table-2.spec @@ -0,0 +1,79 @@ +# ALTER TABLE - Add foreign keys with concurrent reads +# +# ADD CONSTRAINT uses ShareRowExclusiveLock so we mix writes with it +# to see what works or waits. + +setup +{ + CREATE TABLE a (i int PRIMARY KEY); + CREATE TABLE b (a_id int); + INSERT INTO a VALUES (0), (1), (2), (3); + INSERT INTO b SELECT generate_series(1,1000) % 4; +} + +teardown +{ + DROP TABLE a, b; +} + +session s1 +step s1a { BEGIN; } +step s1b { ALTER TABLE b ADD CONSTRAINT bfk FOREIGN KEY (a_id) REFERENCES a (i) NOT VALID; } +step s1c { COMMIT; } + +session s2 +step s2a { BEGIN; } +step s2b { SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; } +step s2c { SELECT * FROM b WHERE a_id = 3 LIMIT 1 FOR UPDATE; } +step s2d { INSERT INTO b VALUES (0); } +step s2e { INSERT INTO a VALUES (4); } +step s2f { COMMIT; } + +permutation s1a s1b s1c s2a s2b s2c s2d s2e s2f +permutation s1a s1b s2a s1c s2b s2c s2d s2e s2f +permutation s1a s1b s2a s2b s1c s2c s2d s2e s2f +permutation s1a s1b s2a s2b s2c s1c s2d s2e s2f +permutation s1a s1b s2a s2b s2c s2d s1c s2e s2f +permutation s1a s2a s1b s1c s2b s2c s2d s2e s2f +permutation s1a s2a s1b s2b s1c s2c s2d s2e s2f +permutation s1a s2a s1b s2b s2c s1c s2d s2e s2f +permutation s1a s2a s1b s2b s2c s2d s1c s2e s2f +permutation s1a s2a s2b s1b s1c s2c s2d s2e s2f +permutation s1a s2a s2b s1b s2c s1c s2d s2e s2f +permutation s1a s2a s2b s1b s2c s2d s1c s2e s2f +permutation s1a s2a s2b s2c s1b s1c s2d s2e s2f +permutation s1a s2a s2b s2c s1b s2d s1c s2e s2f +permutation s1a s2a s2b s2c s2d s1b s2e s2f s1c +permutation s1a s2a s2b s2c s2d s2e s1b s2f s1c +permutation s1a s2a s2b s2c s2d s2e s2f s1b s1c +permutation s2a s1a s1b s1c s2b s2c s2d s2e s2f +permutation s2a s1a s1b s2b s1c s2c s2d s2e s2f +permutation s2a s1a s1b s2b s2c s1c s2d s2e s2f +permutation s2a s1a s1b s2b s2c s2d s1c s2e s2f +permutation s2a s1a s2b s1b s1c s2c s2d s2e s2f +permutation s2a s1a s2b s1b s2c s1c s2d s2e s2f +permutation s2a s1a s2b s1b s2c s2d s1c s2e s2f +permutation s2a s1a s2b s2c s1b s1c s2d s2e s2f +permutation s2a s1a s2b s2c s1b s2d s1c s2e s2f +permutation s2a s1a s2b s2c s2d s1b s2e s2f s1c +permutation s2a s1a s2b s2c s2d s2e s1b s2f s1c +permutation s2a s1a s2b s2c s2d s2e s2f s1b s1c +permutation s2a s2b s1a s1b s1c s2c s2d s2e s2f +permutation s2a s2b s1a s1b s2c s1c s2d s2e s2f +permutation s2a s2b s1a s1b s2c s2d s1c s2e s2f +permutation s2a s2b s1a s2c s1b s1c s2d s2e s2f +permutation s2a s2b s1a s2c s1b s2d s1c s2e s2f +permutation s2a s2b s1a s2c s2d s1b s2e s2f s1c +permutation s2a s2b s1a s2c s2d s2e s1b s2f s1c +permutation s2a s2b s1a s2c s2d s2e s2f s1b s1c +permutation s2a s2b s2c s1a s1b s1c s2d s2e s2f +permutation s2a s2b s2c s1a s1b s2d s1c s2e s2f +permutation s2a s2b s2c s1a s2d s1b s2e s2f s1c +permutation s2a s2b s2c s1a s2d s2e s1b s2f s1c +permutation s2a s2b s2c s1a s2d s2e s2f s1b s1c +permutation s2a s2b s2c s2d s1a s1b s2e s2f s1c +permutation s2a s2b s2c s2d s1a s2e s1b s2f s1c +permutation s2a s2b s2c s2d s1a s2e s2f s1b s1c +permutation s2a s2b s2c s2d s2e s1a s1b s2f s1c +permutation s2a s2b s2c s2d s2e s1a s2f s1b s1c +permutation s2a s2b s2c s2d s2e s2f s1a s1b s1c diff --git a/src/test/isolation/specs/alter-table-3.spec b/src/test/isolation/specs/alter-table-3.spec new file mode 100644 index 0000000..f70d9c0 --- /dev/null +++ b/src/test/isolation/specs/alter-table-3.spec @@ -0,0 +1,79 @@ +# ALTER TABLE - Enable and disable triggers with concurrent reads +# +# ENABLE/DISABLE TRIGGER uses ShareRowExclusiveLock so we mix writes with +# it to see what works or waits. + +setup +{ + CREATE TABLE a (i int PRIMARY KEY); + INSERT INTO a VALUES (0), (1), (2), (3); + CREATE FUNCTION f() RETURNS TRIGGER LANGUAGE plpgsql AS 'BEGIN RETURN NULL; END;'; + CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); +} + +teardown +{ + DROP TABLE a; + DROP FUNCTION f(); +} + +session s1 +step s1a { BEGIN; } +step s1b { ALTER TABLE a DISABLE TRIGGER t; } +step s1c { ALTER TABLE a ENABLE TRIGGER t; } +step s1d { COMMIT; } + +session s2 +step s2a { BEGIN; } +step s2b { SELECT * FROM a WHERE i = 1 LIMIT 1 FOR UPDATE; } +step s2c { INSERT INTO a VALUES (0); } +step s2d { COMMIT; } + +permutation s1a s1b s1c s1d s2a s2b s2c s2d +permutation s1a s1b s1c s2a s1d s2b s2c s2d +permutation s1a s1b s1c s2a s2b s1d s2c s2d +permutation s1a s1b s1c s2a s2b s2c s1d s2d +permutation s1a s1b s2a s1c s1d s2b s2c s2d +permutation s1a s1b s2a s1c s2b s1d s2c s2d +permutation s1a s1b s2a s1c s2b s2c s1d s2d +permutation s1a s1b s2a s2b s1c s1d s2c s2d +permutation s1a s1b s2a s2b s1c s2c s1d s2d +permutation s1a s1b s2a s2b s2c s1c s1d s2d +permutation s1a s2a s1b s1c s1d s2b s2c s2d +permutation s1a s2a s1b s1c s2b s1d s2c s2d +permutation s1a s2a s1b s1c s2b s2c s1d s2d +permutation s1a s2a s1b s2b s1c s1d s2c s2d +permutation s1a s2a s1b s2b s1c s2c s1d s2d +permutation s1a s2a s1b s2b s2c s1c s1d s2d +permutation s1a s2a s2b s1b s1c s1d s2c s2d +permutation s1a s2a s2b s1b s1c s2c s1d s2d +permutation s1a s2a s2b s1b s2c s1c s1d s2d +permutation s1a s2a s2b s2c s1b s1c s1d s2d +permutation s1a s2a s2b s2c s1b s1c s2d s1d +permutation s1a s2a s2b s2c s1b s2d s1c s1d +permutation s1a s2a s2b s2c s2d s1b s1c s1d +permutation s2a s1a s1b s1c s1d s2b s2c s2d +permutation s2a s1a s1b s1c s2b s1d s2c s2d +permutation s2a s1a s1b s1c s2b s2c s1d s2d +permutation s2a s1a s1b s2b s1c s1d s2c s2d +permutation s2a s1a s1b s2b s1c s2c s1d s2d +permutation s2a s1a s1b s2b s2c s1c s1d s2d +permutation s2a s1a s2b s1b s1c s1d s2c s2d +permutation s2a s1a s2b s1b s1c s2c s1d s2d +permutation s2a s1a s2b s1b s2c s1c s1d s2d +permutation s2a s1a s2b s2c s1b s1c s1d s2d +permutation s2a s1a s2b s2c s1b s1c s2d s1d +permutation s2a s1a s2b s2c s1b s2d s1c s1d +permutation s2a s1a s2b s2c s2d s1b s1c s1d +permutation s2a s2b s1a s1b s1c s1d s2c s2d +permutation s2a s2b s1a s1b s1c s2c s1d s2d +permutation s2a s2b s1a s1b s2c s1c s1d s2d +permutation s2a s2b s1a s2c s1b s1c s1d s2d +permutation s2a s2b s1a s2c s1b s1c s2d s1d +permutation s2a s2b s1a s2c s1b s2d s1c s1d +permutation s2a s2b s1a s2c s2d s1b s1c s1d +permutation s2a s2b s2c s1a s1b s1c s1d s2d +permutation s2a s2b s2c s1a s1b s1c s2d s1d +permutation s2a s2b s2c s1a s1b s2d s1c s1d +permutation s2a s2b s2c s1a s2d s1b s1c s1d +permutation s2a s2b s2c s2d s1a s1b s1c s1d diff --git a/src/test/isolation/specs/alter-table-4.spec b/src/test/isolation/specs/alter-table-4.spec new file mode 100644 index 0000000..f143b79 --- /dev/null +++ b/src/test/isolation/specs/alter-table-4.spec @@ -0,0 +1,37 @@ +# ALTER TABLE - Add and remove inheritance with concurrent reads + +setup +{ + CREATE TABLE p (a integer); + INSERT INTO p VALUES(1); + CREATE TABLE c1 () INHERITS (p); + INSERT INTO c1 VALUES(10); + CREATE TABLE c2 (a integer); + INSERT INTO c2 VALUES(100); +} + +teardown +{ + DROP TABLE IF EXISTS c1, c2, p; +} + +session s1 +step s1b { BEGIN; } +step s1delc1 { ALTER TABLE c1 NO INHERIT p; } +step s1modc1a { ALTER TABLE c1 ALTER COLUMN a TYPE float; } +step s1addc2 { ALTER TABLE c2 INHERIT p; } +step s1dropc1 { DROP TABLE c1; } +step s1c { COMMIT; } + +session s2 +step s2sel { SELECT SUM(a) FROM p; } + +# NO INHERIT will not be visible to concurrent select, +# since we identify children before locking them +permutation s1b s1delc1 s2sel s1c s2sel +# adding inheritance likewise is not seen if s1 commits after s2 locks p +permutation s1b s1delc1 s1addc2 s2sel s1c s2sel +# but we do cope with DROP on a child table +permutation s1b s1dropc1 s2sel s1c s2sel +# this case currently results in an error; doesn't seem worth preventing +permutation s1b s1delc1 s1modc1a s2sel s1c s2sel diff --git a/src/test/isolation/specs/async-notify.spec b/src/test/isolation/specs/async-notify.spec new file mode 100644 index 0000000..0b8cfd9 --- /dev/null +++ b/src/test/isolation/specs/async-notify.spec @@ -0,0 +1,84 @@ +# Tests for LISTEN/NOTIFY + +# Most of these tests use only the "notifier" session and hence exercise only +# self-notifies, which are convenient because they minimize timing concerns. +# Note we assume that each step is delivered to the backend as a single Query +# message so it will run as one transaction. + +session notifier +step listenc { LISTEN c1; LISTEN c2; } +step notify1 { NOTIFY c1; } +step notify2 { NOTIFY c2, 'payload'; } +step notify3 { NOTIFY c3, 'payload3'; } # not listening to c3 +step notifyf { SELECT pg_notify('c2', NULL); } +step notifyd1 { NOTIFY c2, 'payload'; NOTIFY c1; NOTIFY "c2", 'payload'; } +step notifyd2 { NOTIFY c1; NOTIFY c1; NOTIFY c1, 'p1'; NOTIFY c1, 'p2'; } +step notifys1 { + BEGIN; + NOTIFY c1, 'payload'; NOTIFY "c2", 'payload'; + NOTIFY c1, 'payload'; NOTIFY "c2", 'payload'; + SAVEPOINT s1; + NOTIFY c1, 'payload'; NOTIFY "c2", 'payload'; + NOTIFY c1, 'payloads'; NOTIFY "c2", 'payloads'; + NOTIFY c1, 'payload'; NOTIFY "c2", 'payload'; + NOTIFY c1, 'payloads'; NOTIFY "c2", 'payloads'; + RELEASE SAVEPOINT s1; + SAVEPOINT s2; + NOTIFY c1, 'rpayload'; NOTIFY "c2", 'rpayload'; + NOTIFY c1, 'rpayloads'; NOTIFY "c2", 'rpayloads'; + NOTIFY c1, 'rpayload'; NOTIFY "c2", 'rpayload'; + NOTIFY c1, 'rpayloads'; NOTIFY "c2", 'rpayloads'; + ROLLBACK TO SAVEPOINT s2; + COMMIT; +} +step usage { SELECT pg_notification_queue_usage() > 0 AS nonzero; } +step bignotify { SELECT count(pg_notify('c1', s::text)) FROM generate_series(1, 1000) s; } +teardown { UNLISTEN *; } + +# The listener session is used for cross-backend notify checks. + +session listener +step llisten { LISTEN c1; LISTEN c2; } +step lcheck { SELECT 1 AS x; } +step lbegin { BEGIN; } +step lbegins { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step lcommit { COMMIT; } +teardown { UNLISTEN *; } + +# In some tests we need a second listener, just to block the queue. + +session listener2 +step l2listen { LISTEN c1; } +step l2begin { BEGIN; } +step l2commit { COMMIT; } +step l2stop { UNLISTEN *; } + + +# Trivial cases. +permutation listenc notify1 notify2 notify3 notifyf + +# Check simple and less-simple deduplication. +permutation listenc notifyd1 notifyd2 notifys1 + +# Cross-backend notification delivery. We use a "select 1" to force the +# listener session to check for notifies. In principle we could just wait +# for delivery, but that would require extra support in isolationtester +# and might have portability-of-timing issues. +permutation llisten notify1 notify2 notify3 notifyf lcheck + +# Again, with local delivery too. +permutation listenc llisten notify1 notify2 notify3 notifyf lcheck + +# Check for bug when initial listen is only action in a serializable xact, +# and notify queue is not empty +permutation l2listen l2begin notify1 lbegins llisten lcommit l2commit l2stop + +# Verify that pg_notification_queue_usage correctly reports a non-zero result, +# after submitting notifications while another connection is listening for +# those notifications and waiting inside an active transaction. We have to +# fill a page of the notify SLRU to make this happen, which is a good deal +# of traffic. To not bloat the expected output, we intentionally don't +# commit the listener's transaction, so that it never reports these events. +# Hence, this should be the last test in this script. + +permutation llisten lbegin usage bignotify usage diff --git a/src/test/isolation/specs/classroom-scheduling.spec b/src/test/isolation/specs/classroom-scheduling.spec new file mode 100644 index 0000000..770715b --- /dev/null +++ b/src/test/isolation/specs/classroom-scheduling.spec @@ -0,0 +1,29 @@ +# Classroom Scheduling test +# +# Ensure that the classroom is not scheduled more than once +# for any moment in time. +# +# Any overlap between the transactions must cause a serialization failure. + +setup +{ + CREATE TABLE room_reservation (room_id text NOT NULL, start_time timestamp with time zone NOT NULL, end_time timestamp with time zone NOT NULL, description text NOT NULL, CONSTRAINT room_reservation_pkey PRIMARY KEY (room_id, start_time)); + INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 10:00', TIMESTAMP WITH TIME ZONE '2010-04-01 11:00', 'Bob'); +} + +teardown +{ + DROP TABLE room_reservation; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rx1 { SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:00' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:00'; } +step wy1 { INSERT INTO room_reservation VALUES ('101', TIMESTAMP WITH TIME ZONE '2010-04-01 13:00', TIMESTAMP WITH TIME ZONE '2010-04-01 14:00', 'Carol'); } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step ry2 { SELECT count(*) FROM room_reservation WHERE room_id = '101' AND start_time < TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' AND end_time > TIMESTAMP WITH TIME ZONE '2010-04-01 13:30'; } +step wx2 { UPDATE room_reservation SET start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 13:30', end_time = TIMESTAMP WITH TIME ZONE '2010-04-01 14:30' WHERE room_id = '101' AND start_time = TIMESTAMP WITH TIME ZONE '2010-04-01 10:00'; } +step c2 { COMMIT; } diff --git a/src/test/isolation/specs/create-trigger.spec b/src/test/isolation/specs/create-trigger.spec new file mode 100644 index 0000000..9d4710c --- /dev/null +++ b/src/test/isolation/specs/create-trigger.spec @@ -0,0 +1,54 @@ +# CREATE TRIGGER - Add trigger with concurrent reads +# +# CREATE TRIGGER uses ShareRowExclusiveLock so we mix writes with it +# to see what works or waits. + +setup +{ + CREATE TABLE a (i int); + CREATE FUNCTION f() RETURNS TRIGGER LANGUAGE plpgsql AS 'BEGIN RETURN NULL; END;'; + INSERT INTO a VALUES (0), (1), (2), (3); +} + +teardown +{ + DROP TABLE a; + DROP FUNCTION f(); +} + +session s1 +step s1a { BEGIN; } +step s1b { CREATE TRIGGER t AFTER UPDATE ON a EXECUTE PROCEDURE f(); } +step s1c { COMMIT; } + +session s2 +step s2a { BEGIN; } +step s2b { SELECT * FROM a WHERE i = 1 FOR UPDATE; } +step s2c { UPDATE a SET i = 4 WHERE i = 3; } +step s2d { COMMIT; } + +permutation s1a s1b s1c s2a s2b s2c s2d +permutation s1a s1b s2a s1c s2b s2c s2d +permutation s1a s1b s2a s2b s1c s2c s2d +permutation s1a s1b s2a s2b s2c s1c s2d +permutation s1a s2a s1b s1c s2b s2c s2d +permutation s1a s2a s1b s2b s1c s2c s2d +permutation s1a s2a s1b s2b s2c s1c s2d +permutation s1a s2a s2b s1b s1c s2c s2d +permutation s1a s2a s2b s1b s2c s1c s2d +permutation s1a s2a s2b s2c s1b s2d s1c +permutation s1a s2a s2b s2c s2d s1b s1c +permutation s2a s1a s1b s1c s2b s2c s2d +permutation s2a s1a s1b s2b s1c s2c s2d +permutation s2a s1a s1b s2b s2c s1c s2d +permutation s2a s1a s2b s1b s1c s2c s2d +permutation s2a s1a s2b s1b s2c s1c s2d +permutation s2a s1a s2b s2c s1b s2d s1c +permutation s2a s1a s2b s2c s2d s1b s1c +permutation s2a s2b s1a s1b s1c s2c s2d +permutation s2a s2b s1a s1b s2c s1c s2d +permutation s2a s2b s1a s2c s1b s2d s1c +permutation s2a s2b s1a s2c s2d s1b s1c +permutation s2a s2b s2c s1a s1b s2d s1c +permutation s2a s2b s2c s1a s2d s1b s1c +permutation s2a s2b s2c s2d s1a s1b s1c diff --git a/src/test/isolation/specs/deadlock-hard.spec b/src/test/isolation/specs/deadlock-hard.spec new file mode 100644 index 0000000..60bedca --- /dev/null +++ b/src/test/isolation/specs/deadlock-hard.spec @@ -0,0 +1,79 @@ +# This is a straightforward deadlock scenario. Since it involves more than +# two processes, the main lock detector will find the problem and rollback +# the session that first discovers it. Set deadlock_timeout in each session +# so that it's predictable which session fails. + +setup +{ + CREATE TABLE a1 (); + CREATE TABLE a2 (); + CREATE TABLE a3 (); + CREATE TABLE a4 (); + CREATE TABLE a5 (); + CREATE TABLE a6 (); + CREATE TABLE a7 (); + CREATE TABLE a8 (); +} + +teardown +{ + DROP TABLE a1, a2, a3, a4, a5, a6, a7, a8; +} + +session s1 +setup { BEGIN; SET deadlock_timeout = '100s'; } +step s1a1 { LOCK TABLE a1; } +step s1a2 { LOCK TABLE a2; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN; SET deadlock_timeout = '100s'; } +step s2a2 { LOCK TABLE a2; } +step s2a3 { LOCK TABLE a3; } +step s2c { COMMIT; } + +session s3 +setup { BEGIN; SET deadlock_timeout = '100s'; } +step s3a3 { LOCK TABLE a3; } +step s3a4 { LOCK TABLE a4; } +step s3c { COMMIT; } + +session s4 +setup { BEGIN; SET deadlock_timeout = '100s'; } +step s4a4 { LOCK TABLE a4; } +step s4a5 { LOCK TABLE a5; } +step s4c { COMMIT; } + +session s5 +setup { BEGIN; SET deadlock_timeout = '100s'; } +step s5a5 { LOCK TABLE a5; } +step s5a6 { LOCK TABLE a6; } +step s5c { COMMIT; } + +session s6 +setup { BEGIN; SET deadlock_timeout = '100s'; } +step s6a6 { LOCK TABLE a6; } +step s6a7 { LOCK TABLE a7; } +step s6c { COMMIT; } + +session s7 +setup { BEGIN; SET deadlock_timeout = '100s'; } +step s7a7 { LOCK TABLE a7; } +step s7a8 { LOCK TABLE a8; } +step s7c { COMMIT; } + +session s8 +setup { BEGIN; SET deadlock_timeout = '10ms'; } +step s8a8 { LOCK TABLE a8; } +step s8a1 { LOCK TABLE a1; } +step s8c { COMMIT; } + +# Note: when s8a1 detects the deadlock and fails, s7a8 is released, making +# it timing-dependent which query completion is received first by the tester. +# To ensure output stability, add a blocking mark to force s8a1's completion +# to be reported first. There is a second timing dependency, too: the tester +# might or might not observe s8a1 during its short lock wait state. Apply a +# dummy blocking mark to s8a1 to ensure it will be reported as "waiting" +# regardless of that. + +permutation s1a1 s2a2 s3a3 s4a4 s5a5 s6a6 s7a7 s8a8 s1a2 s2a3 s3a4 s4a5 s5a6 s6a7 s7a8(s8a1) s8a1(*) s8c s7c s6c s5c s4c s3c s2c s1c diff --git a/src/test/isolation/specs/deadlock-parallel.spec b/src/test/isolation/specs/deadlock-parallel.spec new file mode 100644 index 0000000..a050a49 --- /dev/null +++ b/src/test/isolation/specs/deadlock-parallel.spec @@ -0,0 +1,113 @@ +# Test deadlock resolution with parallel process groups. + +# It's fairly hard to get parallel worker processes to block on locks, +# since generally they don't want any locks their leader didn't already +# take. We cheat like mad here by making a function that takes a lock, +# and is incorrectly marked parallel-safe so that it can execute in a worker. + +# Note that we explicitly override any global settings of isolation level +# or force_parallel_mode, to ensure we're testing what we intend to. + +# Otherwise, this is morally equivalent to deadlock-soft.spec: +# Four-process deadlock with two hard edges and two soft edges. +# d2 waits for e1 (soft edge), e1 waits for d1 (hard edge), +# d1 waits for e2 (soft edge), e2 waits for d2 (hard edge). +# The deadlock detector resolves the deadlock by reversing the d1-e2 edge, +# unblocking d1. + +# However ... it's not actually that well-defined whether the deadlock +# detector will prefer to unblock d1 or d2. It depends on which backend +# is first to run DeadLockCheck after the deadlock condition is created: +# that backend will search outwards from its own wait condition, and will +# first find a loop involving the *other* lock. We encourage that to be +# one of the d2a1 parallel workers, which will therefore unblock d1a2 +# workers, by setting a shorter deadlock_timeout in session d2. But on +# slow machines, one or more d1a2 workers may not yet have reached their +# lock waits, so that they're not unblocked by the first DeadLockCheck. +# The next DeadLockCheck may choose to unblock the d2a1 workers instead, +# which would allow d2a1 to complete before d1a2, causing the test to +# freeze up because isolationtester isn't expecting that completion order. +# (In effect, we have an undetectable deadlock because d2 is waiting for +# d1's completion, but on the client side.) To fix this, introduce an +# additional lock (advisory lock 3), which is initially taken by d1 and +# then d2a1 will wait for it after completing the main part of the test. +# In this way, the deadlock detector can see that d1 must be completed +# first, regardless of timing. + +setup +{ + create function lock_share(int,int) returns int language sql as + 'select pg_advisory_xact_lock_shared($1); select 1;' parallel safe; + + create function lock_excl(int,int) returns int language sql as + 'select pg_advisory_xact_lock($1); select 1;' parallel safe; + + create table bigt as select x from generate_series(1, 10000) x; + analyze bigt; +} + +teardown +{ + drop function lock_share(int,int); + drop function lock_excl(int,int); + drop table bigt; +} + +session d1 +setup { BEGIN isolation level repeatable read; + SET force_parallel_mode = off; + SET deadlock_timeout = '10s'; +} +# these locks will be taken in the leader, so they will persist: +step d1a1 { SELECT lock_share(1,x), lock_excl(3,x) FROM bigt LIMIT 1; } +# this causes all the parallel workers to take locks: +step d1a2 { SET force_parallel_mode = on; + SET parallel_setup_cost = 0; + SET parallel_tuple_cost = 0; + SET min_parallel_table_scan_size = 0; + SET parallel_leader_participation = off; + SET max_parallel_workers_per_gather = 3; + SELECT sum(lock_share(2,x)) FROM bigt; } +step d1c { COMMIT; } + +session d2 +setup { BEGIN isolation level repeatable read; + SET force_parallel_mode = off; + SET deadlock_timeout = '10ms'; +} +# this lock will be taken in the leader, so it will persist: +step d2a2 { select lock_share(2,x) FROM bigt LIMIT 1; } +# this causes all the parallel workers to take locks; +# after which, make the leader take lock 3 to prevent client-driven deadlock +step d2a1 { SET force_parallel_mode = on; + SET parallel_setup_cost = 0; + SET parallel_tuple_cost = 0; + SET min_parallel_table_scan_size = 0; + SET parallel_leader_participation = off; + SET max_parallel_workers_per_gather = 3; + SELECT sum(lock_share(1,x)) FROM bigt; + SET force_parallel_mode = off; + RESET parallel_setup_cost; + RESET parallel_tuple_cost; + SELECT lock_share(3,x) FROM bigt LIMIT 1; } +step d2c { COMMIT; } + +session e1 +setup { BEGIN isolation level repeatable read; + SET force_parallel_mode = on; + SET deadlock_timeout = '10s'; +} +# this lock will be taken in a parallel worker, but we don't need it to persist +step e1l { SELECT lock_excl(1,x) FROM bigt LIMIT 1; } +step e1c { COMMIT; } + +session e2 +setup { BEGIN isolation level repeatable read; + SET force_parallel_mode = on; + SET deadlock_timeout = '10s'; +} +# this lock will be taken in a parallel worker, but we don't need it to persist +step e2l { SELECT lock_excl(2,x) FROM bigt LIMIT 1; } +step e2c { COMMIT; } + +permutation d1a1 d2a2 e1l e2l d1a2 d2a1 d1c e1c d2c e2c diff --git a/src/test/isolation/specs/deadlock-simple.spec b/src/test/isolation/specs/deadlock-simple.spec new file mode 100644 index 0000000..3086dc7 --- /dev/null +++ b/src/test/isolation/specs/deadlock-simple.spec @@ -0,0 +1,29 @@ +# The deadlock detector has a special case for "simple" deadlocks. A simple +# deadlock occurs when we attempt a lock upgrade while another process waits +# for a lock upgrade on the same object; and the sought locks conflict with +# those already held, so that neither process can complete its upgrade until +# the other releases locks. Test this scenario. + +setup +{ + CREATE TABLE a1 (); +} + +teardown +{ + DROP TABLE a1; +} + +session s1 +setup { BEGIN; } +step s1as { LOCK TABLE a1 IN ACCESS SHARE MODE; } +step s1ae { LOCK TABLE a1 IN ACCESS EXCLUSIVE MODE; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN; } +step s2as { LOCK TABLE a1 IN ACCESS SHARE MODE; } +step s2ae { LOCK TABLE a1 IN ACCESS EXCLUSIVE MODE; } +step s2c { COMMIT; } + +permutation s1as s2as s1ae s2ae s1c s2c diff --git a/src/test/isolation/specs/deadlock-soft-2.spec b/src/test/isolation/specs/deadlock-soft-2.spec new file mode 100644 index 0000000..26d9c62 --- /dev/null +++ b/src/test/isolation/specs/deadlock-soft-2.spec @@ -0,0 +1,43 @@ +# Soft deadlock requiring reversal of multiple wait-edges. s1 must +# jump over both s3 and s4 and acquire the lock on a2 immediately, +# since s3 and s4 are hard-blocked on a1. + +setup +{ + CREATE TABLE a1 (); + CREATE TABLE a2 (); +} + +teardown +{ + DROP TABLE a1, a2; +} + +session s1 +setup { BEGIN; SET deadlock_timeout = '10ms'; } +step s1a { LOCK TABLE a1 IN SHARE UPDATE EXCLUSIVE MODE; } +step s1b { LOCK TABLE a2 IN SHARE UPDATE EXCLUSIVE MODE; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN; SET deadlock_timeout = '100s'; } +step s2a { LOCK TABLE a2 IN ACCESS SHARE MODE; } +step s2b { LOCK TABLE a1 IN SHARE UPDATE EXCLUSIVE MODE; } +step s2c { COMMIT; } + +session s3 +setup { BEGIN; SET deadlock_timeout = '100s'; } +step s3a { LOCK TABLE a2 IN ACCESS EXCLUSIVE MODE; } +step s3c { COMMIT; } + +session s4 +setup { BEGIN; SET deadlock_timeout = '100s'; } +step s4a { LOCK TABLE a2 IN ACCESS EXCLUSIVE MODE; } +step s4c { COMMIT; } + +# The expected output for this test assumes that isolationtester will +# detect step s1b as waiting before the deadlock detector runs and +# releases s1 from its blocked state. To ensure that happens even in +# very slow (debug_discard_caches) cases, apply a (*) annotation. + +permutation s1a s2a s2b s3a s4a s1b(*) s1c s2c s3c s4c diff --git a/src/test/isolation/specs/deadlock-soft.spec b/src/test/isolation/specs/deadlock-soft.spec new file mode 100644 index 0000000..bc9c6a7 --- /dev/null +++ b/src/test/isolation/specs/deadlock-soft.spec @@ -0,0 +1,40 @@ +# Four-process deadlock with two hard edges and two soft edges. +# d2 waits for e1 (soft edge), e1 waits for d1 (hard edge), +# d1 waits for e2 (soft edge), e2 waits for d2 (hard edge). +# The deadlock detector resolves the deadlock by reversing the d1-e2 edge, +# unblocking d1. + +setup +{ + CREATE TABLE a1 (); + CREATE TABLE a2 (); +} + +teardown +{ + DROP TABLE a1, a2; +} + +session d1 +setup { BEGIN; SET deadlock_timeout = '10s'; } +step d1a1 { LOCK TABLE a1 IN ACCESS SHARE MODE; } +step d1a2 { LOCK TABLE a2 IN ACCESS SHARE MODE; } +step d1c { COMMIT; } + +session d2 +setup { BEGIN; SET deadlock_timeout = '10ms'; } +step d2a2 { LOCK TABLE a2 IN ACCESS SHARE MODE; } +step d2a1 { LOCK TABLE a1 IN ACCESS SHARE MODE; } +step d2c { COMMIT; } + +session e1 +setup { BEGIN; SET deadlock_timeout = '10s'; } +step e1l { LOCK TABLE a1 IN ACCESS EXCLUSIVE MODE; } +step e1c { COMMIT; } + +session e2 +setup { BEGIN; SET deadlock_timeout = '10s'; } +step e2l { LOCK TABLE a2 IN ACCESS EXCLUSIVE MODE; } +step e2c { COMMIT; } + +permutation d1a1 d2a2 e1l e2l d1a2 d2a1 d1c e1c d2c e2c diff --git a/src/test/isolation/specs/delete-abort-savept-2.spec b/src/test/isolation/specs/delete-abort-savept-2.spec new file mode 100644 index 0000000..65bd936 --- /dev/null +++ b/src/test/isolation/specs/delete-abort-savept-2.spec @@ -0,0 +1,34 @@ +# A funkier version of delete-abort-savept +setup +{ + CREATE TABLE foo ( + key INT PRIMARY KEY, + value INT + ); + + INSERT INTO foo VALUES (1, 1); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +setup { BEGIN; } +step s1l { SELECT * FROM foo FOR KEY SHARE; } +step s1svp { SAVEPOINT f; } +step s1d { SELECT * FROM foo FOR NO KEY UPDATE; } +step s1r { ROLLBACK TO f; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN; } +step s2l { SELECT * FROM foo FOR UPDATE; } +step s2l2 { SELECT * FROM foo FOR NO KEY UPDATE; } +step s2c { COMMIT; } + +permutation s1l s1svp s1d s1r s2l s1c s2c +permutation s1l s1svp s1d s2l s1r s1c s2c +permutation s1l s1svp s1d s1r s2l2 s1c s2c +permutation s1l s1svp s1d s2l2 s1r s1c s2c diff --git a/src/test/isolation/specs/delete-abort-savept.spec b/src/test/isolation/specs/delete-abort-savept.spec new file mode 100644 index 0000000..498ffed --- /dev/null +++ b/src/test/isolation/specs/delete-abort-savept.spec @@ -0,0 +1,37 @@ +# After rolling back a subtransaction that upgraded a lock, the previously +# held lock should still be held. +setup +{ + CREATE TABLE foo ( + key INT PRIMARY KEY, + value INT + ); + + INSERT INTO foo VALUES (1, 1); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +setup { BEGIN; } +step s1l { SELECT * FROM foo FOR KEY SHARE; } +step s1svp { SAVEPOINT f; } +step s1d { DELETE FROM foo; } +step s1r { ROLLBACK TO f; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN; } +step s2l { SELECT * FROM foo FOR UPDATE; } +step s2c { COMMIT; } + +permutation s1l s1svp s1d s1r s1c s2l s2c +permutation s1l s1svp s1d s1r s2l s1c s2c +permutation s1l s1svp s1d s2l s1r s1c s2c +permutation s1l s1svp s2l s1d s1r s1c s2c +permutation s1l s2l s1svp s1d s1r s1c s2c +permutation s2l s1l s2c s1svp s1d s1r s1c +permutation s2l s2c s1l s1svp s1d s1r s1c diff --git a/src/test/isolation/specs/detach-partition-concurrently-1.spec b/src/test/isolation/specs/detach-partition-concurrently-1.spec new file mode 100644 index 0000000..835fe89 --- /dev/null +++ b/src/test/isolation/specs/detach-partition-concurrently-1.spec @@ -0,0 +1,69 @@ +# Test that detach partition concurrently makes the partition invisible at the +# correct time. + +setup +{ + DROP TABLE IF EXISTS d_listp, d_listp1, d_listp2; + CREATE TABLE d_listp (a int) PARTITION BY LIST(a); + CREATE TABLE d_listp1 PARTITION OF d_listp FOR VALUES IN (1); + CREATE TABLE d_listp2 PARTITION OF d_listp FOR VALUES IN (2); + INSERT INTO d_listp VALUES (1),(2); +} + +teardown { + DROP TABLE IF EXISTS d_listp, d_listp2, d_listp_foobar; +} + +session s1 +step s1b { BEGIN; } +step s1brr { BEGIN ISOLATION LEVEL REPEATABLE READ; } +step s1s { SELECT * FROM d_listp; } +step s1ins { INSERT INTO d_listp VALUES (1); } +step s1ins2 { INSERT INTO d_listp VALUES (2); } +step s1prep { PREPARE f(int) AS INSERT INTO d_listp VALUES ($1); } +step s1prep1 { PREPARE f(int) AS INSERT INTO d_listp VALUES (1); } +step s1prep2 { PREPARE f(int) AS INSERT INTO d_listp VALUES (2); } +step s1exec1 { EXECUTE f(1); } +step s1exec2 { EXECUTE f(2); } +step s1dealloc { DEALLOCATE f; } +step s1c { COMMIT; } + +session s2 +step s2detach { ALTER TABLE d_listp DETACH PARTITION d_listp2 CONCURRENTLY; } +step s2drop { DROP TABLE d_listp2; } + +session s3 +step s3s { SELECT * FROM d_listp; } +step s3i { SELECT relpartbound IS NULL FROM pg_class where relname = 'd_listp2'; } +step s3ins2 { INSERT INTO d_listp VALUES (2); } + +# The transaction that detaches hangs until it sees any older transaction +# terminate, as does anybody else. +permutation s1b s1s s2detach s1s s1c s1s + +# relpartbound remains set until s1 commits +# XXX this could be timing dependent :-( +permutation s1b s1s s2detach s1s s3s s3i s1c s3i s2drop s1s + +# In read-committed mode, the partition disappears from view of concurrent +# transactions immediately. But if a write lock is held, then the detach +# has to wait. +permutation s1b s1s s2detach s1ins s1s s1c +permutation s1b s1s s1ins2 s2detach s1ins s1s s1c + +# In repeatable-read mode, the partition remains visible until commit even +# if the to-be-detached partition is not locked for write. +permutation s1brr s1s s2detach s1ins s1s s1c +permutation s1brr s1s s2detach s1s s1c + +# Another process trying to acquire a write lock will be blocked behind the +# detacher +permutation s1b s1ins2 s2detach s3ins2 s1c + +# a prepared query is not blocked +permutation s1brr s1prep s1s s2detach s1s s1exec1 s3s s1dealloc s1c +permutation s1brr s1prep s1exec2 s2detach s1s s1exec2 s3s s1c s1dealloc +permutation s1brr s1prep s1s s2detach s1s s1exec2 s1c s1dealloc +permutation s1brr s1prep s2detach s1s s1exec2 s1c s1dealloc +permutation s1brr s1prep1 s2detach s1s s1exec2 s1c s1dealloc +permutation s1brr s1prep2 s2detach s1s s1exec2 s1c s1dealloc diff --git a/src/test/isolation/specs/detach-partition-concurrently-2.spec b/src/test/isolation/specs/detach-partition-concurrently-2.spec new file mode 100644 index 0000000..fa767ea --- /dev/null +++ b/src/test/isolation/specs/detach-partition-concurrently-2.spec @@ -0,0 +1,41 @@ +# Test that detach partition concurrently makes the partition safe +# for foreign keys that reference it. + +setup +{ + DROP TABLE IF EXISTS d_lp_fk, d_lp_fk_1, d_lp_fk_2, d_lp_fk_r; + + CREATE TABLE d_lp_fk (a int PRIMARY KEY) PARTITION BY LIST(a); + CREATE TABLE d_lp_fk_1 PARTITION OF d_lp_fk FOR VALUES IN (1); + CREATE TABLE d_lp_fk_2 PARTITION OF d_lp_fk FOR VALUES IN (2); + INSERT INTO d_lp_fk VALUES (1), (2); + + CREATE TABLE d_lp_fk_r (a int references d_lp_fk); +} + +teardown { DROP TABLE IF EXISTS d_lp_fk, d_lp_fk_1, d_lp_fk_2, d_lp_fk_r; } + +session s1 +step s1b { BEGIN; } +step s1s { SELECT * FROM d_lp_fk; } +step s1c { COMMIT; } + +session s2 +step s2d { ALTER TABLE d_lp_fk DETACH PARTITION d_lp_fk_1 CONCURRENTLY; } + +session s3 +step s3b { BEGIN; } +step s3i1 { INSERT INTO d_lp_fk_r VALUES (1); } +step s3i2 { INSERT INTO d_lp_fk_r VALUES (2); } +step s3c { COMMIT; } + +# The transaction that detaches hangs until it sees any older transaction +# terminate. +permutation s1b s1s s2d s3i1 s1c +permutation s1b s1s s2d s3i2 s3i2 s1c + +permutation s1b s1s s3i1 s2d s1c +permutation s1b s1s s3i2 s2d s1c + +# what if s3 has an uncommitted insertion? +permutation s1b s1s s3b s2d s3i1 s1c s3c diff --git a/src/test/isolation/specs/detach-partition-concurrently-3.spec b/src/test/isolation/specs/detach-partition-concurrently-3.spec new file mode 100644 index 0000000..31aa308 --- /dev/null +++ b/src/test/isolation/specs/detach-partition-concurrently-3.spec @@ -0,0 +1,86 @@ +# Try various things to happen to a partition with an incomplete detach +# +# Note: When using "s1cancel", mark the target step (the one to be canceled) +# as blocking "s1cancel". This ensures consistent reporting regardless of +# whether "s1cancel" finishes before or after the other step reports failure. +# Also, ensure the step after "s1cancel" is also an s1 step (use "s1noop" if +# necessary). This ensures we won't move on to the next step until the cancel +# is complete. + +setup +{ + CREATE TABLE d3_listp (a int) PARTITION BY LIST(a); + CREATE TABLE d3_listp1 PARTITION OF d3_listp FOR VALUES IN (1); + CREATE TABLE d3_listp2 PARTITION OF d3_listp FOR VALUES IN (2); + CREATE TABLE d3_pid (pid int); + INSERT INTO d3_listp VALUES (1); +} + +teardown { + DROP TABLE IF EXISTS d3_listp, d3_listp1, d3_listp2, d3_pid; +} + +session s1 +step s1b { BEGIN; } +step s1brr { BEGIN ISOLATION LEVEL REPEATABLE READ; } +step s1s { SELECT * FROM d3_listp; } +step s1spart { SELECT * FROM d3_listp1; } +step s1cancel { SELECT pg_cancel_backend(pid) FROM d3_pid; } +step s1noop { } +step s1c { COMMIT; } +step s1alter { ALTER TABLE d3_listp1 ALTER a DROP NOT NULL; } +step s1insert { INSERT INTO d3_listp VALUES (1); } +step s1insertpart { INSERT INTO d3_listp1 VALUES (1); } +step s1drop { DROP TABLE d3_listp; } +step s1droppart { DROP TABLE d3_listp1; } +step s1trunc { TRUNCATE TABLE d3_listp; } +step s1list { SELECT relname FROM pg_catalog.pg_class + WHERE relname LIKE 'd3_listp%' ORDER BY 1; } +step s1describe { SELECT 'd3_listp' AS root, * FROM pg_partition_tree('d3_listp') + UNION ALL SELECT 'd3_listp1', * FROM pg_partition_tree('d3_listp1'); } + +session s2 +step s2begin { BEGIN; } +step s2snitch { INSERT INTO d3_pid SELECT pg_backend_pid(); } +step s2detach { ALTER TABLE d3_listp DETACH PARTITION d3_listp1 CONCURRENTLY; } +step s2detach2 { ALTER TABLE d3_listp DETACH PARTITION d3_listp2 CONCURRENTLY; } +step s2detachfinal { ALTER TABLE d3_listp DETACH PARTITION d3_listp1 FINALIZE; } +step s2drop { DROP TABLE d3_listp1; } +step s2commit { COMMIT; } + +# Try various things while the partition is in "being detached" state, with +# no session waiting. +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1describe s1alter +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1insert s1c +permutation s2snitch s1brr s1s s2detach s1cancel(s2detach) s1insert s1c s1spart +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1insertpart + +# Test partition descriptor caching +permutation s2snitch s1b s1s s2detach2 s1cancel(s2detach2) s1c s1brr s1insert s1s s1insert s1c +permutation s2snitch s1b s1s s2detach2 s1cancel(s2detach2) s1c s1brr s1s s1insert s1s s1c + +# "drop" here does both tables +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1drop s1list +# "truncate" only does parent, not partition +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1trunc s1spart + +# If a partition pending detach exists, we cannot drop another one +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1noop s2detach2 s1c +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1noop s2detachfinal s1c s2detach2 +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1droppart s2detach2 + +# When a partition with incomplete detach is dropped, we grab lock on parent too. +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s2begin s2drop s1s s2commit + +# Partially detach, then select and try to complete the detach. Reading +# from partition blocks (AEL is required on partition); reading from parent +# does not block. +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1b s1spart s2detachfinal s1c +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1b s1s s2detachfinal s1c + +# DETACH FINALIZE in a transaction block. No insert/select on the partition +# is allowed concurrently with that. +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s1b s1spart s2detachfinal s1c +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s2begin s2detachfinal s2commit +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s2begin s2detachfinal s1spart s2commit +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1c s2begin s2detachfinal s1insertpart s2commit diff --git a/src/test/isolation/specs/detach-partition-concurrently-4.spec b/src/test/isolation/specs/detach-partition-concurrently-4.spec new file mode 100644 index 0000000..2c02cae --- /dev/null +++ b/src/test/isolation/specs/detach-partition-concurrently-4.spec @@ -0,0 +1,83 @@ +# This test exercises behavior of foreign keys in the face of concurrent +# detach of partitions in the referenced table. +# (The cases where the detaching transaction is cancelled is interesting +# because the locking situation is completely different. I didn't verify +# that keeping both variants adds any extra coverage.) +# +# Note: When using "s1cancel", mark the target step (the one to be canceled) +# as blocking "s1cancel". This ensures consistent reporting regardless of +# whether "s1cancel" finishes before or after the other step reports failure. +# Also, ensure the step after "s1cancel" is also an s1 step (use "s1noop" if +# necessary). This ensures we won't move on to the next step until the cancel +# is complete. + +setup { + drop table if exists d4_primary, d4_primary1, d4_fk, d4_pid; + create table d4_primary (a int primary key) partition by list (a); + create table d4_primary1 partition of d4_primary for values in (1); + create table d4_primary2 partition of d4_primary for values in (2); + insert into d4_primary values (1); + insert into d4_primary values (2); + create table d4_fk (a int references d4_primary); + insert into d4_fk values (2); + create table d4_pid (pid int); +} + +session s1 +step s1b { begin; } +step s1brr { begin isolation level repeatable read; } +step s1s { select * from d4_primary; } +step s1cancel { select pg_cancel_backend(pid) from d4_pid; } +step s1noop { } +step s1insert { insert into d4_fk values (1); } +step s1c { commit; } +step s1declare { declare f cursor for select * from d4_primary; } +step s1declare2 { declare f cursor for select * from d4_fk where a = 2; } +step s1fetchall { fetch all from f; } +step s1fetchone { fetch 1 from f; } +step s1updcur { update d4_fk set a = 1 where current of f; } +step s1svpt { savepoint f; } +step s1rollback { rollback to f; } + +session s2 +step s2snitch { insert into d4_pid select pg_backend_pid(); } +step s2detach { alter table d4_primary detach partition d4_primary1 concurrently; } + +session s3 +step s3brr { begin isolation level repeatable read; } +step s3insert { insert into d4_fk values (1); } +step s3commit { commit; } +step s3vacfreeze { vacuum freeze pg_catalog.pg_inherits; } + +# Trying to insert into a partially detached partition is rejected +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1insert s1c +permutation s2snitch s1b s1s s2detach s1insert s1c +# ... even under REPEATABLE READ mode. +permutation s2snitch s1brr s1s s2detach s1cancel(s2detach) s1insert s1c +permutation s2snitch s1brr s1s s2detach s1insert s1c + +# If you read the referenced table using a cursor, you can see a row that the +# RI query does not see. +permutation s2snitch s1b s1declare s2detach s1cancel(s2detach) s1fetchall s1insert s1c +permutation s2snitch s1b s1declare s2detach s1fetchall s1insert s1c +permutation s2snitch s1b s1declare s2detach s1cancel(s2detach) s1svpt s1insert s1rollback s1fetchall s1c +permutation s2snitch s1b s1declare s2detach s1svpt s1insert s1rollback s1fetchall s1c +permutation s2snitch s1b s2detach s1declare s1cancel(s2detach) s1fetchall s1insert s1c +permutation s2snitch s1b s2detach s1declare s1fetchall s1insert s1c +permutation s2snitch s1b s2detach s1declare s1cancel(s2detach) s1svpt s1insert s1rollback s1fetchall s1c +permutation s2snitch s1b s2detach s1declare s1svpt s1insert s1rollback s1fetchall s1c + +# Creating the referencing row using a cursor +permutation s2snitch s1brr s1declare2 s1fetchone s2detach s1cancel(s2detach) s1updcur s1c +permutation s2snitch s1brr s1declare2 s1fetchone s2detach s1updcur s1c +permutation s2snitch s1brr s1declare2 s1fetchone s1updcur s2detach s1c + +# Try reading the table from an independent session. +permutation s2snitch s1b s1s s2detach s3insert s1c +permutation s2snitch s1b s1s s2detach s3brr s3insert s3commit s1cancel(s2detach) s1c +permutation s2snitch s1b s1s s2detach s3brr s3insert s3commit s1c + +# Try one where we VACUUM FREEZE pg_inherits (to verify that xmin change is +# handled correctly). +permutation s2snitch s1brr s1s s2detach s1cancel(s2detach) s1noop s3vacfreeze s1s s1insert s1c +permutation s2snitch s1b s1s s2detach s1cancel(s2detach) s1noop s3vacfreeze s1s s1insert s1c diff --git a/src/test/isolation/specs/drop-index-concurrently-1.spec b/src/test/isolation/specs/drop-index-concurrently-1.spec new file mode 100644 index 0000000..812b5de --- /dev/null +++ b/src/test/isolation/specs/drop-index-concurrently-1.spec @@ -0,0 +1,41 @@ +# DROP INDEX CONCURRENTLY +# +# This test shows that the concurrent write behaviour works correctly +# with the expected output being 2 rows at the READ COMMITTED and READ +# UNCOMMITTED transaction isolation levels, and 1 row at the other +# transaction isolation levels. +# +setup +{ + CREATE TABLE test_dc(id serial primary key, data int); + INSERT INTO test_dc(data) SELECT * FROM generate_series(1, 100); + CREATE INDEX test_dc_data ON test_dc(data); +} + +teardown +{ + DROP TABLE test_dc; +} + +session s1 +step noseq { SET enable_seqscan = false; } +step chkiso { SELECT (setting in ('read committed','read uncommitted')) AS is_read_committed FROM pg_settings WHERE name = 'default_transaction_isolation'; } +step prepi { PREPARE getrow_idx AS SELECT * FROM test_dc WHERE data=34 ORDER BY id,data; } +step preps { PREPARE getrow_seq AS SELECT * FROM test_dc WHERE data::text=34::text ORDER BY id,data; } +step begin { BEGIN; } +step explaini { EXPLAIN (COSTS OFF) EXECUTE getrow_idx; } +step explains { EXPLAIN (COSTS OFF) EXECUTE getrow_seq; } +step selecti { EXECUTE getrow_idx; } +step selects { EXECUTE getrow_seq; } +step end { COMMIT; } + +session s2 +setup { BEGIN; } +step select2 { SELECT * FROM test_dc WHERE data=34 ORDER BY id,data; } +step insert2 { INSERT INTO test_dc(data) SELECT * FROM generate_series(1, 100); } +step end2 { COMMIT; } + +session s3 +step drop { DROP INDEX CONCURRENTLY test_dc_data; } + +permutation noseq chkiso prepi preps begin explaini explains select2 drop insert2 end2 selecti selects end diff --git a/src/test/isolation/specs/eval-plan-qual-trigger.spec b/src/test/isolation/specs/eval-plan-qual-trigger.spec new file mode 100644 index 0000000..b512edd --- /dev/null +++ b/src/test/isolation/specs/eval-plan-qual-trigger.spec @@ -0,0 +1,410 @@ +setup +{ + CREATE TABLE trigtest(key text primary key, data text); + + CREATE FUNCTION noisy_oper(p_comment text, p_a anynonarray, p_op text, p_b anynonarray) + RETURNS bool LANGUAGE plpgsql AS $body$ + DECLARE + r bool; + BEGIN + EXECUTE format('SELECT $1 %s $2', p_op) INTO r USING p_a, p_b; + RAISE NOTICE '%: % % % % %: %', p_comment, pg_typeof(p_a), p_a, p_op, pg_typeof(p_b), p_b, r; + RETURN r; + END;$body$; + + CREATE FUNCTION trig_report() RETURNS TRIGGER LANGUAGE plpgsql AS $body$ + DECLARE + r_new text; + r_old text; + r_ret record; + BEGIN + -- In older releases it wasn't allowed to reference OLD/NEW + -- when not applicable for TG_WHEN + IF TG_OP = 'INSERT' THEN + r_old = NULL; + r_new = NEW; + r_ret = NEW; + ELSIF TG_OP = 'DELETE' THEN + r_old = OLD; + r_new = NULL; + r_ret = OLD; + ELSIF TG_OP = 'UPDATE' THEN + r_old = OLD; + r_new = NEW; + r_ret = NEW; + END IF; + + IF TG_WHEN = 'AFTER' THEN + r_ret = NULL; + END IF; + + RAISE NOTICE 'trigger: name %; when: %; lev: %s; op: %; old: % new: %', + TG_NAME, TG_WHEN, TG_LEVEL, TG_OP, r_old, r_new; + + RETURN r_ret; + END; + $body$; +} + +teardown +{ + DROP TABLE trigtest; + DROP FUNCTION noisy_oper(text, anynonarray, text, anynonarray); + DROP FUNCTION trig_report(); +} + + +session s0 +step s0_rep { SELECT * FROM trigtest ORDER BY key, data } + +session s1 +#setup { } +step s1_b_rc { BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; } +step s1_b_rr { BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1; } +step s1_c { COMMIT; } +step s1_r { ROLLBACK; } +step s1_trig_rep_b_i { CREATE TRIGGER rep_b_i BEFORE INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); } +step s1_trig_rep_a_i { CREATE TRIGGER rep_a_i AFTER INSERT ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); } +step s1_trig_rep_b_u { CREATE TRIGGER rep_b_u BEFORE UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); } +step s1_trig_rep_a_u { CREATE TRIGGER rep_a_u AFTER UPDATE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); } +step s1_trig_rep_b_d { CREATE TRIGGER rep_b_d BEFORE DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); } +step s1_trig_rep_a_d { CREATE TRIGGER rep_a_d AFTER DELETE ON trigtest FOR EACH ROW EXECUTE PROCEDURE trig_report(); } +step s1_ins_a { INSERT INTO trigtest VALUES ('key-a', 'val-a-s1') RETURNING *; } +step s1_ins_b { INSERT INTO trigtest VALUES ('key-b', 'val-b-s1') RETURNING *; } +step s1_ins_c { INSERT INTO trigtest VALUES ('key-c', 'val-c-s1') RETURNING *; } +step s1_del_a { + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * +} +step s1_del_b { + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-b') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * +} +step s1_upd_a_data { + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; +} +step s1_upd_b_data { + UPDATE trigtest SET data = data || '-ups1' + WHERE + noisy_oper('upd', key, '=', 'key-b') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; +} +step s1_upd_a_tob { + UPDATE trigtest SET key = 'key-b', data = data || '-tobs1' + WHERE + noisy_oper('upk', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; +} + +session s2 +#setup { } +step s2_b_rc { BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; } +step s2_b_rr { BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1; } +step s2_c { COMMIT; } +step s2_r { ROLLBACK; } +step s2_ins_a { INSERT INTO trigtest VALUES ('key-a', 'val-a-s2') RETURNING *; } +step s2_del_a { + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * +} +step s2_upd_a_data { + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; +} +step s2_upd_b_data { + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '=', 'key-b') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; +} +step s2_upd_all_data { + UPDATE trigtest SET data = data || '-ups2' + WHERE + noisy_oper('upd', key, '<>', 'mismatch') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; +} +step s2_upsert_a_data { + INSERT INTO trigtest VALUES ('key-a', 'val-a-upss2') + ON CONFLICT (key) + DO UPDATE SET data = trigtest.data || '-upserts2' + WHERE + noisy_oper('upd', trigtest.key, '=', 'key-a') AND + noisy_oper('upk', trigtest.data, '<>', 'mismatch') + RETURNING *; +} + +session s3 +#setup { } +step s3_b_rc { BEGIN ISOLATION LEVEL READ COMMITTED; SELECT 1; } +step s3_c { COMMIT; } +step s3_r { ROLLBACK; } +step s3_del_a { + DELETE FROM trigtest + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING * +} +step s3_upd_a_data { + UPDATE trigtest SET data = data || '-ups3' + WHERE + noisy_oper('upd', key, '=', 'key-a') AND + noisy_oper('upk', data, '<>', 'mismatch') + RETURNING *; +} + +### base case verifying that triggers see performed modifications +# s1 updates, s1 commits, s2 updates +permutation s1_trig_rep_b_u s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s1_c s2_upd_a_data s2_c + s0_rep +# s1 updates, s1 rolls back, s2 updates +permutation s1_trig_rep_b_u s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s1_r s2_upd_a_data s2_c + s0_rep +# s1 updates, s1 commits back, s2 deletes +permutation s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s1_c s2_del_a s2_c + s0_rep +# s1 updates, s1 rolls back back, s2 deletes +permutation s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s1_r s2_del_a s2_c + s0_rep + +### Verify EPQ is performed if necessary, and skipped if transaction rolled back +# s1 updates, s2 updates, s1 commits, EPQ +permutation s1_trig_rep_b_u s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s2_upd_a_data s1_c s2_c + s0_rep +# s1 updates, s2 updates, s1 rolls back, no EPQ +permutation s1_trig_rep_b_u s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s2_upd_a_data s1_r s2_c + s0_rep +# s1 updates, s2 deletes, s1 commits, EPQ +permutation s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s2_upd_a_data s1_c s2_c + s0_rep +# s1 updates, s2 deletes, s1 rolls back, no EPQ +permutation s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s2_upd_a_data s1_r s2_c + s0_rep +# s1 deletes, s2 updates, s1 commits, EPQ +permutation s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_del_a s2_upd_a_data s1_c s2_c + s0_rep +# s1 deletes, s2 updates, s1 rolls back, no EPQ +permutation s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_del_a s2_upd_a_data s1_r s2_c + s0_rep +# s1 inserts, s2 inserts, s1 commits, s2 inserts, unique conflict +permutation s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_a_i s1_trig_rep_a_d + s1_b_rc s2_b_rc + s1_ins_a s2_ins_a s1_c s2_c + s0_rep +# s1 inserts, s2 inserts, s1 rolls back, s2 inserts, no unique conflict +permutation s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_a_i s1_trig_rep_a_d + s1_b_rc s2_b_rc + s1_ins_a s2_ins_a s1_r s2_c + s0_rep +# s1 updates, s2 upserts, s1 commits, EPQ +permutation s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s2_upsert_a_data s1_c s2_c + s0_rep +# s1 updates, s2 upserts, s1 rolls back, no EPQ +permutation s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s2_upsert_a_data s1_c s2_c + s0_rep +# s1 inserts, s2 upserts, s1 commits +permutation s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u + s1_b_rc s2_b_rc + s1_ins_a s2_upsert_a_data s1_c s2_c + s0_rep +# s1 inserts, s2 upserts, s1 rolls back +permutation s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u + s1_b_rc s2_b_rc + s1_ins_a s2_upsert_a_data s1_r s2_c + s0_rep +# s1 inserts, s2 upserts, s1 updates, s1 commits, EPQ +permutation s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u + s1_b_rc s2_b_rc + s1_ins_a s1_upd_a_data s2_upsert_a_data s1_c s2_c + s0_rep +# s1 inserts, s2 upserts, s1 updates, s1 rolls back, no EPQ +permutation s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u + s1_b_rc s2_b_rc + s1_ins_a s1_upd_a_data s2_upsert_a_data s1_r s2_c + s0_rep + +### Verify EPQ is performed if necessary, and skipped if transaction rolled back, +### just without before triggers (for comparison, no additional row locks) +# s1 updates, s2 updates, s1 commits, EPQ +permutation s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s2_upd_a_data s1_c s2_c + s0_rep +# s1 updates, s2 updates, s1 rolls back, no EPQ +permutation s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s2_upd_a_data s1_r s2_c + s0_rep +# s1 updates, s2 deletes, s1 commits, EPQ +permutation s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s2_del_a s1_c s2_c + s0_rep +# s1 updates, s2 deletes, s1 rolls back, no EPQ +permutation s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_upd_a_data s2_del_a s1_r s2_c + s0_rep +# s1 deletes, s2 updates, s1 commits, EPQ +permutation s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_del_a s2_upd_a_data s1_c s2_c + s0_rep +# s1 deletes, s2 updates, s1 rolls back, no EPQ +permutation s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_del_a s2_upd_a_data s1_r s2_c + s0_rep +# s1 deletes, s2 deletes, s1 commits, EPQ +permutation s1_trig_rep_a_d + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_del_a s2_del_a s1_c s2_c + s0_rep +# s1 deletes, s2 deletes, s1 rolls back, no EPQ +permutation s1_trig_rep_a_d + s1_ins_a s1_ins_b s1_b_rc s2_b_rc + s1_del_a s2_del_a s1_r s2_c + s0_rep + +### Verify that an update affecting a row that has been +### updated/deleted to not match the where clause anymore works +### correctly +# s1 updates to different key, s2 updates old key, s1 commits, EPQ failure should lead to no update +permutation s1_trig_rep_b_u s1_trig_rep_a_u + s1_ins_a s1_ins_c s1_b_rc s2_b_rc + s1_upd_a_tob s2_upd_a_data s1_c s2_c + s0_rep +# s1 updates to different key, s2 updates old key, s1 rolls back, no EPQ failure +permutation s1_trig_rep_b_u s1_trig_rep_a_u + s1_ins_a s1_ins_c s1_b_rc s2_b_rc + s1_upd_a_tob s2_upd_a_data s1_r s2_c + s0_rep +# s1 updates to different key, s2 updates new key, s1 commits, s2 will +# not see tuple with new key and not block +permutation s1_trig_rep_b_u s1_trig_rep_a_u + s1_ins_a s1_ins_c s1_b_rc s2_b_rc + s1_upd_a_tob s2_upd_b_data s1_c s2_c + s0_rep +# s1 updates to different key, s2 updates all keys, s1 commits, s2, +# will not see tuple with old key, but block on old, and then follow +# the chain +permutation s1_trig_rep_b_u s1_trig_rep_a_u + s1_ins_a s1_ins_c s1_b_rc s2_b_rc + s1_upd_a_tob s2_upd_all_data s1_c s2_c + s0_rep +# s1 deletes, s2 updates, s1 committs, EPQ failure should lead to no update +permutation s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_c s1_b_rc s2_b_rc + s1_del_a s2_upd_a_data s1_c s2_c + s0_rep +# s1 deletes, s2 updates, s1 rolls back, no EPQ failure +permutation s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_c s1_b_rc s2_b_rc + s1_del_a s2_upd_a_data s1_r s2_c + s0_rep +# s1 deletes, s2 deletes, s1 committs, EPQ failure should lead to no delete +permutation s1_trig_rep_b_d s1_trig_rep_a_d + s1_ins_a s1_ins_c s1_b_rc s2_b_rc + s1_del_a s2_del_a s1_c s2_c + s0_rep +# s1 deletes, s2 deletes, s1 rolls back, no EPQ failure +permutation s1_trig_rep_b_d s1_trig_rep_a_d + s1_ins_a s1_ins_c s1_b_rc s2_b_rc + s1_del_a s2_del_a s1_r s2_c + s0_rep + +### Verify EPQ with more than two participants works +## XXX: Disable tests, there is some potential for instability here that's not yet fully understood +## s1 updates, s2 updates, s3 updates, s1 commits, s2 EPQ, s2 commits, s3 EPQ +#permutation s1_trig_rep_b_u s1_trig_rep_a_u +# s1_ins_a s1_ins_b s1_b_rc s2_b_rc s3_b_rc +# s1_upd_a_data s2_upd_a_data s3_upd_a_data s1_c s2_c s3_c +# s0_rep +## s1 updates, s2 updates, s3 updates, s1 commits, s2 EPQ, s2 rolls back, s3 EPQ +#permutation s1_trig_rep_b_u s1_trig_rep_a_u +# s1_ins_a s1_ins_b s1_b_rc s2_b_rc s3_b_rc +# s1_upd_a_data s2_upd_a_data s3_upd_a_data s1_c s2_r s3_c +# s0_rep +## s1 updates, s3 updates, s2 upserts, s1 updates, s1 commits, s3 EPQ, s3 deletes, s3 commits, s2 inserts without EPQ recheck +#permutation s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u +# s1_ins_a s1_b_rc s2_b_rc s3_b_rc +# s1_upd_a_data s3_upd_a_data s2_upsert_a_data s1_upd_a_data s1_c s3_del_a s3_c s2_c +# s0_rep +## s1 updates, s3 updates, s2 upserts, s1 updates, s1 commits, s3 EPQ, s3 deletes, s3 rolls back, s2 EPQ +#permutation s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u +# s1_ins_a s1_b_rc s2_b_rc s3_b_rc +# s1_upd_a_data s3_upd_a_data s2_upsert_a_data s1_upd_a_data s1_c s3_del_a s3_r s2_c +# s0_rep + +### Document that EPQ doesn't "leap" onto a tuple that would match after blocking +# s1 inserts a, s1 updates b, s2 updates b, s1 deletes b, s1 updates a to b, s1 commits, s2 EPQ finds tuple deleted +permutation s1_trig_rep_b_i s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_i s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_b s1_b_rc s2_b_rc + s1_ins_a s1_upd_b_data s2_upd_b_data s1_del_b s1_upd_a_tob s1_c s2_c + s0_rep + +### Triggers for EPQ detect serialization failures +# s1 updates, s2 updates, s1 commits, serialization failure +permutation s1_trig_rep_b_u s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rr s2_b_rr + s1_upd_a_data s2_upd_a_data s1_c s2_c + s0_rep +# s1 updates, s2 updates, s1 rolls back, s2 succeeds +permutation s1_trig_rep_b_u s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rr s2_b_rr + s1_upd_a_data s2_upd_a_data s1_r s2_c + s0_rep +# s1 deletes, s2 updates, s1 commits, serialization failure +permutation s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rr s2_b_rr + s1_del_a s2_upd_a_data s1_c s2_c + s0_rep +# s1 deletes, s2 updates, s1 rolls back, s2 succeeds +permutation s1_trig_rep_b_d s1_trig_rep_b_u s1_trig_rep_a_d s1_trig_rep_a_u + s1_ins_a s1_ins_b s1_b_rr s2_b_rr + s1_del_a s2_upd_a_data s1_r s2_c + s0_rep diff --git a/src/test/isolation/specs/eval-plan-qual.spec b/src/test/isolation/specs/eval-plan-qual.spec new file mode 100644 index 0000000..4bb9595 --- /dev/null +++ b/src/test/isolation/specs/eval-plan-qual.spec @@ -0,0 +1,359 @@ +# Tests for the EvalPlanQual mechanism +# +# EvalPlanQual is used in READ COMMITTED isolation level to attempt to +# re-execute UPDATE and DELETE operations against rows that were updated +# by some concurrent transaction. + +setup +{ + CREATE TABLE accounts (accountid text PRIMARY KEY, balance numeric not null); + INSERT INTO accounts VALUES ('checking', 600), ('savings', 600); + + CREATE FUNCTION update_checking(int) RETURNS bool LANGUAGE sql AS $$ + UPDATE accounts SET balance = balance + 1 WHERE accountid = 'checking'; SELECT true;$$; + + CREATE TABLE accounts_ext (accountid text PRIMARY KEY, balance numeric not null, other text); + INSERT INTO accounts_ext VALUES ('checking', 600, 'other'), ('savings', 700, null); + ALTER TABLE accounts_ext ADD COLUMN newcol int DEFAULT 42; + ALTER TABLE accounts_ext ADD COLUMN newcol2 text DEFAULT NULL; + + CREATE TABLE p (a int, b int, c int); + CREATE TABLE c1 () INHERITS (p); + CREATE TABLE c2 () INHERITS (p); + CREATE TABLE c3 () INHERITS (p); + INSERT INTO c1 SELECT 0, a / 3, a % 3 FROM generate_series(0, 9) a; + INSERT INTO c2 SELECT 1, a / 3, a % 3 FROM generate_series(0, 9) a; + INSERT INTO c3 SELECT 2, a / 3, a % 3 FROM generate_series(0, 9) a; + + CREATE TABLE table_a (id integer, value text); + CREATE TABLE table_b (id integer, value text); + INSERT INTO table_a VALUES (1, 'tableAValue'); + INSERT INTO table_b VALUES (1, 'tableBValue'); + + CREATE TABLE jointest AS SELECT generate_series(1,10) AS id, 0 AS data; + CREATE INDEX ON jointest(id); + + CREATE TABLE parttbl (a int, b int, c int) PARTITION BY LIST (a); + CREATE TABLE parttbl1 PARTITION OF parttbl FOR VALUES IN (1); + CREATE TABLE parttbl2 PARTITION OF parttbl FOR VALUES IN (2); + INSERT INTO parttbl VALUES (1, 1, 1); + + CREATE TABLE another_parttbl (a int, b int, c int) PARTITION BY LIST (a); + CREATE TABLE another_parttbl1 PARTITION OF another_parttbl FOR VALUES IN (1); + CREATE TABLE another_parttbl2 PARTITION OF another_parttbl FOR VALUES IN (2); + INSERT INTO another_parttbl VALUES (1, 1, 1); + + CREATE FUNCTION noisy_oper(p_comment text, p_a anynonarray, p_op text, p_b anynonarray) + RETURNS bool LANGUAGE plpgsql AS $$ + DECLARE + r bool; + BEGIN + EXECUTE format('SELECT $1 %s $2', p_op) INTO r USING p_a, p_b; + RAISE NOTICE '%: % % % % %: %', p_comment, pg_typeof(p_a), p_a, p_op, pg_typeof(p_b), p_b, r; + RETURN r; + END;$$; +} + +teardown +{ + DROP TABLE accounts; + DROP FUNCTION update_checking(int); + DROP TABLE accounts_ext; + DROP TABLE p CASCADE; + DROP TABLE table_a, table_b, jointest; + DROP TABLE parttbl; + DROP TABLE another_parttbl; + DROP FUNCTION noisy_oper(text, anynonarray, text, anynonarray) +} + +session s1 +setup { BEGIN ISOLATION LEVEL READ COMMITTED; } +# wx1 then wx2 checks the basic case of re-fetching up-to-date values +step wx1 { UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; } +# wy1 then wy2 checks the case where quals pass then fail +step wy1 { UPDATE accounts SET balance = balance + 500 WHERE accountid = 'checking' RETURNING balance; } + +step wxext1 { UPDATE accounts_ext SET balance = balance - 200 WHERE accountid = 'checking' RETURNING balance; } +step tocds1 { UPDATE accounts SET accountid = 'cds' WHERE accountid = 'checking'; } +step tocdsext1 { UPDATE accounts_ext SET accountid = 'cds' WHERE accountid = 'checking'; } + +# d1 then wx1 checks that update can deal with the updated row vanishing +# wx2 then d1 checks that the delete affects the updated row +# wx2, wx2 then d1 checks that the delete checks the quals correctly (balance too high) +# wx2, d2, then d1 checks that delete handles a vanishing row correctly +step d1 { DELETE FROM accounts WHERE accountid = 'checking' AND balance < 1500 RETURNING balance; } + +# upsert tests are to check writable-CTE cases +step upsert1 { + WITH upsert AS + (UPDATE accounts SET balance = balance + 500 + WHERE accountid = 'savings' + RETURNING accountid) + INSERT INTO accounts SELECT 'savings', 500 + WHERE NOT EXISTS (SELECT 1 FROM upsert); +} + +# tests with table p check inheritance cases: +# readp1/writep1/readp2 tests a bug where nodeLockRows did the wrong thing +# when the first updated tuple was in a non-first child table. +# writep2/returningp1 tests a memory allocation issue +# writep3a/writep3b tests updates touching more than one table + +step readp1 { SELECT tableoid::regclass, ctid, * FROM p WHERE b IN (0, 1) AND c = 0 FOR UPDATE; } +step writep1 { UPDATE p SET b = -1 WHERE a = 1 AND b = 1 AND c = 0; } +step writep2 { UPDATE p SET b = -b WHERE a = 1 AND c = 0; } +step writep3a { UPDATE p SET b = -b WHERE c = 0; } +step c1 { COMMIT; } +step r1 { ROLLBACK; } + +# these tests are meant to exercise EvalPlanQualFetchRowMark, +# ie, handling non-locked tables in an EvalPlanQual recheck + +step partiallock { + SELECT * FROM accounts a1, accounts a2 + WHERE a1.accountid = a2.accountid + FOR UPDATE OF a1; +} +step lockwithvalues { + -- Reference rowmark column that differs in type from targetlist at some attno. + -- See CAHU7rYZo_C4ULsAx_LAj8az9zqgrD8WDd4hTegDTMM1LMqrBsg@mail.gmail.com + SELECT a1.*, v.id FROM accounts a1, (values('checking'::text, 'nan'::text),('savings', 'nan')) v(id, notnumeric) + WHERE a1.accountid = v.id AND v.notnumeric != 'einszwei' + FOR UPDATE OF a1; +} +step partiallock_ext { + SELECT * FROM accounts_ext a1, accounts_ext a2 + WHERE a1.accountid = a2.accountid + FOR UPDATE OF a1; +} + +# these tests exercise EvalPlanQual with a SubLink sub-select (which should be +# unaffected by any EPQ recheck behavior in the outer query); cf bug #14034 + +step updateforss { + UPDATE table_a SET value = 'newTableAValue' WHERE id = 1; + UPDATE table_b SET value = 'newTableBValue' WHERE id = 1; +} + +# these tests exercise EvalPlanQual with conditional InitPlans which +# have not been executed prior to the EPQ + +step updateforcip { + UPDATE table_a SET value = NULL WHERE id = 1; +} + +# these tests exercise mark/restore during EPQ recheck, cf bug #15032 + +step selectjoinforupdate { + set local enable_nestloop to 0; + set local enable_hashjoin to 0; + set local enable_seqscan to 0; + explain (costs off) + select * from jointest a join jointest b on a.id=b.id for update; + select * from jointest a join jointest b on a.id=b.id for update; +} + +# these tests exercise Result plan nodes participating in EPQ + +step selectresultforupdate { + select * from (select 1 as x) ss1 join (select 7 as y) ss2 on true + left join table_a a on a.id = x, jointest jt + where jt.id = y; + explain (verbose, costs off) + select * from (select 1 as x) ss1 join (select 7 as y) ss2 on true + left join table_a a on a.id = x, jointest jt + where jt.id = y for update of jt, ss1, ss2; + select * from (select 1 as x) ss1 join (select 7 as y) ss2 on true + left join table_a a on a.id = x, jointest jt + where jt.id = y for update of jt, ss1, ss2; +} + +# test for EPQ on a partitioned result table + +step simplepartupdate { + update parttbl set a = a; +} + +# test scenarios where update may cause row movement + +step simplepartupdate_route1to2 { + update parttbl set a = 2 where c = 1 returning *; +} + +step simplepartupdate_noroute { + update parttbl set b = 2 where c = 1 returning *; +} + + +session s2 +setup { BEGIN ISOLATION LEVEL READ COMMITTED; } +step wx2 { UPDATE accounts SET balance = balance + 450 WHERE accountid = 'checking' RETURNING balance; } +step wy2 { UPDATE accounts SET balance = balance + 1000 WHERE accountid = 'checking' AND balance < 1000 RETURNING balance; } +step d2 { DELETE FROM accounts WHERE accountid = 'checking'; } + +step upsert2 { + WITH upsert AS + (UPDATE accounts SET balance = balance + 1234 + WHERE accountid = 'savings' + RETURNING accountid) + INSERT INTO accounts SELECT 'savings', 1234 + WHERE NOT EXISTS (SELECT 1 FROM upsert); +} +step wx2_ext { UPDATE accounts_ext SET balance = balance + 450; } +step readp2 { SELECT tableoid::regclass, ctid, * FROM p WHERE b IN (0, 1) AND c = 0 FOR UPDATE; } +step returningp1 { + WITH u AS ( UPDATE p SET b = b WHERE a > 0 RETURNING * ) + SELECT * FROM u; +} +step writep3b { UPDATE p SET b = -b WHERE c = 0; } +step readforss { + SELECT ta.id AS ta_id, ta.value AS ta_value, + (SELECT ROW(tb.id, tb.value) + FROM table_b tb WHERE ta.id = tb.id) AS tb_row + FROM table_a ta + WHERE ta.id = 1 FOR UPDATE OF ta; +} +step updateforcip2 { + UPDATE table_a SET value = COALESCE(value, (SELECT text 'newValue')) WHERE id = 1; +} +step updateforcip3 { + WITH d(val) AS (SELECT text 'newValue' FROM generate_series(1,1)) + UPDATE table_a SET value = COALESCE(value, (SELECT val FROM d)) WHERE id = 1; +} +step wrtwcte { UPDATE table_a SET value = 'tableAValue2' WHERE id = 1; } +step wrjt { UPDATE jointest SET data = 42 WHERE id = 7; } +step complexpartupdate { + with u as (update parttbl set a = a returning parttbl.*) + update parttbl set a = u.a from u; +} + +step complexpartupdate_route_err1 { + with u as (update another_parttbl set a = 1 returning another_parttbl.*) + update parttbl p set a = u.a from u where p.a = u.a and p.c = 1 returning p.*; +} + +step complexpartupdate_route { + with u as (update another_parttbl set a = 1 returning another_parttbl.*) + update parttbl p set a = p.b from u where p.a = u.a and p.c = 1 returning p.*; +} + +step complexpartupdate_doesnt_route { + with u as (update another_parttbl set a = 1 returning another_parttbl.*) + update parttbl p set a = 3 - p.b from u where p.a = u.a and p.c = 1 returning p.*; +} + +# Use writable CTEs to create self-updated rows, that then are +# (updated|deleted). The *fail versions of the tests additionally +# perform an update, via a function, in a different command, to test +# behaviour relating to that. +step updwcte { WITH doup AS (UPDATE accounts SET balance = balance + 1100 WHERE accountid = 'checking' RETURNING *) UPDATE accounts a SET balance = doup.balance + 100 FROM doup RETURNING *; } +step updwctefail { WITH doup AS (UPDATE accounts SET balance = balance + 1100 WHERE accountid = 'checking' RETURNING *, update_checking(999)) UPDATE accounts a SET balance = doup.balance + 100 FROM doup RETURNING *; } +step delwcte { WITH doup AS (UPDATE accounts SET balance = balance + 1100 WHERE accountid = 'checking' RETURNING *) DELETE FROM accounts a USING doup RETURNING *; } +step delwctefail { WITH doup AS (UPDATE accounts SET balance = balance + 1100 WHERE accountid = 'checking' RETURNING *, update_checking(999)) DELETE FROM accounts a USING doup RETURNING *; } + +# Check that nested EPQ works correctly +step wnested2 { + UPDATE accounts SET balance = balance - 1200 + WHERE noisy_oper('upid', accountid, '=', 'checking') + AND noisy_oper('up', balance, '>', 200.0) + AND EXISTS ( + SELECT accountid + FROM accounts_ext ae + WHERE noisy_oper('lock_id', ae.accountid, '=', accounts.accountid) + AND noisy_oper('lock_bal', ae.balance, '>', 200.0) + FOR UPDATE + ); +} + +step c2 { COMMIT; } +step r2 { ROLLBACK; } + +session s3 +setup { BEGIN ISOLATION LEVEL READ COMMITTED; } +step read { SELECT * FROM accounts ORDER BY accountid; } +step read_ext { SELECT * FROM accounts_ext ORDER BY accountid; } +step read_a { SELECT * FROM table_a ORDER BY id; } + +# this test exercises EvalPlanQual with a CTE, cf bug #14328 +step readwcte { + WITH + cte1 AS ( + SELECT id FROM table_b WHERE value = 'tableBValue' + ), + cte2 AS ( + SELECT * FROM table_a + WHERE id = (SELECT id FROM cte1) + FOR UPDATE + ) + SELECT * FROM cte2; +} + +# this test exercises a different CTE misbehavior, cf bug #14870 +step multireadwcte { + WITH updated AS ( + UPDATE table_a SET value = 'tableAValue3' WHERE id = 1 RETURNING id + ) + SELECT (SELECT id FROM updated) AS subid, * FROM updated; +} + +teardown { COMMIT; } + +# test that normal update follows update chains, and reverifies quals +permutation wx1 wx2 c1 c2 read +permutation wy1 wy2 c1 c2 read +permutation wx1 wx2 r1 c2 read +permutation wy1 wy2 r1 c2 read + +# test that deletes follow chains, and if necessary reverifies quals +permutation wx1 d1 wx2 c1 c2 read +permutation wx2 d1 c2 c1 read +permutation wx2 wx2 d1 c2 c1 read +permutation wx2 d2 d1 c2 c1 read +permutation wx1 d1 wx2 r1 c2 read +permutation wx2 d1 r2 c1 read +permutation wx2 wx2 d1 r2 c1 read +permutation wx2 d2 d1 r2 c1 read +permutation d1 wx2 c1 c2 read +permutation d1 wx2 r1 c2 read + +# Check that nested EPQ works correctly +permutation wnested2 c1 c2 read +permutation wx1 wxext1 wnested2 c1 c2 read +permutation wx1 wx1 wxext1 wnested2 c1 c2 read +permutation wx1 wx1 wxext1 wxext1 wnested2 c1 c2 read +permutation wx1 wxext1 wxext1 wnested2 c1 c2 read +permutation wx1 tocds1 wnested2 c1 c2 read +permutation wx1 tocdsext1 wnested2 c1 c2 read + +# test that an update to a self-modified row is ignored when +# previously updated by the same cid +permutation wx1 updwcte c1 c2 read +# test that an update to a self-modified row throws error when +# previously updated by a different cid +permutation wx1 updwctefail c1 c2 read +# test that a delete to a self-modified row is ignored when +# previously updated by the same cid +permutation wx1 delwcte c1 c2 read +# test that a delete to a self-modified row throws error when +# previously updated by a different cid +permutation wx1 delwctefail c1 c2 read + +permutation upsert1 upsert2 c1 c2 read +permutation readp1 writep1 readp2 c1 c2 +permutation writep2 returningp1 c1 c2 +permutation writep3a writep3b c1 c2 +permutation wx2 partiallock c2 c1 read +permutation wx2 lockwithvalues c2 c1 read +permutation wx2_ext partiallock_ext c2 c1 read_ext +permutation updateforss readforss c1 c2 +permutation updateforcip updateforcip2 c1 c2 read_a +permutation updateforcip updateforcip3 c1 c2 read_a +permutation wrtwcte readwcte c1 c2 +permutation wrjt selectjoinforupdate c2 c1 +permutation wrjt selectresultforupdate c2 c1 +permutation wrtwcte multireadwcte c1 c2 + +permutation simplepartupdate complexpartupdate c1 c2 +permutation simplepartupdate_route1to2 complexpartupdate_route_err1 c1 c2 +permutation simplepartupdate_noroute complexpartupdate_route c1 c2 +permutation simplepartupdate_noroute complexpartupdate_doesnt_route c1 c2 diff --git a/src/test/isolation/specs/fk-contention.spec b/src/test/isolation/specs/fk-contention.spec new file mode 100644 index 0000000..f11a1d8 --- /dev/null +++ b/src/test/isolation/specs/fk-contention.spec @@ -0,0 +1,19 @@ +setup +{ + CREATE TABLE foo (a int PRIMARY KEY, b text); + CREATE TABLE bar (a int NOT NULL REFERENCES foo); + INSERT INTO foo VALUES (42); +} + +teardown +{ + DROP TABLE foo, bar; +} + +session s1 +setup { BEGIN; } +step ins { INSERT INTO bar VALUES (42); } +step com { COMMIT; } + +session s2 +step upd { UPDATE foo SET b = 'Hello World'; } diff --git a/src/test/isolation/specs/fk-deadlock.spec b/src/test/isolation/specs/fk-deadlock.spec new file mode 100644 index 0000000..b4970dd --- /dev/null +++ b/src/test/isolation/specs/fk-deadlock.spec @@ -0,0 +1,46 @@ +setup +{ + CREATE TABLE parent ( + parent_key int PRIMARY KEY, + aux text NOT NULL + ); + + CREATE TABLE child ( + child_key int PRIMARY KEY, + parent_key int NOT NULL REFERENCES parent + ); + + INSERT INTO parent VALUES (1, 'foo'); +} + +teardown +{ + DROP TABLE parent, child; +} + +session s1 +setup { BEGIN; SET deadlock_timeout = '100ms'; } +step s1i { INSERT INTO child VALUES (1, 1); } +step s1u { UPDATE parent SET aux = 'bar'; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN; SET deadlock_timeout = '10s'; } +step s2i { INSERT INTO child VALUES (2, 1); } +step s2u { UPDATE parent SET aux = 'baz'; } +step s2c { COMMIT; } + +permutation s1i s1u s1c s2i s2u s2c +permutation s1i s1u s2i s1c s2u s2c +permutation s1i s1u s2i s2u s1c s2c +permutation s1i s2i s1u s1c s2u s2c +permutation s1i s2i s1u s2u s1c s2c +permutation s1i s2i s2u s1u s2c s1c +permutation s1i s2i s2u s2c s1u s1c +permutation s2i s1i s1u s1c s2u s2c +permutation s2i s1i s1u s2u s1c s2c +permutation s2i s1i s2u s1u s2c s1c +permutation s2i s1i s2u s2c s1u s1c +permutation s2i s2u s1i s1u s2c s1c +permutation s2i s2u s1i s2c s1u s1c +permutation s2i s2u s2c s1i s1u s1c diff --git a/src/test/isolation/specs/fk-deadlock2.spec b/src/test/isolation/specs/fk-deadlock2.spec new file mode 100644 index 0000000..c8e0e4e --- /dev/null +++ b/src/test/isolation/specs/fk-deadlock2.spec @@ -0,0 +1,48 @@ +setup +{ + CREATE TABLE A ( + AID integer not null, + Col1 integer, + PRIMARY KEY (AID) + ); + + CREATE TABLE B ( + BID integer not null, + AID integer not null, + Col2 integer, + PRIMARY KEY (BID), + FOREIGN KEY (AID) REFERENCES A(AID) + ); + + INSERT INTO A (AID) VALUES (1); + INSERT INTO B (BID,AID) VALUES (2,1); +} + +teardown +{ + DROP TABLE a, b; +} + +session s1 +setup { BEGIN; SET deadlock_timeout = '100ms'; } +step s1u1 { UPDATE A SET Col1 = 1 WHERE AID = 1; } +step s1u2 { UPDATE B SET Col2 = 1 WHERE BID = 2; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN; SET deadlock_timeout = '10s'; } +step s2u1 { UPDATE B SET Col2 = 1 WHERE BID = 2; } +step s2u2 { UPDATE B SET Col2 = 1 WHERE BID = 2; } +step s2c { COMMIT; } + +permutation s1u1 s1u2 s1c s2u1 s2u2 s2c +permutation s1u1 s1u2 s2u1 s1c s2u2 s2c +permutation s1u1 s2u1 s1u2 s2u2 s2c s1c +permutation s1u1 s2u1 s2u2 s1u2 s2c s1c +permutation s1u1 s2u1 s2u2 s2c s1u2 s1c +permutation s2u1 s1u1 s1u2 s2u2 s2c s1c +permutation s2u1 s1u1 s2u2 s1u2 s2c s1c +permutation s2u1 s1u1 s2u2 s2c s1u2 s1c +permutation s2u1 s2u2 s1u1 s1u2 s2c s1c +permutation s2u1 s2u2 s1u1 s2c s1u2 s1c +permutation s2u1 s2u2 s2c s1u1 s1u2 s1c diff --git a/src/test/isolation/specs/fk-partitioned-1.spec b/src/test/isolation/specs/fk-partitioned-1.spec new file mode 100644 index 0000000..f71ee5c --- /dev/null +++ b/src/test/isolation/specs/fk-partitioned-1.spec @@ -0,0 +1,45 @@ +# Verify that cloning a foreign key constraint to a partition ensures +# that referenced values exist, even if they're being concurrently +# deleted. +setup { +drop table if exists ppk, pfk, pfk1; + create table ppk (a int primary key) partition by list (a); + create table ppk1 partition of ppk for values in (1); + insert into ppk values (1); + create table pfk (a int references ppk) partition by list (a); + create table pfk1 (a int not null); + insert into pfk1 values (1); +} + +session s1 +step s1b { begin; } +step s1d { delete from ppk1 where a = 1; } +step s1c { commit; } + +session s2 +step s2b { begin; } +step s2a { alter table pfk attach partition pfk1 for values in (1); } +step s2c { commit; } + +teardown { drop table ppk, pfk, pfk1; } + +permutation s1b s1d s1c s2b s2a s2c +permutation s1b s1d s2b s1c s2a s2c +permutation s1b s1d s2b s2a s1c s2c +#permutation s1b s1d s2b s2a s2c s1c +permutation s1b s2b s1d s1c s2a s2c +permutation s1b s2b s1d s2a s1c s2c +#permutation s1b s2b s1d s2a s2c s1c +#permutation s1b s2b s2a s1d s1c s2c +permutation s1b s2b s2a s1d s2c s1c +permutation s1b s2b s2a s2c s1d s1c +permutation s2b s1b s1d s1c s2a s2c +permutation s2b s1b s1d s2a s1c s2c +#permutation s2b s1b s1d s2a s2c s1c +#permutation s2b s1b s2a s1d s1c s2c +permutation s2b s1b s2a s1d s2c s1c +permutation s2b s1b s2a s2c s1d s1c +#permutation s2b s2a s1b s1d s1c s2c +permutation s2b s2a s1b s1d s2c s1c +permutation s2b s2a s1b s2c s1d s1c +permutation s2b s2a s2c s1b s1d s1c diff --git a/src/test/isolation/specs/fk-partitioned-2.spec b/src/test/isolation/specs/fk-partitioned-2.spec new file mode 100644 index 0000000..209ad59 --- /dev/null +++ b/src/test/isolation/specs/fk-partitioned-2.spec @@ -0,0 +1,29 @@ +# Make sure that FKs referencing partitioned tables actually work. +setup { + drop table if exists ppk, pfk, pfk1; + create table ppk (a int primary key) partition by list (a); + create table ppk1 partition of ppk for values in (1); + insert into ppk values (1); + create table pfk (a int references ppk) partition by list (a); + create table pfk1 partition of pfk for values in (1); +} + +session s1 +step s1b { begin; } +step s1d { delete from ppk where a = 1; } +step s1c { commit; } + +session s2 +step s2b { begin; } +step s2bs { begin isolation level serializable; select 1; } +step s2i { insert into pfk values (1); } +step s2c { commit; } + +teardown { drop table ppk, pfk, pfk1; } + +permutation s1b s1d s2b s2i s1c s2c +permutation s1b s1d s2bs s2i s1c s2c +permutation s1b s2b s1d s2i s1c s2c +permutation s1b s2bs s1d s2i s1c s2c +permutation s1b s2b s2i s1d s2c s1c +permutation s1b s2bs s2i s1d s2c s1c diff --git a/src/test/isolation/specs/freeze-the-dead.spec b/src/test/isolation/specs/freeze-the-dead.spec new file mode 100644 index 0000000..6c34904 --- /dev/null +++ b/src/test/isolation/specs/freeze-the-dead.spec @@ -0,0 +1,56 @@ +# Test for interactions of tuple freezing with dead, as well as recently-dead +# tuples using multixacts via FOR KEY SHARE. +setup +{ + CREATE TABLE tab_freeze ( + id int PRIMARY KEY, + name char(3), + x int); + INSERT INTO tab_freeze VALUES (1, '111', 0); + INSERT INTO tab_freeze VALUES (3, '333', 0); +} + +teardown +{ + DROP TABLE tab_freeze; +} + +session s1 +step s1_begin { BEGIN; } +step s1_update { UPDATE tab_freeze SET x = x + 1 WHERE id = 3; } +step s1_commit { COMMIT; } +step s1_selectone { + BEGIN; + SET LOCAL enable_seqscan = false; + SET LOCAL enable_bitmapscan = false; + SELECT * FROM tab_freeze WHERE id = 3; + COMMIT; +} +step s1_selectall { SELECT * FROM tab_freeze ORDER BY name, id; } + +session s2 +step s2_begin { BEGIN; } +step s2_key_share { SELECT id FROM tab_freeze WHERE id = 3 FOR KEY SHARE; } +step s2_commit { COMMIT; } +step s2_vacuum { VACUUM FREEZE tab_freeze; } + +session s3 +step s3_begin { BEGIN; } +step s3_key_share { SELECT id FROM tab_freeze WHERE id = 3 FOR KEY SHARE; } +step s3_commit { COMMIT; } + +# This permutation verifies that a previous bug +# https://postgr.es/m/E5711E62-8FDF-4DCA-A888-C200BF6B5742@amazon.com +# https://postgr.es/m/20171102112019.33wb7g5wp4zpjelu@alap3.anarazel.de +# is not reintroduced. We used to make wrong pruning / freezing +# decision for multixacts, which could lead to a) broken hot chains b) +# dead rows being revived. +permutation s1_begin s2_begin s3_begin # start transactions + s1_update s2_key_share s3_key_share # have xmax be a multi with an updater, updater being oldest xid + s1_update # create additional row version that has multis + s1_commit s2_commit # commit both updater and share locker + s2_vacuum # due to bug in freezing logic, we used to *not* prune updated row, and then froze it + s1_selectone # if hot chain is broken, the row can't be found via index scan + s3_commit # commit remaining open xact + s2_vacuum # pruning / freezing in broken hot chains would unset xmax, reviving rows + s1_selectall # show borkedness diff --git a/src/test/isolation/specs/horizons.spec b/src/test/isolation/specs/horizons.spec new file mode 100644 index 0000000..d5239ff --- /dev/null +++ b/src/test/isolation/specs/horizons.spec @@ -0,0 +1,169 @@ +# Test that pruning and vacuuming pay attention to concurrent sessions +# in the right way. For normal relations that means that rows cannot +# be pruned away if there's an older snapshot, in contrast to that +# temporary tables should nearly always be prunable. +# +# NB: Think hard before adding a test showing that rows in permanent +# tables get pruned - it's quite likely that it'd be racy, e.g. due to +# an autovacuum worker holding a snapshot. + +setup { + CREATE OR REPLACE FUNCTION explain_json(p_query text) + RETURNS json + LANGUAGE plpgsql AS $$ + DECLARE + v_ret json; + BEGIN + EXECUTE p_query INTO STRICT v_ret; + RETURN v_ret; + END;$$; +} + +teardown { + DROP FUNCTION explain_json(text); +} + +session lifeline + +# Start a transaction, force a snapshot to be held +step ll_start +{ + BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; + SELECT 1; +} + +step ll_commit { COMMIT; } + + +session pruner + +setup +{ + SET enable_seqscan = false; + SET enable_indexscan = false; + SET enable_bitmapscan = false; +} + +step pruner_create_temp +{ + CREATE TEMPORARY TABLE horizons_tst (data int unique) WITH (autovacuum_enabled = off); + INSERT INTO horizons_tst(data) VALUES(1),(2); +} + +step pruner_create_perm +{ + CREATE TABLE horizons_tst (data int unique) WITH (autovacuum_enabled = off); + INSERT INTO horizons_tst(data) VALUES(1),(2); +} + +# Temp tables cannot be dropped in the teardown, so just always do so +# as part of the permutation +step pruner_drop +{ + DROP TABLE horizons_tst; +} + +step pruner_delete +{ + DELETE FROM horizons_tst; +} + +step pruner_begin { BEGIN; } +step pruner_commit { COMMIT; } + +step pruner_vacuum +{ + VACUUM horizons_tst; +} + +# Show the heap fetches of an ordered index-only-scan (other plans +# have been forbidden above) - that tells us how many non-killed leaf +# entries there are. +step pruner_query +{ + SELECT explain_json($$ + EXPLAIN (FORMAT json, BUFFERS, ANALYZE) + SELECT * FROM horizons_tst ORDER BY data;$$)->0->'Plan'->'Heap Fetches'; +} + +# Verify that the query plan still is an IOS +step pruner_query_plan +{ + EXPLAIN (COSTS OFF) SELECT * FROM horizons_tst ORDER BY data; +} + + +# Show that with a permanent relation deleted rows cannot be pruned +# away if there's a concurrent session still seeing the rows. +permutation + pruner_create_perm + ll_start + pruner_query_plan + # Run query that could do pruning twice, first has chance to prune, + # second would not perform heap fetches if first query did. + pruner_query + pruner_query + pruner_delete + pruner_query + pruner_query + ll_commit + pruner_drop + +# Show that with a temporary relation deleted rows can be pruned away, +# even if there's a concurrent session with a snapshot from before the +# deletion. That's safe because the session with the older snapshot +# cannot access the temporary table. +permutation + pruner_create_temp + ll_start + pruner_query_plan + pruner_query + pruner_query + pruner_delete + pruner_query + pruner_query + ll_commit + pruner_drop + +# Verify that pruning in temporary relations doesn't remove rows still +# visible in the current session +permutation + pruner_create_temp + ll_start + pruner_query + pruner_query + pruner_begin + pruner_delete + pruner_query + pruner_query + ll_commit + pruner_commit + pruner_drop + +# Show that vacuum cannot remove deleted rows still visible to another +# session's snapshot, when accessing a permanent table. +permutation + pruner_create_perm + ll_start + pruner_query + pruner_query + pruner_delete + pruner_vacuum + pruner_query + pruner_query + ll_commit + pruner_drop + +# Show that vacuum can remove deleted rows still visible to another +# session's snapshot, when accessing a temporary table. +permutation + pruner_create_temp + ll_start + pruner_query + pruner_query + pruner_delete + pruner_vacuum + pruner_query + pruner_query + ll_commit + pruner_drop diff --git a/src/test/isolation/specs/index-only-scan.spec b/src/test/isolation/specs/index-only-scan.spec new file mode 100644 index 0000000..4e4171c --- /dev/null +++ b/src/test/isolation/specs/index-only-scan.spec @@ -0,0 +1,46 @@ +# index-only scan test +# +# This test tries to expose problems with the interaction between index-only +# scans and SSI. +# +# Any overlap between the transactions must cause a serialization failure. + +setup +{ + CREATE TABLE tabx (id int NOT NULL); + INSERT INTO tabx SELECT generate_series(1,10000); + ALTER TABLE tabx ADD PRIMARY KEY (id); + CREATE TABLE taby (id int NOT NULL); + INSERT INTO taby SELECT generate_series(1,10000); + ALTER TABLE taby ADD PRIMARY KEY (id); +} +setup { VACUUM FREEZE ANALYZE tabx; } +setup { VACUUM FREEZE ANALYZE taby; } + +teardown +{ + DROP TABLE tabx; + DROP TABLE taby; +} + +session s1 +setup +{ + BEGIN ISOLATION LEVEL SERIALIZABLE; + SET LOCAL seq_page_cost = 0.1; + SET LOCAL random_page_cost = 0.1; + SET LOCAL cpu_tuple_cost = 0.03; +} +step rxwy1 { DELETE FROM taby WHERE id = (SELECT min(id) FROM tabx); } +step c1 { COMMIT; } + +session s2 +setup +{ + BEGIN ISOLATION LEVEL SERIALIZABLE; + SET LOCAL seq_page_cost = 0.1; + SET LOCAL random_page_cost = 0.1; + SET LOCAL cpu_tuple_cost = 0.03; +} +step rywx2 { DELETE FROM tabx WHERE id = (SELECT min(id) FROM taby); } +step c2 { COMMIT; } diff --git a/src/test/isolation/specs/inherit-temp.spec b/src/test/isolation/specs/inherit-temp.spec new file mode 100644 index 0000000..644f919 --- /dev/null +++ b/src/test/isolation/specs/inherit-temp.spec @@ -0,0 +1,78 @@ +# Tests for inheritance trees with temporary relations +# +# Inheritance trees are allowed to mix relations with different persistence +# as long as a persistent child relation does not try to inherit from a +# temporary parent. This checks several scenarios with SELECT, INSERT, UPDATE, +# DELETE and TRUNCATE. Any temporary relation inheriting from the same +# persistent parent should be isolated and handled only in its own session. + +setup +{ + CREATE TABLE inh_parent (a int); +} + +teardown +{ + DROP TABLE inh_parent; +} + +# Session 1 executes actions which act directly on both the parent and +# its child. Abbreviation "c" is used for queries working on the child +# and "p" on the parent. +session s1 +setup +{ + CREATE TEMPORARY TABLE inh_temp_child_s1 () INHERITS (inh_parent); +} +step s1_begin { BEGIN; } +step s1_truncate_p { TRUNCATE inh_parent; } +step s1_select_p { SELECT a FROM inh_parent; } +step s1_select_c { SELECT a FROM inh_temp_child_s1; } +step s1_insert_p { INSERT INTO inh_parent VALUES (1), (2); } +step s1_insert_c { INSERT INTO inh_temp_child_s1 VALUES (3), (4); } +step s1_update_p { UPDATE inh_parent SET a = 11 WHERE a = 1; } +step s1_update_c { UPDATE inh_parent SET a = 13 WHERE a IN (3, 5); } +step s1_delete_p { DELETE FROM inh_parent WHERE a = 2; } +step s1_delete_c { DELETE FROM inh_parent WHERE a IN (4, 6); } +step s1_commit { COMMIT; } +teardown +{ + DROP TABLE inh_temp_child_s1; +} + +# Session 2 executes actions on the parent which act only on the child. +session s2 +setup +{ + CREATE TEMPORARY TABLE inh_temp_child_s2 () INHERITS (inh_parent); +} +step s2_truncate_p { TRUNCATE inh_parent; } +step s2_select_p { SELECT a FROM inh_parent; } +step s2_select_c { SELECT a FROM inh_temp_child_s2; } +step s2_insert_c { INSERT INTO inh_temp_child_s2 VALUES (5), (6); } +step s2_update_c { UPDATE inh_parent SET a = 15 WHERE a IN (3, 5); } +step s2_delete_c { DELETE FROM inh_parent WHERE a IN (4, 6); } +teardown +{ + DROP TABLE inh_temp_child_s2; +} + +# Check INSERT behavior across sessions +permutation s1_insert_p s1_insert_c s2_insert_c s1_select_p s1_select_c s2_select_p s2_select_c + +# Check UPDATE behavior across sessions +permutation s1_insert_p s1_insert_c s2_insert_c s1_update_p s1_update_c s1_select_p s1_select_c s2_select_p s2_select_c +permutation s1_insert_p s1_insert_c s2_insert_c s2_update_c s1_select_p s1_select_c s2_select_p s2_select_c + +# Check DELETE behavior across sessions +permutation s1_insert_p s1_insert_c s2_insert_c s1_delete_p s1_delete_c s1_select_p s1_select_c s2_select_p s2_select_c +permutation s1_insert_p s1_insert_c s2_insert_c s2_delete_c s1_select_p s1_select_c s2_select_p s2_select_c + +# Check TRUNCATE behavior across sessions +permutation s1_insert_p s1_insert_c s2_insert_c s1_truncate_p s1_select_p s1_select_c s2_select_p s2_select_c +permutation s1_insert_p s1_insert_c s2_insert_c s2_truncate_p s1_select_p s1_select_c s2_select_p s2_select_c + +# TRUNCATE on a parent tree does not block access to temporary child relation +# of another session, and blocks when scanning the parent. +permutation s1_insert_p s1_insert_c s2_insert_c s1_begin s1_truncate_p s2_select_p s1_commit +permutation s1_insert_p s1_insert_c s2_insert_c s1_begin s1_truncate_p s2_select_c s1_commit diff --git a/src/test/isolation/specs/insert-conflict-do-nothing-2.spec b/src/test/isolation/specs/insert-conflict-do-nothing-2.spec new file mode 100644 index 0000000..825b7d6 --- /dev/null +++ b/src/test/isolation/specs/insert-conflict-do-nothing-2.spec @@ -0,0 +1,34 @@ +# INSERT...ON CONFLICT DO NOTHING test with multiple rows +# in higher isolation levels + +setup +{ + CREATE TABLE ints (key int, val text, PRIMARY KEY (key) INCLUDE (val)); +} + +teardown +{ + DROP TABLE ints; +} + +session s1 +step beginrr1 { BEGIN ISOLATION LEVEL REPEATABLE READ; } +step begins1 { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step donothing1 { INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; } +step c1 { COMMIT; } +step show { SELECT * FROM ints; } + +session s2 +step beginrr2 { BEGIN ISOLATION LEVEL REPEATABLE READ; } +step begins2 { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step donothing2 { INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING; } +step c2 { COMMIT; } + +permutation beginrr1 beginrr2 donothing1 c1 donothing2 c2 show +permutation beginrr1 beginrr2 donothing2 c2 donothing1 c1 show +permutation beginrr1 beginrr2 donothing1 donothing2 c1 c2 show +permutation beginrr1 beginrr2 donothing2 donothing1 c2 c1 show +permutation begins1 begins2 donothing1 c1 donothing2 c2 show +permutation begins1 begins2 donothing2 c2 donothing1 c1 show +permutation begins1 begins2 donothing1 donothing2 c1 c2 show +permutation begins1 begins2 donothing2 donothing1 c2 c1 show diff --git a/src/test/isolation/specs/insert-conflict-do-nothing.spec b/src/test/isolation/specs/insert-conflict-do-nothing.spec new file mode 100644 index 0000000..b0e6a37 --- /dev/null +++ b/src/test/isolation/specs/insert-conflict-do-nothing.spec @@ -0,0 +1,40 @@ +# INSERT...ON CONFLICT DO NOTHING test +# +# This test tries to expose problems with the interaction between concurrent +# sessions during INSERT...ON CONFLICT DO NOTHING. +# +# The convention here is that session 1 always ends up inserting, and session 2 +# always ends up doing nothing. + +setup +{ + CREATE TABLE ints (key int primary key, val text); +} + +teardown +{ + DROP TABLE ints; +} + +session s1 +setup +{ + BEGIN ISOLATION LEVEL READ COMMITTED; +} +step donothing1 { INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; } +step c1 { COMMIT; } +step a1 { ABORT; } + +session s2 +setup +{ + BEGIN ISOLATION LEVEL READ COMMITTED; +} +step donothing2 { INSERT INTO ints(key, val) VALUES(1, 'donothing2') ON CONFLICT DO NOTHING; } +step select2 { SELECT * FROM ints; } +step c2 { COMMIT; } + +# Regular case where one session block-waits on another to determine if it +# should proceed with an insert or do nothing. +permutation donothing1 donothing2 c1 select2 c2 +permutation donothing1 donothing2 a1 select2 c2 diff --git a/src/test/isolation/specs/insert-conflict-do-update-2.spec b/src/test/isolation/specs/insert-conflict-do-update-2.spec new file mode 100644 index 0000000..8a7c546 --- /dev/null +++ b/src/test/isolation/specs/insert-conflict-do-update-2.spec @@ -0,0 +1,40 @@ +# INSERT...ON CONFLICT DO UPDATE test +# +# This test shows a plausible scenario in which the user might wish to UPDATE a +# value that is also constrained by the unique index that is the arbiter of +# whether the alternative path should be taken. + +setup +{ + CREATE TABLE upsert (key text not null, payload text); + CREATE UNIQUE INDEX ON upsert(lower(key)) INCLUDE (payload); +} + +teardown +{ + DROP TABLE upsert; +} + +session s1 +setup +{ + BEGIN ISOLATION LEVEL READ COMMITTED; +} +step insert1 { INSERT INTO upsert(key, payload) VALUES('FooFoo', 'insert1') ON CONFLICT (lower(key)) DO UPDATE set key = EXCLUDED.key, payload = upsert.payload || ' updated by insert1'; } +step c1 { COMMIT; } +step a1 { ABORT; } + +session s2 +setup +{ + BEGIN ISOLATION LEVEL READ COMMITTED; +} +step insert2 { INSERT INTO upsert(key, payload) VALUES('FOOFOO', 'insert2') ON CONFLICT (lower(key)) DO UPDATE set key = EXCLUDED.key, payload = upsert.payload || ' updated by insert2'; } +step select2 { SELECT * FROM upsert; } +step c2 { COMMIT; } + +# One session (session 2) block-waits on another (session 1) to determine if it +# should proceed with an insert or update. The user can still usefully UPDATE +# a column constrained by a unique index, as the example illustrates. +permutation insert1 insert2 c1 select2 c2 +permutation insert1 insert2 a1 select2 c2 diff --git a/src/test/isolation/specs/insert-conflict-do-update-3.spec b/src/test/isolation/specs/insert-conflict-do-update-3.spec new file mode 100644 index 0000000..df67954 --- /dev/null +++ b/src/test/isolation/specs/insert-conflict-do-update-3.spec @@ -0,0 +1,69 @@ +# INSERT...ON CONFLICT DO UPDATE test +# +# Other INSERT...ON CONFLICT DO UPDATE isolation tests illustrate the "MVCC +# violation" added to facilitate the feature, whereby a +# not-visible-to-our-snapshot tuple can be updated by our command all the same. +# This is generally needed to provide a guarantee of a successful INSERT or +# UPDATE in READ COMMITTED mode. This MVCC violation is quite distinct from +# the putative "MVCC violation" that has existed in PostgreSQL for many years, +# the EvalPlanQual() mechanism, because that mechanism always starts from a +# tuple that is visible to the command's MVCC snapshot. This test illustrates +# a slightly distinct user-visible consequence of the same MVCC violation +# generally associated with INSERT...ON CONFLICT DO UPDATE. The impact of the +# MVCC violation goes a little beyond updating MVCC-invisible tuples. +# +# With INSERT...ON CONFLICT DO UPDATE, the UPDATE predicate is only evaluated +# once, on this conclusively-locked tuple, and not any other version of the +# same tuple. It is therefore possible (in READ COMMITTED mode) that the +# predicate "fail to be satisfied" according to the command's MVCC snapshot. +# It might simply be that there is no row version visible, but it's also +# possible that there is some row version visible, but only as a version that +# doesn't satisfy the predicate. If, however, the conclusively-locked version +# satisfies the predicate, that's good enough, and the tuple is updated. The +# MVCC-snapshot-visible row version is denied the opportunity to prevent the +# UPDATE from taking place, because we don't walk the UPDATE chain in the usual +# way. + +setup +{ + CREATE TABLE colors (key int4 PRIMARY KEY, color text, is_active boolean); + INSERT INTO colors (key, color, is_active) VALUES(1, 'Red', false); + INSERT INTO colors (key, color, is_active) VALUES(2, 'Green', false); + INSERT INTO colors (key, color, is_active) VALUES(3, 'Blue', false); +} + +teardown +{ + DROP TABLE colors; +} + +session s1 +setup +{ + BEGIN ISOLATION LEVEL READ COMMITTED; +} +step insert1 { + WITH t AS ( + INSERT INTO colors(key, color, is_active) + VALUES(1, 'Brown', true), (2, 'Gray', true) + ON CONFLICT (key) DO UPDATE + SET color = EXCLUDED.color + WHERE colors.is_active) + SELECT * FROM colors ORDER BY key;} +step select1surprise { SELECT * FROM colors ORDER BY key; } +step c1 { COMMIT; } + +session s2 +setup +{ + BEGIN ISOLATION LEVEL READ COMMITTED; +} +step update2 { UPDATE colors SET is_active = true WHERE key = 1; } +step c2 { COMMIT; } + +# Perhaps surprisingly, the session 1 MVCC-snapshot-visible tuple (the tuple +# with the pre-populated color 'Red') is denied the opportunity to prevent the +# UPDATE from taking place -- only the conclusively-locked tuple version +# matters, and so the tuple with key value 1 was updated to 'Brown' (but not +# tuple with key value 2, since nothing changed there): +permutation update2 insert1 c2 select1surprise c1 diff --git a/src/test/isolation/specs/insert-conflict-do-update.spec b/src/test/isolation/specs/insert-conflict-do-update.spec new file mode 100644 index 0000000..62cdafd --- /dev/null +++ b/src/test/isolation/specs/insert-conflict-do-update.spec @@ -0,0 +1,39 @@ +# INSERT...ON CONFLICT DO UPDATE test +# +# This test tries to expose problems with the interaction between concurrent +# sessions. + +setup +{ + CREATE TABLE upsert (key int primary key, val text); +} + +teardown +{ + DROP TABLE upsert; +} + +session s1 +setup +{ + BEGIN ISOLATION LEVEL READ COMMITTED; +} +step insert1 { INSERT INTO upsert(key, val) VALUES(1, 'insert1') ON CONFLICT (key) DO UPDATE set val = upsert.val || ' updated by insert1'; } +step c1 { COMMIT; } +step a1 { ABORT; } + +session s2 +setup +{ + BEGIN ISOLATION LEVEL READ COMMITTED; +} +step insert2 { INSERT INTO upsert(key, val) VALUES(1, 'insert2') ON CONFLICT (key) DO UPDATE set val = upsert.val || ' updated by insert2'; } +step select2 { SELECT * FROM upsert; } +step c2 { COMMIT; } + +# One session (session 2) block-waits on another (session 1) to determine if it +# should proceed with an insert or update. Notably, this entails updating a +# tuple while there is no version of that tuple visible to the updating +# session's snapshot. This is permitted only in READ COMMITTED mode. +permutation insert1 insert2 c1 select2 c2 +permutation insert1 insert2 a1 select2 c2 diff --git a/src/test/isolation/specs/insert-conflict-specconflict.spec b/src/test/isolation/specs/insert-conflict-specconflict.spec new file mode 100644 index 0000000..0d55a01 --- /dev/null +++ b/src/test/isolation/specs/insert-conflict-specconflict.spec @@ -0,0 +1,259 @@ +# INSERT ... ON CONFLICT test verifying that speculative insertion +# failures are handled +# +# Does this by using advisory locks controlling progress of +# insertions. By waiting when building the index keys, it's possible +# to schedule concurrent INSERT ON CONFLICTs so that there will always +# be a speculative conflict. + +setup +{ + CREATE OR REPLACE FUNCTION blurt_and_lock_123(text) RETURNS text IMMUTABLE LANGUAGE plpgsql AS $$ + BEGIN + RAISE NOTICE 'blurt_and_lock_123() called for % in session %', $1, current_setting('spec.session')::int; + + -- depending on lock state, wait for lock 2 or 3 + IF pg_try_advisory_xact_lock(current_setting('spec.session')::int, 1) THEN + RAISE NOTICE 'acquiring advisory lock on 2'; + PERFORM pg_advisory_xact_lock(current_setting('spec.session')::int, 2); + ELSE + RAISE NOTICE 'acquiring advisory lock on 3'; + PERFORM pg_advisory_xact_lock(current_setting('spec.session')::int, 3); + END IF; + RETURN $1; + END;$$; + + CREATE OR REPLACE FUNCTION blurt_and_lock_4(text) RETURNS text IMMUTABLE LANGUAGE plpgsql AS $$ + BEGIN + RAISE NOTICE 'blurt_and_lock_4() called for % in session %', $1, current_setting('spec.session')::int; + RAISE NOTICE 'acquiring advisory lock on 4'; + PERFORM pg_advisory_xact_lock(current_setting('spec.session')::int, 4); + RETURN $1; + END;$$; + + CREATE OR REPLACE FUNCTION ctoast_large_val() RETURNS TEXT LANGUAGE SQL AS 'select array_agg(md5(g::text))::text from generate_series(1, 256) g'; + + CREATE TABLE upserttest(key text, data text); + + CREATE UNIQUE INDEX upserttest_key_uniq_idx ON upserttest((blurt_and_lock_123(key))); +} + +teardown +{ + DROP TABLE upserttest; +} + +session controller +setup +{ + SET default_transaction_isolation = 'read committed'; +} +step controller_locks {SELECT pg_advisory_lock(sess, lock), sess, lock FROM generate_series(1, 2) a(sess), generate_series(1,3) b(lock);} +step controller_unlock_1_1 { SELECT pg_advisory_unlock(1, 1); } +step controller_unlock_2_1 { SELECT pg_advisory_unlock(2, 1); } +step controller_unlock_1_2 { SELECT pg_advisory_unlock(1, 2); } +step controller_unlock_2_2 { SELECT pg_advisory_unlock(2, 2); } +step controller_unlock_1_3 { SELECT pg_advisory_unlock(1, 3); } +step controller_unlock_2_3 { SELECT pg_advisory_unlock(2, 3); } +step controller_lock_2_4 { SELECT pg_advisory_lock(2, 4); } +step controller_unlock_2_4 { SELECT pg_advisory_unlock(2, 4); } +step controller_show {SELECT * FROM upserttest; } +step controller_show_count {SELECT COUNT(*) FROM upserttest; } +step controller_print_speculative_locks { + SELECT pa.application_name, locktype, mode, granted + FROM pg_locks pl JOIN pg_stat_activity pa USING (pid) + WHERE + locktype IN ('spectoken', 'transactionid') + AND pa.datname = current_database() + AND pa.application_name LIKE 'isolation/insert-conflict-specconflict/s%' + ORDER BY 1, 2, 3, 4; +} + +session s1 +setup +{ + SET default_transaction_isolation = 'read committed'; + SET spec.session = 1; +} +step s1_begin { BEGIN; } +step s1_create_non_unique_index { CREATE INDEX upserttest_key_idx ON upserttest((blurt_and_lock_4(key))); } +step s1_confirm_index_order { SELECT 'upserttest_key_uniq_idx'::regclass::int8 < 'upserttest_key_idx'::regclass::int8; } +step s1_upsert { INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s1') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s1'; } +step s1_insert_toast { INSERT INTO upserttest VALUES('k2', ctoast_large_val()) ON CONFLICT DO NOTHING; } +step s1_commit { COMMIT; } +step s1_noop { } + +session s2 +setup +{ + SET default_transaction_isolation = 'read committed'; + SET spec.session = 2; +} +step s2_begin { BEGIN; } +step s2_upsert { INSERT INTO upserttest(key, data) VALUES('k1', 'inserted s2') ON CONFLICT (blurt_and_lock_123(key)) DO UPDATE SET data = upserttest.data || ' with conflict update s2'; } +step s2_insert_toast { INSERT INTO upserttest VALUES('k2', ctoast_large_val()) ON CONFLICT DO NOTHING; } +step s2_commit { COMMIT; } +step s2_noop { } + +# Test that speculative locks are correctly acquired and released, s2 +# inserts, s1 updates. +permutation + # acquire a number of locks, to control execution flow - the + # blurt_and_lock_123 function acquires advisory locks that allow us to + # continue after a) the optimistic conflict probe b) after the + # insertion of the speculative tuple. + controller_locks + controller_show + s1_upsert s2_upsert + controller_show + # Switch both sessions to wait on the other lock next time (the speculative insertion) + controller_unlock_1_1 controller_unlock_2_1 + # Allow both sessions to continue + controller_unlock_1_3 controller_unlock_2_3 + controller_show + # Allow the second session to finish insertion + controller_unlock_2_2 + # This should now show a successful insertion + controller_show + # Allow the first session to finish insertion + controller_unlock_1_2 + # This should now show a successful UPSERT + controller_show + +# Test that speculative locks are correctly acquired and released, s1 +# inserts, s2 updates. +permutation + # acquire a number of locks, to control execution flow - the + # blurt_and_lock_123 function acquires advisory locks that allow us to + # continue after a) the optimistic conflict probe b) after the + # insertion of the speculative tuple. + controller_locks + controller_show + s1_upsert s2_upsert + controller_show + # Switch both sessions to wait on the other lock next time (the speculative insertion) + controller_unlock_1_1 controller_unlock_2_1 + # Allow both sessions to continue + controller_unlock_1_3 controller_unlock_2_3 + controller_show + # Allow the first session to finish insertion + controller_unlock_1_2 + # This should now show a successful insertion + controller_show + # Allow the second session to finish insertion + controller_unlock_2_2 + # This should now show a successful UPSERT + controller_show + +# Test that speculatively inserted toast rows do not cause conflicts. +# s1 inserts successfully, s2 does not. +permutation + # acquire a number of locks, to control execution flow - the + # blurt_and_lock_123 function acquires advisory locks that allow us to + # continue after a) the optimistic conflict probe b) after the + # insertion of the speculative tuple. + controller_locks + controller_show + s1_insert_toast s2_insert_toast + controller_show + # Switch both sessions to wait on the other lock next time (the speculative insertion) + controller_unlock_1_1 controller_unlock_2_1 + # Allow both sessions to continue + controller_unlock_1_3 controller_unlock_2_3 + controller_show + # Allow the first session to finish insertion + controller_unlock_1_2 + # This should now show that 1 additional tuple was inserted successfully + controller_show_count + # Allow the second session to finish insertion and kill the speculatively inserted tuple + controller_unlock_2_2 + # This should show the same number of tuples as before s2 inserted + controller_show_count + +# Test that speculative locks are correctly acquired and released, s2 +# inserts, s1 updates. With the added complication that transactions +# don't immediately commit. +permutation + # acquire a number of locks, to control execution flow - the + # blurt_and_lock_123 function acquires advisory locks that allow us to + # continue after a) the optimistic conflict probe b) after the + # insertion of the speculative tuple. + controller_locks + controller_show + s1_begin s2_begin + s1_upsert s2_upsert + controller_show + # Switch both sessions to wait on the other lock next time (the speculative insertion) + controller_unlock_1_1 controller_unlock_2_1 + # Allow both sessions to continue + controller_unlock_1_3 controller_unlock_2_3 + controller_show + # Allow the first session to finish insertion + controller_unlock_1_2 + # But the change isn't visible yet, nor should the second session continue + controller_show + # Allow the second session to finish insertion, but it's blocked + controller_unlock_2_2 + controller_show + # But committing should unblock + s1_commit + controller_show + s2_commit + controller_show + +# Test that speculative wait is performed if a session sees a speculatively +# inserted tuple. A speculatively inserted tuple is one which has been inserted +# both into the table and the unique index but has yet to *complete* the +# speculative insertion +permutation + # acquire a number of advisory locks to control execution flow - the + # blurt_and_lock_123 function acquires advisory locks that allow us to + # continue after a) the optimistic conflict probe and b) after the + # insertion of the speculative tuple. + # blurt_and_lock_4 acquires an advisory lock which allows us to pause + # execution c) before completing the speculative insertion + + # create the second index here to avoid affecting the other + # permutations. + s1_create_non_unique_index + # confirm that the insertion into the unique index will happen first + s1_confirm_index_order + controller_locks + controller_show + s2_begin + # Both sessions wait on advisory locks + # (but don't show s2_upsert as complete till we've seen all of s1's notices) + s1_upsert s2_upsert (s1_upsert notices 10) + controller_show + # Switch both sessions to wait on the other lock next time (the speculative insertion) + controller_unlock_1_1 controller_unlock_2_1 + # Allow both sessions to do the optimistic conflict probe and do the + # speculative insertion into the table + # They will then be waiting on another advisory lock when they attempt to + # update the index + controller_unlock_1_3 controller_unlock_2_3 + controller_show + # take lock to block second session after inserting in unique index but + # before completing the speculative insert + controller_lock_2_4 + # Allow the second session to move forward + controller_unlock_2_2 + # This should still not show a successful insertion + controller_show + # Allow the first session to continue, it should perform speculative wait + controller_unlock_1_2 + # Should report s1 is waiting on speculative lock + controller_print_speculative_locks + # Allow s2 to insert into the non-unique index and complete. s1 will + # no longer wait on speculative lock, but proceed to wait on the + # transaction to finish. The no-op step is needed to ensure that + # we don't advance to the reporting step until s2_upsert has completed. + controller_unlock_2_4 s2_noop + # Should report that s1 is now waiting for s2 to commit + controller_print_speculative_locks + # Once s2 commits, s1 is finally free to continue to update + s2_commit s1_noop + # This should now show a successful UPSERT + controller_show + # Ensure no unexpected locks survive + controller_print_speculative_locks diff --git a/src/test/isolation/specs/lock-committed-keyupdate.spec b/src/test/isolation/specs/lock-committed-keyupdate.spec new file mode 100644 index 0000000..487f0e0 --- /dev/null +++ b/src/test/isolation/specs/lock-committed-keyupdate.spec @@ -0,0 +1,66 @@ +# Test locking of a tuple with a committed key-update. In this case, +# the update conflicts with the lock, so failures are expected, except +# in READ COMMITTED isolation mode. +# +# Some of the permutations are commented out that work fine in the +# lock-committed-update test, because in this case the update blocks. + +setup +{ + DROP TABLE IF EXISTS lcku_table; + CREATE TABLE lcku_table (id INTEGER, value TEXT, PRIMARY KEY (id) INCLUDE (value)); + INSERT INTO lcku_table VALUES (1, 'one'); + INSERT INTO lcku_table VALUES (3, 'two'); +} + +teardown +{ + DROP TABLE lcku_table; +} + +session s1 +step s1b { BEGIN; } +step s1l { SELECT pg_advisory_lock(578902068); } +step s1u { UPDATE lcku_table SET id = 2 WHERE id = 3; } +step s1hint { SELECT * FROM lcku_table; } +step s1ul { SELECT pg_advisory_unlock(578902068); } +step s1c { COMMIT; } +teardown { SELECT pg_advisory_unlock_all(); } + +session s2 +step s2b1 { BEGIN ISOLATION LEVEL READ COMMITTED; } +step s2b2 { BEGIN ISOLATION LEVEL REPEATABLE READ; } +step s2b3 { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step s2l { SELECT * FROM lcku_table WHERE pg_advisory_lock(578902068) IS NOT NULL FOR KEY SHARE; } +step s2c { COMMIT; } +teardown { SELECT pg_advisory_unlock_all(); } + +permutation s1b s2b1 s1l s2l s1u s1c s1ul s2c +permutation s1b s2b1 s1l s1u s2l s1c s1ul s2c +#permutation s1b s2b1 s1l s2l s1ul s1u s1c s2c +permutation s1b s2b1 s1l s1u s1ul s2l s1c s2c + +permutation s1b s2b1 s1l s2l s1u s1c s1hint s1ul s2c +permutation s1b s2b1 s1l s1u s2l s1c s1hint s1ul s2c +#permutation s1b s2b1 s1l s2l s1ul s1u s1c s1hint s2c +permutation s1b s2b1 s1l s1u s1ul s2l s1c s1hint s2c + +permutation s1b s2b2 s1l s2l s1u s1c s1ul s2c +permutation s1b s2b2 s1l s1u s2l s1c s1ul s2c +#permutation s1b s2b2 s1l s2l s1ul s1u s1c s2c +permutation s1b s2b2 s1l s1u s1ul s2l s1c s2c + +permutation s1b s2b2 s1l s2l s1u s1c s1hint s1ul s2c +permutation s1b s2b2 s1l s1u s2l s1c s1hint s1ul s2c +#permutation s1b s2b2 s1l s2l s1ul s1u s1c s1hint s2c +permutation s1b s2b2 s1l s1u s1ul s2l s1c s1hint s2c + +permutation s1b s2b3 s1l s2l s1u s1c s1ul s2c +permutation s1b s2b3 s1l s1u s2l s1c s1ul s2c +#permutation s1b s2b3 s1l s2l s1ul s1u s1c s2c +permutation s1b s2b3 s1l s1u s1ul s2l s1c s2c + +permutation s1b s2b3 s1l s2l s1u s1c s1hint s1ul s2c +permutation s1b s2b3 s1l s1u s2l s1c s1hint s1ul s2c +#permutation s1b s2b3 s1l s2l s1ul s1u s1c s1hint s2c +permutation s1b s2b3 s1l s1u s1ul s2l s1c s1hint s2c diff --git a/src/test/isolation/specs/lock-committed-update.spec b/src/test/isolation/specs/lock-committed-update.spec new file mode 100644 index 0000000..74d80d5 --- /dev/null +++ b/src/test/isolation/specs/lock-committed-update.spec @@ -0,0 +1,62 @@ +# Test locking of a tuple with a committed update. When the lock does not +# conflict with the update, no blocking and no serializability errors should +# occur. + +setup +{ + DROP TABLE IF EXISTS lcu_table; + CREATE TABLE lcu_table (id INTEGER PRIMARY KEY, value TEXT); + INSERT INTO lcu_table VALUES (1, 'one'); +} + +teardown +{ + DROP TABLE lcu_table; +} + +session s1 +step s1b { BEGIN; } +step s1l { SELECT pg_advisory_lock(380170116); } +step s1u { UPDATE lcu_table SET value = 'two' WHERE id = 1; } +step s1hint { SELECT * FROM lcu_table; } +step s1ul { SELECT pg_advisory_unlock(380170116); } +step s1c { COMMIT; } +teardown { SELECT pg_advisory_unlock_all(); } + +session s2 +step s2b1 { BEGIN ISOLATION LEVEL READ COMMITTED; } +step s2b2 { BEGIN ISOLATION LEVEL REPEATABLE READ; } +step s2b3 { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step s2l { SELECT * FROM lcu_table WHERE pg_advisory_lock(380170116) IS NOT NULL FOR KEY SHARE; } +step s2c { COMMIT; } +teardown { SELECT pg_advisory_unlock_all(); } + +permutation s1b s2b1 s1l s2l s1u s1c s1ul s2c +permutation s1b s2b1 s1l s1u s2l s1c s1ul s2c +permutation s1b s2b1 s1l s2l s1ul s1u s1c s2c +permutation s1b s2b1 s1l s1u s1ul s2l s1c s2c + +permutation s1b s2b1 s1l s2l s1u s1c s1hint s1ul s2c +permutation s1b s2b1 s1l s1u s2l s1c s1hint s1ul s2c +permutation s1b s2b1 s1l s2l s1ul s1u s1c s1hint s2c +permutation s1b s2b1 s1l s1u s1ul s2l s1c s1hint s2c + +permutation s1b s2b2 s1l s2l s1u s1c s1ul s2c +permutation s1b s2b2 s1l s1u s2l s1c s1ul s2c +permutation s1b s2b2 s1l s2l s1ul s1u s1c s2c +permutation s1b s2b2 s1l s1u s1ul s2l s1c s2c + +permutation s1b s2b2 s1l s2l s1u s1c s1hint s1ul s2c +permutation s1b s2b2 s1l s1u s2l s1c s1hint s1ul s2c +permutation s1b s2b2 s1l s2l s1ul s1u s1c s1hint s2c +permutation s1b s2b2 s1l s1u s1ul s2l s1c s1hint s2c + +permutation s1b s2b3 s1l s2l s1u s1c s1ul s2c +permutation s1b s2b3 s1l s1u s2l s1c s1ul s2c +permutation s1b s2b3 s1l s2l s1ul s1u s1c s2c +permutation s1b s2b3 s1l s1u s1ul s2l s1c s2c + +permutation s1b s2b3 s1l s2l s1u s1c s1hint s1ul s2c +permutation s1b s2b3 s1l s1u s2l s1c s1hint s1ul s2c +permutation s1b s2b3 s1l s2l s1ul s1u s1c s1hint s2c +permutation s1b s2b3 s1l s1u s1ul s2l s1c s1hint s2c diff --git a/src/test/isolation/specs/lock-update-delete.spec b/src/test/isolation/specs/lock-update-delete.spec new file mode 100644 index 0000000..b9dd7d1 --- /dev/null +++ b/src/test/isolation/specs/lock-update-delete.spec @@ -0,0 +1,61 @@ +# This test verifies behavior when traversing an update chain during +# locking an old version of the tuple. There are three tests here: +# 1. update the tuple, then delete it; a second transaction locks the +# first version. This should raise an error if the DELETE succeeds, +# but be allowed to continue if it aborts. +# 2. Same as (1), except that instead of deleting the tuple, we merely +# update its key. The behavior should be the same as for (1). +# 3. Same as (2), except that we update the tuple without modifying its +# key. In this case, no error should be raised. +# When run in REPEATABLE READ or SERIALIZABLE transaction isolation levels, all +# permutations that commit s2 cause a serializability error; all permutations +# that rollback s2 can get through. +# +# We use an advisory lock (which is locked during s1's setup) to let s2 obtain +# its snapshot early and only allow it to actually traverse the update chain +# when s1 is done creating it. + +setup +{ + DROP TABLE IF EXISTS foo; + CREATE TABLE foo ( + key int PRIMARY KEY, + value int + ); + + INSERT INTO foo VALUES (1, 1); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +# obtain lock on the tuple, traversing its update chain +step s1l { SELECT * FROM foo WHERE pg_advisory_xact_lock(0) IS NOT NULL AND key = 1 FOR KEY SHARE; } + +session s2 +setup { SELECT pg_advisory_lock(0); } +step s2b { BEGIN; } +step s2u { UPDATE foo SET value = 2 WHERE key = 1; } +step s2_blocker1 { DELETE FROM foo; } +step s2_blocker2 { UPDATE foo SET key = 2 WHERE key = 1; } +step s2_blocker3 { UPDATE foo SET value = 2 WHERE key = 1; } +step s2_unlock { SELECT pg_advisory_unlock(0); } +step s2c { COMMIT; } +step s2r { ROLLBACK; } + +permutation s2b s1l s2u s2_blocker1 s2_unlock s2c +permutation s2b s1l s2u s2_blocker2 s2_unlock s2c +permutation s2b s1l s2u s2_blocker3 s2_unlock s2c +permutation s2b s1l s2u s2_blocker1 s2_unlock s2r +permutation s2b s1l s2u s2_blocker2 s2_unlock s2r +permutation s2b s1l s2u s2_blocker3 s2_unlock s2r + +permutation s2b s1l s2u s2_blocker1 s2c s2_unlock +permutation s2b s1l s2u s2_blocker2 s2c s2_unlock +permutation s2b s1l s2u s2_blocker3 s2c s2_unlock +permutation s2b s1l s2u s2_blocker1 s2r s2_unlock +permutation s2b s1l s2u s2_blocker2 s2r s2_unlock +permutation s2b s1l s2u s2_blocker3 s2r s2_unlock diff --git a/src/test/isolation/specs/lock-update-traversal.spec b/src/test/isolation/specs/lock-update-traversal.spec new file mode 100644 index 0000000..9d3d32d --- /dev/null +++ b/src/test/isolation/specs/lock-update-traversal.spec @@ -0,0 +1,39 @@ +# When a tuple that has been updated is locked, the locking command must +# traverse the update chain; thus, a DELETE (on the newer version of the tuple) +# should not be able to proceed until the lock has been released. An UPDATE +# that changes the key should not be allowed to continue either; but an UPDATE +# that doesn't modify the key should be able to continue immediately. + +setup +{ + CREATE TABLE foo ( + key int, + value int, + PRIMARY KEY (key) INCLUDE (value) + ); + + INSERT INTO foo VALUES (1, 1); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +step s1b { BEGIN ISOLATION LEVEL REPEATABLE READ; } +step s1s { SELECT * FROM foo; } # obtain snapshot +step s1l { SELECT * FROM foo FOR KEY SHARE; } # obtain lock +step s1c { COMMIT; } + +session s2 +step s2b { BEGIN; } +step s2u { UPDATE foo SET value = 2 WHERE key = 1; } +step s2c { COMMIT; } +step s2d1 { DELETE FROM foo WHERE key = 1; } +step s2d2 { UPDATE foo SET key = 3 WHERE key = 1; } +step s2d3 { UPDATE foo SET value = 3 WHERE key = 1; } + +permutation s1b s2b s1s s2u s1l s2c s2d1 s1c +permutation s1b s2b s1s s2u s1l s2c s2d2 s1c +permutation s1b s2b s1s s2u s1l s2c s2d3 s1c diff --git a/src/test/isolation/specs/multiple-cic.spec b/src/test/isolation/specs/multiple-cic.spec new file mode 100644 index 0000000..e34a6b0 --- /dev/null +++ b/src/test/isolation/specs/multiple-cic.spec @@ -0,0 +1,43 @@ +# Test multiple CREATE INDEX CONCURRENTLY working simultaneously + +setup +{ + CREATE TABLE mcic_one ( + id int + ); + CREATE TABLE mcic_two ( + id int + ); + CREATE FUNCTION lck_shr(bigint) RETURNS bool IMMUTABLE LANGUAGE plpgsql AS $$ + BEGIN PERFORM pg_advisory_lock_shared($1); RETURN true; END; + $$; + CREATE FUNCTION unlck() RETURNS bool IMMUTABLE LANGUAGE plpgsql AS $$ + BEGIN PERFORM pg_advisory_unlock_all(); RETURN true; END; + $$; +} +teardown +{ + DROP TABLE mcic_one, mcic_two; + DROP FUNCTION lck_shr(bigint); + DROP FUNCTION unlck(); +} + +session s1 +step s1i { + CREATE INDEX CONCURRENTLY mcic_one_pkey ON mcic_one (id) + WHERE lck_shr(281457); + } +teardown { SELECT unlck(); } + + +session s2 +step s2l { SELECT pg_advisory_lock(281457); } +step s2i { + CREATE INDEX CONCURRENTLY mcic_two_pkey ON mcic_two (id) + WHERE unlck(); + } + +# (*) marker ensures that s2i is reported as "waiting", even if it +# completes very quickly + +permutation s2l s1i s2i(*) diff --git a/src/test/isolation/specs/multiple-row-versions.spec b/src/test/isolation/specs/multiple-row-versions.spec new file mode 100644 index 0000000..0779ea0 --- /dev/null +++ b/src/test/isolation/specs/multiple-row-versions.spec @@ -0,0 +1,47 @@ +# Multiple Row Versions test +# +# This test is designed to cover some code paths which only occur with +# four or more transactions interacting with particular timings. +# +# Due to long permutation setup time, we are only testing one specific +# permutation, which should get a serialization error. + +setup +{ + CREATE TABLE t (id int NOT NULL, txt text) WITH (fillfactor=50); + INSERT INTO t (id) + SELECT x FROM (SELECT * FROM generate_series(1, 1000000)) a(x); + ALTER TABLE t ADD PRIMARY KEY (id); +} + +teardown +{ + DROP TABLE t; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rx1 { SELECT * FROM t WHERE id = 1000000; } +# delay until after T3 commits +step wz1 { UPDATE t SET txt = 'a' WHERE id = 1; } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step wx2 { UPDATE t SET txt = 'b' WHERE id = 1000000; } +step c2 { COMMIT; } + +session s3 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step wx3 { UPDATE t SET txt = 'c' WHERE id = 1000000; } +step ry3 { SELECT * FROM t WHERE id = 500000; } +# delay until after T4 commits +step c3 { COMMIT; } + +session s4 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step wy4 { UPDATE t SET txt = 'd' WHERE id = 500000; } +step rz4 { SELECT * FROM t WHERE id = 1; } +step c4 { COMMIT; } + +permutation rx1 wx2 c2 wx3 ry3 wy4 rz4 c4 c3 wz1 c1 diff --git a/src/test/isolation/specs/multixact-no-deadlock.spec b/src/test/isolation/specs/multixact-no-deadlock.spec new file mode 100644 index 0000000..a8af724 --- /dev/null +++ b/src/test/isolation/specs/multixact-no-deadlock.spec @@ -0,0 +1,35 @@ +# If we already hold a lock of a given strength, do not deadlock when +# some other transaction is waiting for a conflicting lock and we try +# to acquire the same lock we already held. +setup +{ + CREATE TABLE justthis ( + value int + ); + + INSERT INTO justthis VALUES (1); +} + +teardown +{ + DROP TABLE justthis; +} + +session s1 +setup { BEGIN; } +step s1lock { SELECT * FROM justthis FOR SHARE; } +step s1svpt { SAVEPOINT foo; } +step s1lock2 { SELECT * FROM justthis FOR SHARE; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN; } +step s2lock { SELECT * FROM justthis FOR SHARE; } # ensure it's a multi +step s2c { COMMIT; } + +session s3 +setup { BEGIN; } +step s3lock { SELECT * FROM justthis FOR UPDATE; } +step s3c { COMMIT; } + +permutation s1lock s2lock s1svpt s3lock s1lock2 s2c s1c s3c diff --git a/src/test/isolation/specs/multixact-no-forget.spec b/src/test/isolation/specs/multixact-no-forget.spec new file mode 100644 index 0000000..7f8a38b --- /dev/null +++ b/src/test/isolation/specs/multixact-no-forget.spec @@ -0,0 +1,44 @@ +# If transaction A holds a lock, and transaction B does an update, +# make sure we don't forget the lock if B aborts. +setup +{ + CREATE TABLE dont_forget ( + value int + ); + + INSERT INTO dont_forget VALUES (1); +} + +teardown +{ + DROP TABLE dont_forget; +} + +session s1 +setup { BEGIN; } +step s1_show { SELECT current_setting('default_transaction_isolation') <> 'read committed'; } +step s1_lock { SELECT * FROM dont_forget FOR KEY SHARE; } +step s1_commit { COMMIT; } + +session s2 +setup { BEGIN; } +step s2_update { UPDATE dont_forget SET value = 2; } +step s2_abort { ROLLBACK; } +step s2_commit { COMMIT; } + +session s3 +# try cases with both a non-conflicting lock with s1's and a conflicting one +step s3_forkeyshr { SELECT * FROM dont_forget FOR KEY SHARE; } +step s3_fornokeyupd { SELECT * FROM dont_forget FOR NO KEY UPDATE; } +step s3_forupd { SELECT * FROM dont_forget FOR UPDATE; } + +permutation s1_show s1_commit s2_commit +permutation s1_lock s2_update s2_abort s3_forkeyshr s1_commit +permutation s1_lock s2_update s2_commit s3_forkeyshr s1_commit +permutation s1_lock s2_update s1_commit s3_forkeyshr s2_commit +permutation s1_lock s2_update s2_abort s3_fornokeyupd s1_commit +permutation s1_lock s2_update s2_commit s3_fornokeyupd s1_commit +permutation s1_lock s2_update s1_commit s3_fornokeyupd s2_commit +permutation s1_lock s2_update s2_abort s3_forupd s1_commit +permutation s1_lock s2_update s2_commit s3_forupd s1_commit +permutation s1_lock s2_update s1_commit s3_forupd s2_commit diff --git a/src/test/isolation/specs/nowait-2.spec b/src/test/isolation/specs/nowait-2.spec new file mode 100644 index 0000000..cf892f2 --- /dev/null +++ b/src/test/isolation/specs/nowait-2.spec @@ -0,0 +1,37 @@ +# Test NOWAIT with multixact locks. + +setup +{ + CREATE TABLE foo ( + id int PRIMARY KEY, + data text NOT NULL + ); + INSERT INTO foo VALUES (1, 'x'); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +setup { BEGIN; } +step s1a { SELECT * FROM foo FOR SHARE NOWAIT; } +step s1b { COMMIT; } + +session s2 +setup { BEGIN; } +step s2a { SELECT * FROM foo FOR SHARE NOWAIT; } +step s2b { SELECT * FROM foo FOR UPDATE NOWAIT; } +step s2c { COMMIT; } + +# s1 and s2 both get SHARE lock, creating a multixact lock, then s2 +# tries to upgrade to UPDATE but aborts because it cannot acquire a +# multi-xact lock +permutation s1a s2a s2b s1b s2c +# the same but with the SHARE locks acquired in a different order, so +# s2 again aborts because it can't acquired a multi-xact lock +permutation s2a s1a s2b s1b s2c +# s2 acquires SHARE then UPDATE, then s1 tries to acquire SHARE but +# can't so aborts because it can't acquire a regular lock +permutation s2a s2b s1a s1b s2c diff --git a/src/test/isolation/specs/nowait-3.spec b/src/test/isolation/specs/nowait-3.spec new file mode 100644 index 0000000..06fb762 --- /dev/null +++ b/src/test/isolation/specs/nowait-3.spec @@ -0,0 +1,33 @@ +# Test NOWAIT with tuple locks. + +setup +{ + CREATE TABLE foo ( + id int PRIMARY KEY, + data text NOT NULL + ); + INSERT INTO foo VALUES (1, 'x'); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +setup { BEGIN; } +step s1a { SELECT * FROM foo FOR UPDATE; } +step s1b { COMMIT; } + +session s2 +setup { BEGIN; } +step s2a { SELECT * FROM foo FOR UPDATE; } +step s2b { COMMIT; } + +session s3 +setup { BEGIN; } +step s3a { SELECT * FROM foo FOR UPDATE NOWAIT; } +step s3b { COMMIT; } + +# s3 skips to second record due to tuple lock held by s2 +permutation s1a s2a s3a s1b s2b s3b diff --git a/src/test/isolation/specs/nowait-4.spec b/src/test/isolation/specs/nowait-4.spec new file mode 100644 index 0000000..da80330 --- /dev/null +++ b/src/test/isolation/specs/nowait-4.spec @@ -0,0 +1,35 @@ +# Test NOWAIT with an updated tuple chain. + +setup +{ + CREATE TABLE foo ( + id int PRIMARY KEY, + data text NOT NULL + ); + INSERT INTO foo VALUES (1, 'x'); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +setup { BEGIN; } +step s1a { SELECT * FROM foo WHERE pg_advisory_lock(0) IS NOT NULL FOR UPDATE NOWAIT; } +step s1b { COMMIT; } + +session s2 +step s2a { SELECT pg_advisory_lock(0); } +step s2b { UPDATE foo SET data = data; } +step s2c { BEGIN; } +step s2d { UPDATE foo SET data = data; } +step s2e { SELECT pg_advisory_unlock(0); } +step s2f { COMMIT; } + +# s1 takes a snapshot but then waits on an advisory lock, then s2 +# updates the row in one transaction, then again in another without +# committing, before allowing s1 to proceed to try to lock a row; +# because it has a snapshot that sees the older version, we reach the +# waiting code in EvalPlanQualFetch which ereports when in NOWAIT mode. +permutation s2a s1a s2b s2c s2d s2e s1b s2f diff --git a/src/test/isolation/specs/nowait-5.spec b/src/test/isolation/specs/nowait-5.spec new file mode 100644 index 0000000..46108de --- /dev/null +++ b/src/test/isolation/specs/nowait-5.spec @@ -0,0 +1,57 @@ +# Test NOWAIT on an updated tuple chain + +setup +{ + + DROP TABLE IF EXISTS test_nowait; + CREATE TABLE test_nowait ( + id integer PRIMARY KEY, + value integer not null + ); + + INSERT INTO test_nowait + SELECT x,x FROM generate_series(1,2) x; +} + +teardown +{ + DROP TABLE test_nowait; +} + +session sl1 +step sl1_prep { + PREPARE sl1_run AS SELECT id FROM test_nowait WHERE pg_advisory_lock(0) is not null FOR UPDATE NOWAIT; +} +step sl1_exec { + BEGIN ISOLATION LEVEL READ COMMITTED; + EXECUTE sl1_run; + SELECT xmin, xmax, ctid, * FROM test_nowait; +} +teardown { COMMIT; } + +# A session that's used for an UPDATE of the rows to be locked, for when we're testing ctid +# chain following. +session upd +step upd_getlock { + SELECT pg_advisory_lock(0); +} +step upd_doupdate { + BEGIN ISOLATION LEVEL READ COMMITTED; + UPDATE test_nowait SET value = value WHERE id % 2 = 0; + COMMIT; +} +step upd_releaselock { + SELECT pg_advisory_unlock(0); +} + +# A session that acquires locks that sl1 is supposed to avoid blocking on +session lk1 +step lk1_doforshare { + BEGIN ISOLATION LEVEL READ COMMITTED; + SELECT id FROM test_nowait WHERE id % 2 = 0 FOR SHARE; +} +teardown { + COMMIT; +} + +permutation sl1_prep upd_getlock sl1_exec upd_doupdate lk1_doforshare upd_releaselock diff --git a/src/test/isolation/specs/nowait.spec b/src/test/isolation/specs/nowait.spec new file mode 100644 index 0000000..a75e54c --- /dev/null +++ b/src/test/isolation/specs/nowait.spec @@ -0,0 +1,25 @@ +# Test NOWAIT when regular row locks can't be acquired. + +setup +{ + CREATE TABLE foo ( + id int PRIMARY KEY, + data text NOT NULL + ); + INSERT INTO foo VALUES (1, 'x'); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +setup { BEGIN; } +step s1a { SELECT * FROM foo FOR UPDATE NOWAIT; } +step s1b { COMMIT; } + +session s2 +setup { BEGIN; } +step s2a { SELECT * FROM foo FOR UPDATE NOWAIT; } +step s2b { COMMIT; } diff --git a/src/test/isolation/specs/partial-index.spec b/src/test/isolation/specs/partial-index.spec new file mode 100644 index 0000000..c033841 --- /dev/null +++ b/src/test/isolation/specs/partial-index.spec @@ -0,0 +1,32 @@ +# Partial Index test +# +# Make sure that an update which moves a row out of a partial index +# is handled correctly. In early versions, an attempt at optimization +# broke this behavior, allowing anomalies. +# +# Any overlap between the transactions must cause a serialization failure. + +setup +{ + create table test_t (id integer, val1 text, val2 integer); + create index test_idx on test_t(id) where val2 = 1; + insert into test_t (select generate_series(0, 10000), 'a', 2); + insert into test_t (select generate_series(0, 10), 'a', 1); +} + +teardown +{ + DROP TABLE test_t; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rxy1 { select * from test_t where val2 = 1; } +step wx1 { update test_t set val2 = 2 where val2 = 1 and id = 10; } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step wy2 { update test_t set val2 = 2 where val2 = 1 and id = 9; } +step rxy2 { select * from test_t where val2 = 1; } +step c2 { COMMIT; } diff --git a/src/test/isolation/specs/partition-concurrent-attach.spec b/src/test/isolation/specs/partition-concurrent-attach.spec new file mode 100644 index 0000000..fcd4dce --- /dev/null +++ b/src/test/isolation/specs/partition-concurrent-attach.spec @@ -0,0 +1,43 @@ +# Verify that default partition constraint is enforced correctly +# in light of partitions being added concurrently to its parent +setup { + drop table if exists tpart; + create table tpart(i int, j text) partition by range(i); + create table tpart_1(like tpart); + create table tpart_2(like tpart); + create table tpart_default (a int, j text, i int) partition by list (j); + create table tpart_default_default (a int, i int, b int, j text); + alter table tpart_default_default drop b; + alter table tpart_default attach partition tpart_default_default default; + alter table tpart_default drop a; + alter table tpart attach partition tpart_default default; + alter table tpart attach partition tpart_1 for values from(0) to (100); + insert into tpart_2 values (110,'xxx'), (120, 'yyy'), (150, 'zzz'); +} + +session s1 +step s1b { begin; } +step s1a { alter table tpart attach partition tpart_2 for values from (100) to (200); } +step s1c { commit; } + +session s2 +step s2b { begin; } +step s2i { insert into tpart values (110,'xxx'), (120, 'yyy'), (150, 'zzz'); } +step s2i2 { insert into tpart_default (i, j) values (110, 'xxx'), (120, 'yyy'), (150, 'zzz'); } +step s2c { commit; } +step s2s { select tableoid::regclass, * from tpart; } + +teardown { drop table tpart; } + +# insert into tpart by s2 which routes to tpart_default due to not seeing +# concurrently added tpart_2 should fail, because the partition constraint +# of tpart_default would have changed due to tpart_2 having been added +permutation s1b s1a s2b s2i s1c s2c s2s + +# similar to above, but now insert into sub-partitioned tpart_default +permutation s1b s1a s2b s2i2 s1c s2c s2s + +# reverse: now the insert into tpart_default by s2 occurs first followed by +# attach in s1, which should fail when it scans the leaf default partition +# find the violating rows +permutation s1b s2b s2i s1a s2c s1c s2s diff --git a/src/test/isolation/specs/partition-drop-index-locking.spec b/src/test/isolation/specs/partition-drop-index-locking.spec new file mode 100644 index 0000000..34e8b52 --- /dev/null +++ b/src/test/isolation/specs/partition-drop-index-locking.spec @@ -0,0 +1,47 @@ +# Verify that DROP INDEX properly locks all downward sub-partitions +# and partitions before locking the indexes. + +setup +{ + CREATE TABLE part_drop_index_locking (id int) PARTITION BY RANGE(id); + CREATE TABLE part_drop_index_locking_subpart PARTITION OF part_drop_index_locking FOR VALUES FROM (1) TO (100) PARTITION BY RANGE(id); + CREATE TABLE part_drop_index_locking_subpart_child PARTITION OF part_drop_index_locking_subpart FOR VALUES FROM (1) TO (100); + CREATE INDEX part_drop_index_locking_idx ON part_drop_index_locking(id); + CREATE INDEX part_drop_index_locking_subpart_idx ON part_drop_index_locking_subpart(id); +} + +teardown +{ + DROP TABLE part_drop_index_locking; +} + +# SELECT will take AccessShare lock first on the table and then on its index. +# We can simulate the case where DROP INDEX starts between those steps +# by manually taking the table lock beforehand. +session s1 +step s1begin { BEGIN; } +step s1lock { LOCK TABLE part_drop_index_locking_subpart_child IN ACCESS SHARE MODE; } +step s1select { SELECT * FROM part_drop_index_locking_subpart_child; } +step s1commit { COMMIT; } + +session s2 +step s2begin { BEGIN; } +step s2drop { DROP INDEX part_drop_index_locking_idx; } +step s2dropsub { DROP INDEX part_drop_index_locking_subpart_idx; } +step s2commit { COMMIT; } + +session s3 +step s3getlocks { + SELECT s.query, c.relname, l.mode, l.granted + FROM pg_locks l + JOIN pg_class c ON l.relation = c.oid + JOIN pg_stat_activity s ON l.pid = s.pid + WHERE c.relname LIKE 'part_drop_index_locking%' + ORDER BY s.query, c.relname, l.mode, l.granted; +} + +# Run DROP INDEX on top partitioned table +permutation s1begin s1lock s2begin s2drop(s1commit) s1select s3getlocks s1commit s3getlocks s2commit + +# Run DROP INDEX on top sub-partition table +permutation s1begin s1lock s2begin s2dropsub(s1commit) s1select s3getlocks s1commit s3getlocks s2commit diff --git a/src/test/isolation/specs/partition-key-update-1.spec b/src/test/isolation/specs/partition-key-update-1.spec new file mode 100644 index 0000000..6b5f422 --- /dev/null +++ b/src/test/isolation/specs/partition-key-update-1.spec @@ -0,0 +1,86 @@ +# Test that an error if thrown if the target row has been moved to a +# different partition by a concurrent session. + +setup +{ + -- + -- Setup to test an error from ExecUpdate and ExecDelete. + -- + CREATE TABLE foo (a int, b text) PARTITION BY LIST(a); + CREATE TABLE foo1 PARTITION OF foo FOR VALUES IN (1); + CREATE TABLE foo2 PARTITION OF foo FOR VALUES IN (2); + INSERT INTO foo VALUES (1, 'ABC'); + + -- + -- Setup to test an error from GetTupleForTrigger + -- + CREATE TABLE footrg (a int, b text) PARTITION BY LIST(a); + CREATE TABLE footrg1 PARTITION OF footrg FOR VALUES IN (1); + CREATE TABLE footrg2 PARTITION OF footrg FOR VALUES IN (2); + INSERT INTO footrg VALUES (1, 'ABC'); + CREATE FUNCTION func_footrg_mod_a() RETURNS TRIGGER AS $$ + BEGIN + NEW.a = 2; -- This is changing partition key column. + RETURN NEW; + END $$ LANGUAGE PLPGSQL; + CREATE TRIGGER footrg_mod_a BEFORE UPDATE ON footrg1 + FOR EACH ROW EXECUTE PROCEDURE func_footrg_mod_a(); + + -- + -- Setup to test an error from ExecLockRows + -- + CREATE TABLE foo_range_parted (a int, b text) PARTITION BY RANGE(a); + CREATE TABLE foo_range_parted1 PARTITION OF foo_range_parted FOR VALUES FROM (1) TO (10); + CREATE TABLE foo_range_parted2 PARTITION OF foo_range_parted FOR VALUES FROM (10) TO (20); + INSERT INTO foo_range_parted VALUES(7, 'ABC'); + CREATE UNIQUE INDEX foo_range_parted1_a_unique ON foo_range_parted1 (a); + CREATE TABLE bar (a int REFERENCES foo_range_parted1(a)); +} + +teardown +{ + DROP TABLE foo; + DROP TRIGGER footrg_mod_a ON footrg1; + DROP FUNCTION func_footrg_mod_a(); + DROP TABLE footrg; + DROP TABLE bar, foo_range_parted; +} + +session s1 +step s1b { BEGIN ISOLATION LEVEL READ COMMITTED; } +step s1u { UPDATE foo SET a=2 WHERE a=1; } +step s1u2 { UPDATE footrg SET b='EFG' WHERE a=1; } +step s1u3pc { UPDATE foo_range_parted SET a=11 WHERE a=7; } +step s1u3npc { UPDATE foo_range_parted SET b='XYZ' WHERE a=7; } +step s1c { COMMIT; } +step s1r { ROLLBACK; } + +session s2 +step s2b { BEGIN ISOLATION LEVEL READ COMMITTED; } +step s2u { UPDATE foo SET b='EFG' WHERE a=1; } +step s2u2 { UPDATE footrg SET b='XYZ' WHERE a=1; } +step s2i { INSERT INTO bar VALUES(7); } +step s2d { DELETE FROM foo WHERE a=1; } +step s2c { COMMIT; } + +# Concurrency error from ExecUpdate and ExecDelete. +permutation s1b s2b s1u s1c s2d s2c +permutation s1b s2b s1u s2d s1c s2c +permutation s1b s2b s1u s2u s1c s2c +permutation s1b s2b s2d s1u s2c s1c + +# Concurrency error from GetTupleForTrigger +permutation s1b s2b s1u2 s1c s2u2 s2c +permutation s1b s2b s1u2 s2u2 s1c s2c +permutation s1b s2b s2u2 s1u2 s2c s1c + +# Concurrency error from ExecLockRows +# test waiting for moved row itself +permutation s1b s2b s1u3pc s2i s1c s2c +permutation s1b s2b s1u3pc s2i s1r s2c +# test waiting for in-partition update, followed by cross-partition move +permutation s1b s2b s1u3npc s1u3pc s2i s1c s2c +permutation s1b s2b s1u3npc s1u3pc s2i s1r s2c +# test waiting for in-partition update, followed by cross-partition move +permutation s1b s2b s1u3npc s1u3pc s1u3pc s2i s1c s2c +permutation s1b s2b s1u3npc s1u3pc s1u3pc s2i s1r s2c diff --git a/src/test/isolation/specs/partition-key-update-2.spec b/src/test/isolation/specs/partition-key-update-2.spec new file mode 100644 index 0000000..d4cd09b --- /dev/null +++ b/src/test/isolation/specs/partition-key-update-2.spec @@ -0,0 +1,45 @@ +# Concurrent update of a partition key and INSERT...ON CONFLICT DO NOTHING test +# +# This test tries to expose problems with the interaction between concurrent +# sessions during an update of the partition key and INSERT...ON CONFLICT DO +# NOTHING on a partitioned table. +# +# The convention here is that session 1 moves row from one partition to +# another due update of the partition key and session 2 always ends up +# inserting, and session 3 always ends up doing nothing. +# +# Note: This test is slightly resemble to insert-conflict-do-nothing test. + +setup +{ + CREATE TABLE foo (a int primary key, b text) PARTITION BY LIST(a); + CREATE TABLE foo1 PARTITION OF foo FOR VALUES IN (1); + CREATE TABLE foo2 PARTITION OF foo FOR VALUES IN (2); + INSERT INTO foo VALUES (1, 'initial tuple'); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +setup { BEGIN ISOLATION LEVEL READ COMMITTED; } +step s1u { UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL READ COMMITTED; } +step s2donothing { INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; } +step s2c { COMMIT; } + +session s3 +setup { BEGIN ISOLATION LEVEL READ COMMITTED; } +step s3donothing { INSERT INTO foo VALUES(2, 'session-3 donothing') ON CONFLICT DO NOTHING; } +step s3select { SELECT * FROM foo ORDER BY a; } +step s3c { COMMIT; } + +# Regular case where one session block-waits on another to determine if it +# should proceed with an insert or do nothing. +permutation s1u s2donothing s3donothing s1c s2c s3select s3c +permutation s2donothing s1u s3donothing s1c s2c s3select s3c diff --git a/src/test/isolation/specs/partition-key-update-3.spec b/src/test/isolation/specs/partition-key-update-3.spec new file mode 100644 index 0000000..d2883e3 --- /dev/null +++ b/src/test/isolation/specs/partition-key-update-3.spec @@ -0,0 +1,44 @@ +# Concurrent update of a partition key and INSERT...ON CONFLICT DO NOTHING +# test on partitioned table with multiple rows in higher isolation levels. +# +# Note: This test is resemble to insert-conflict-do-nothing-2 test + +setup +{ + CREATE TABLE foo (a int primary key, b text) PARTITION BY LIST(a); + CREATE TABLE foo1 PARTITION OF foo FOR VALUES IN (1); + CREATE TABLE foo2 PARTITION OF foo FOR VALUES IN (2); + INSERT INTO foo VALUES (1, 'initial tuple'); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +setup { BEGIN ISOLATION LEVEL READ COMMITTED; } +step s1u { UPDATE foo SET a=2, b=b || ' -> moved by session-1' WHERE a=1; } +step s1c { COMMIT; } + +session s2 +step s2beginrr { BEGIN ISOLATION LEVEL REPEATABLE READ; } +step s2begins { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step s2donothing { INSERT INTO foo VALUES(1, 'session-2 donothing') ON CONFLICT DO NOTHING; } +step s2c { COMMIT; } +step s2select { SELECT * FROM foo ORDER BY a; } + +session s3 +step s3beginrr { BEGIN ISOLATION LEVEL REPEATABLE READ; } +step s3begins { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step s3donothing { INSERT INTO foo VALUES(2, 'session-3 donothing'), (2, 'session-3 donothing2') ON CONFLICT DO NOTHING; } +step s3c { COMMIT; } + +permutation s2beginrr s3beginrr s1u s2donothing s1c s2c s3donothing s3c s2select +permutation s2beginrr s3beginrr s1u s3donothing s1c s3c s2donothing s2c s2select +permutation s2beginrr s3beginrr s1u s2donothing s3donothing s1c s2c s3c s2select +permutation s2beginrr s3beginrr s1u s3donothing s2donothing s1c s3c s2c s2select +permutation s2begins s3begins s1u s2donothing s1c s2c s3donothing s3c s2select +permutation s2begins s3begins s1u s3donothing s1c s3c s2donothing s2c s2select +permutation s2begins s3begins s1u s2donothing s3donothing s1c s2c s3c s2select +permutation s2begins s3begins s1u s3donothing s2donothing s1c s3c s2c s2select diff --git a/src/test/isolation/specs/partition-key-update-4.spec b/src/test/isolation/specs/partition-key-update-4.spec new file mode 100644 index 0000000..6c70816 --- /dev/null +++ b/src/test/isolation/specs/partition-key-update-4.spec @@ -0,0 +1,76 @@ +# Test that a row that ends up in a new partition contains changes made by +# a concurrent transaction. + +setup +{ + -- + -- Setup to test concurrent handling of ExecDelete(). + -- + CREATE TABLE foo (a int, b text) PARTITION BY LIST(a); + CREATE TABLE foo1 PARTITION OF foo FOR VALUES IN (1); + CREATE TABLE foo2 PARTITION OF foo FOR VALUES IN (2); + INSERT INTO foo VALUES (1, 'ABC'); + + -- + -- Setup to test concurrent handling of GetTupleForTrigger(). + -- + CREATE TABLE footrg (a int, b text) PARTITION BY LIST(a); + CREATE TABLE triglog as select * from footrg; + CREATE TABLE footrg1 PARTITION OF footrg FOR VALUES IN (1); + CREATE TABLE footrg2 PARTITION OF footrg FOR VALUES IN (2); + INSERT INTO footrg VALUES (1, 'ABC'); + CREATE FUNCTION func_footrg() RETURNS TRIGGER AS $$ + BEGIN + OLD.b = OLD.b || ' trigger'; + + -- This will verify that the trigger is not run *before* the row is + -- refetched by EvalPlanQual. The OLD row should contain the changes made + -- by the concurrent session. + INSERT INTO triglog select OLD.*; + + RETURN OLD; + END $$ LANGUAGE PLPGSQL; + CREATE TRIGGER footrg_ondel BEFORE DELETE ON footrg1 + FOR EACH ROW EXECUTE PROCEDURE func_footrg(); + +} + +teardown +{ + DROP TABLE foo; + DROP TRIGGER footrg_ondel ON footrg1; + DROP FUNCTION func_footrg(); + DROP TABLE footrg; + DROP TABLE triglog; +} + +session s1 +step s1b { BEGIN ISOLATION LEVEL READ COMMITTED; } +step s1u { UPDATE foo SET a = a + 1, b = b || ' update1' WHERE b like '%ABC%'; } +step s1ut { UPDATE footrg SET a = a + 1, b = b || ' update1' WHERE b like '%ABC%'; } +step s1s { SELECT tableoid::regclass, * FROM foo ORDER BY a; } +step s1st { SELECT tableoid::regclass, * FROM footrg ORDER BY a; } +step s1stl { SELECT * FROM triglog ORDER BY a; } +step s1c { COMMIT; } + +session s2 +step s2b { BEGIN ISOLATION LEVEL READ COMMITTED; } +step s2u1 { UPDATE foo SET b = b || ' update2' WHERE a = 1; } +step s2u2 { UPDATE foo SET b = 'EFG' WHERE a = 1; } +step s2ut1 { UPDATE footrg SET b = b || ' update2' WHERE a = 1; } +step s2ut2 { UPDATE footrg SET b = 'EFG' WHERE a = 1; } +step s2c { COMMIT; } + + +# Session s1 is moving a row into another partition, but is waiting for +# another session s2 that is updating the original row. The row that ends up +# in the new partition should contain the changes made by session s2. +permutation s1b s2b s2u1 s1u s2c s1c s1s + +# Same as above, except, session s1 is waiting in GetTupleForTrigger(). +permutation s1b s2b s2ut1 s1ut s2c s1c s1st s1stl + +# Below two cases are similar to the above two; except that the session s1 +# fails EvalPlanQual() test, so partition key update does not happen. +permutation s1b s2b s2u2 s1u s2c s1c s1s +permutation s1b s2b s2ut2 s1ut s2c s1c s1st s1stl diff --git a/src/test/isolation/specs/plpgsql-toast.spec b/src/test/isolation/specs/plpgsql-toast.spec new file mode 100644 index 0000000..bb444fc --- /dev/null +++ b/src/test/isolation/specs/plpgsql-toast.spec @@ -0,0 +1,178 @@ +# Test TOAST behavior in PL/pgSQL procedures with transaction control. +# +# We need to ensure that values stored in PL/pgSQL variables are free +# of external TOAST references, because those could disappear after a +# transaction is committed (leading to errors "missing chunk number +# ... for toast value ..."). The tests here do this by running VACUUM +# in a second session. Advisory locks are used to have the VACUUM +# kick in at the right time. The different "assign" steps test +# different code paths for variable assignments in PL/pgSQL. + +setup +{ + CREATE TABLE test1 (a int, b text); + ALTER TABLE test1 ALTER COLUMN b SET STORAGE EXTERNAL; + INSERT INTO test1 VALUES (1, repeat('foo', 2000)); + CREATE TYPE test2 AS (a bigint, b text); +} + +teardown +{ + DROP TABLE test1; + DROP TYPE test2; +} + +session s1 + +setup +{ + SELECT pg_advisory_unlock_all(); +} + +# assign_simple_var() +step assign1 +{ +do $$ + declare + x text; + begin + select test1.b into x from test1; + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(x) = %', length(x); + end; +$$; +} + +# assign_simple_var() +step assign2 +{ +do $$ + declare + x text; + begin + x := (select test1.b from test1); + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(x) = %', length(x); + end; +$$; +} + +# expanded_record_set_field() +step assign3 +{ +do $$ + declare + r record; + begin + select * into r from test1; + r.b := (select test1.b from test1); + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(r) = %', length(r::text); + end; +$$; +} + +# expanded_record_set_fields() +step assign4 +{ +do $$ + declare + r test2; + begin + select * into r from test1; + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(r) = %', length(r::text); + end; +$$; +} + +# expanded_record_set_tuple() +step assign5 +{ +do $$ + declare + r record; + begin + for r in select test1.b from test1 loop + null; + end loop; + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(r) = %', length(r::text); + end; +$$; +} + +# FOR loop must not hold any fetched-but-not-detoasted values across commit +step assign6 +{ +do $$ + declare + r record; + begin + insert into test1 values (2, repeat('bar', 3000)); + insert into test1 values (3, repeat('baz', 4000)); + for r in select test1.b from test1 loop + delete from test1; + commit; + perform pg_advisory_lock(1); + raise notice 'length(r) = %', length(r::text); + end loop; + end; +$$; +} + +# Check that the results of a query can be detoasted just after committing +# (there's no interaction with VACUUM here) +step "fetch-after-commit" +{ +do $$ + declare + r record; + t text; + begin + insert into test1 values (2, repeat('bar', 3000)); + insert into test1 values (3, repeat('baz', 4000)); + for r in select test1.a from test1 loop + commit; + select b into t from test1 where a = r.a; + raise notice 'length(t) = %', length(t); + end loop; + end; +$$; +} + +session s2 +setup +{ + SELECT pg_advisory_unlock_all(); +} +step lock +{ + SELECT pg_advisory_lock(1); +} +step vacuum +{ + VACUUM test1; +} +step unlock +{ + SELECT pg_advisory_unlock(1); +} + +permutation lock assign1 vacuum unlock +permutation lock assign2 vacuum unlock +permutation lock assign3 vacuum unlock +permutation lock assign4 vacuum unlock +permutation lock assign5 vacuum unlock +permutation lock assign6 vacuum unlock +permutation "fetch-after-commit" diff --git a/src/test/isolation/specs/predicate-gin.spec b/src/test/isolation/specs/predicate-gin.spec new file mode 100644 index 0000000..e279eaa --- /dev/null +++ b/src/test/isolation/specs/predicate-gin.spec @@ -0,0 +1,115 @@ +# Test for page level predicate locking in gin index +# +# Test to verify serialization failures and to check reduced false positives +# +# To verify serialization failures, queries and permutations are written in such +# a way that an index scan (from one transaction) and an index insert (from +# another transaction) will try to access the same part (sub-tree) of the index +# whereas to check reduced false positives, they will try to access different +# parts (sub-tree) of the index. + + +setup +{ + create table gin_tbl(p int4[]); + insert into gin_tbl select array[1] from generate_series(1, 8192) g; + insert into gin_tbl select array[g] from generate_series(2, 800) g; + create index ginidx on gin_tbl using gin(p) with (fastupdate = off); + create table other_tbl(v int4); +} + +teardown +{ + drop table gin_tbl; + drop table other_tbl; +} + +session s1 +setup +{ + begin isolation level serializable; + set enable_seqscan=off; +} + +step ra1 { select * from gin_tbl where p @> array[1] limit 1; } +step rb1 { select count(*) from gin_tbl where p @> array[2]; } +step rc1 { select count(*) from gin_tbl where p @> array[800]; } +step rd1 { select count(*) from gin_tbl where p @> array[2000]; } + +step wo1 { insert into other_tbl values (1); } + +step c1 { commit; } + +session s2 +setup +{ + begin isolation level serializable; + set enable_seqscan=off; +} + +step ro2 { select count(*) from other_tbl; } + +step wa2 { insert into gin_tbl values (array[1]); } +step wb2 { insert into gin_tbl values (array[2]); } +step wc2 { insert into gin_tbl values (array[800]); } +step wd2 { insert into gin_tbl values (array[2000]); } + +step c2 { commit; } + +session s3 +step fu { alter index ginidx set (fastupdate = on); } + +# An index scan (from one transaction) and an index insert (from another +# transaction) try to access the same part of the index. So, there is a +# r-w conflict. + +permutation ra1 ro2 wo1 c1 wa2 c2 +permutation ro2 ra1 wo1 c1 wa2 c2 +permutation ro2 ra1 wo1 wa2 c1 c2 +permutation ra1 ro2 wa2 wo1 c1 c2 + +permutation rb1 ro2 wo1 c1 wb2 c2 +permutation ro2 rb1 wo1 c1 wb2 c2 +permutation ro2 rb1 wo1 wb2 c1 c2 +permutation rb1 ro2 wb2 wo1 c1 c2 + +permutation rc1 ro2 wo1 c1 wc2 c2 +permutation ro2 rc1 wo1 c1 wc2 c2 +permutation ro2 rc1 wo1 wc2 c1 c2 +permutation rc1 ro2 wc2 wo1 c1 c2 + +# An index scan (from one transaction) and an index insert (from another +# transaction) try to access different parts of the index. So, there is no +# r-w conflict. + +permutation ra1 ro2 wo1 c1 wb2 c2 +permutation ro2 ra1 wo1 c1 wc2 c2 +permutation ro2 rb1 wo1 wa2 c1 c2 +permutation rc1 ro2 wa2 wo1 c1 c2 + +permutation rb1 ro2 wo1 c1 wa2 c2 +permutation ro2 rb1 wo1 c1 wc2 c2 +permutation ro2 ra1 wo1 wb2 c1 c2 +permutation rc1 ro2 wb2 wo1 c1 c2 + +permutation rc1 ro2 wo1 c1 wa2 c2 +permutation ro2 rc1 wo1 c1 wb2 c2 +permutation ro2 ra1 wo1 wc2 c1 c2 +permutation rb1 ro2 wc2 wo1 c1 c2 + +# With fastupdate = on all index is under predicate lock. So we can't +# distinguish particular keys. + +permutation fu ra1 ro2 wo1 c1 wa2 c2 +permutation fu ra1 ro2 wo1 c1 wb2 c2 + +# Check fastupdate turned on concurrently. + +permutation ra1 ro2 wo1 c1 fu wa2 c2 + +# Tests for conflicts with previously non-existing key + +permutation rd1 ro2 wo1 c1 wd2 c2 +permutation ro2 rd1 wo1 c1 wd2 c2 +permutation ro2 rd1 wo1 wd2 c1 c2 +permutation rd1 ro2 wd2 wo1 c1 c2 diff --git a/src/test/isolation/specs/predicate-gist.spec b/src/test/isolation/specs/predicate-gist.spec new file mode 100644 index 0000000..9016c6e --- /dev/null +++ b/src/test/isolation/specs/predicate-gist.spec @@ -0,0 +1,117 @@ +# Test for page level predicate locking in gist +# +# Test to verify serialization failures and to check reduced false positives +# +# To verify serialization failures, queries and permutations are written in such +# a way that an index scan (from one transaction) and an index insert (from +# another transaction) will try to access the same part (sub-tree) of the index +# whereas to check reduced false positives, they will try to access different +# parts (sub-tree) of the index. + +setup +{ + create table gist_point_tbl(id int4, p point); + create index gist_pointidx on gist_point_tbl using gist(p); + insert into gist_point_tbl (id, p) + select g, point(g*10, g*10) from generate_series(1, 1000) g; +} + +teardown +{ + drop table gist_point_tbl; +} + +session s1 +setup +{ + begin isolation level serializable; + set enable_seqscan=off; + set enable_bitmapscan=off; + set enable_indexonlyscan=on; +} + +step rxy1 { select sum(p[0]) from gist_point_tbl where p << point(2500, 2500); } +step wx1 { insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(15, 20) g; } +step rxy3 { select sum(p[0]) from gist_point_tbl where p >> point(6000,6000); } +step wx3 { insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(12, 18) g; } +step c1 { commit; } + + +session s2 +setup +{ + begin isolation level serializable; + set enable_seqscan=off; + set enable_bitmapscan=off; + set enable_indexonlyscan=on; +} + +step rxy2 { select sum(p[0]) from gist_point_tbl where p >> point(7500,7500); } +step wy2 { insert into gist_point_tbl (id, p) + select g, point(g*500, g*500) from generate_series(1, 5) g; } +step rxy4 { select sum(p[0]) from gist_point_tbl where p << point(1000,1000); } +step wy4 { insert into gist_point_tbl (id, p) + select g, point(g*50, g*50) from generate_series(1, 20) g; } +step c2 { commit; } + +# An index scan (from one transaction) and an index insert (from another +# transaction) try to access the same part of the index but one transaction +# commits before other transaction begins so no r-w conflict. + +permutation rxy1 wx1 c1 rxy2 wy2 c2 +permutation rxy2 wy2 c2 rxy1 wx1 c1 + +# An index scan (from one transaction) and an index insert (from another +# transaction) try to access different parts of the index and also one +# transaction commits before other transaction begins, so no r-w conflict. + +permutation rxy3 wx3 c1 rxy4 wy4 c2 +permutation rxy4 wy4 c2 rxy3 wx3 c1 + + +# An index scan (from one transaction) and an index insert (from another +# transaction) try to access the same part of the index and one transaction +# begins before other transaction commits so there is a r-w conflict. + +permutation rxy1 wx1 rxy2 c1 wy2 c2 +permutation rxy1 wx1 rxy2 wy2 c1 c2 +permutation rxy1 wx1 rxy2 wy2 c2 c1 +permutation rxy1 rxy2 wx1 c1 wy2 c2 +permutation rxy1 rxy2 wx1 wy2 c1 c2 +permutation rxy1 rxy2 wx1 wy2 c2 c1 +permutation rxy1 rxy2 wy2 wx1 c1 c2 +permutation rxy1 rxy2 wy2 wx1 c2 c1 +permutation rxy1 rxy2 wy2 c2 wx1 c1 +permutation rxy2 rxy1 wx1 c1 wy2 c2 +permutation rxy2 rxy1 wx1 wy2 c1 c2 +permutation rxy2 rxy1 wx1 wy2 c2 c1 +permutation rxy2 rxy1 wy2 wx1 c1 c2 +permutation rxy2 rxy1 wy2 wx1 c2 c1 +permutation rxy2 rxy1 wy2 c2 wx1 c1 +permutation rxy2 wy2 rxy1 wx1 c1 c2 +permutation rxy2 wy2 rxy1 wx1 c2 c1 +permutation rxy2 wy2 rxy1 c2 wx1 c1 + +# An index scan (from one transaction) and an index insert (from another +# transaction) try to access different parts of the index so no r-w conflict. + +permutation rxy3 wx3 rxy4 c1 wy4 c2 +permutation rxy3 wx3 rxy4 wy4 c1 c2 +permutation rxy3 wx3 rxy4 wy4 c2 c1 +permutation rxy3 rxy4 wx3 c1 wy4 c2 +permutation rxy3 rxy4 wx3 wy4 c1 c2 +permutation rxy3 rxy4 wx3 wy4 c2 c1 +permutation rxy3 rxy4 wy4 wx3 c1 c2 +permutation rxy3 rxy4 wy4 wx3 c2 c1 +permutation rxy3 rxy4 wy4 c2 wx3 c1 +permutation rxy4 rxy3 wx3 c1 wy4 c2 +permutation rxy4 rxy3 wx3 wy4 c1 c2 +permutation rxy4 rxy3 wx3 wy4 c2 c1 +permutation rxy4 rxy3 wy4 wx3 c1 c2 +permutation rxy4 rxy3 wy4 wx3 c2 c1 +permutation rxy4 rxy3 wy4 c2 wx3 c1 +permutation rxy4 wy4 rxy3 wx3 c1 c2 +permutation rxy4 wy4 rxy3 wx3 c2 c1 +permutation rxy4 wy4 rxy3 c2 wx3 c1 diff --git a/src/test/isolation/specs/predicate-hash.spec b/src/test/isolation/specs/predicate-hash.spec new file mode 100644 index 0000000..7ca193b --- /dev/null +++ b/src/test/isolation/specs/predicate-hash.spec @@ -0,0 +1,122 @@ +# Test for page level predicate locking in hash index +# +# Test to verify serialization failures and to check reduced false positives +# +# To verify serialization failures, queries and permutations are written in such +# a way that an index scan (from one transaction) and an index insert (from +# another transaction) will try to access the same bucket of the index +# whereas to check reduced false positives, they will try to access different +# buckets of the index. + +setup +{ + create table hash_tbl(id int4, p integer); + create index hash_idx on hash_tbl using hash(p); + insert into hash_tbl (id, p) + select g, 10 from generate_series(1, 10) g; + insert into hash_tbl (id, p) + select g, 20 from generate_series(11, 20) g; + insert into hash_tbl (id, p) + select g, 30 from generate_series(21, 30) g; + insert into hash_tbl (id, p) + select g, 40 from generate_series(31, 40) g; +} + +teardown +{ + drop table hash_tbl; +} + +session s1 +setup +{ + begin isolation level serializable; + set enable_seqscan=off; + set enable_bitmapscan=off; + set enable_indexonlyscan=on; +} +step rxy1 { select sum(p) from hash_tbl where p=20; } +step wx1 { insert into hash_tbl (id, p) + select g, 30 from generate_series(41, 50) g; } +step rxy3 { select sum(p) from hash_tbl where p=20; } +step wx3 { insert into hash_tbl (id, p) + select g, 50 from generate_series(41, 50) g; } +step c1 { commit; } + + +session s2 +setup +{ + begin isolation level serializable; + set enable_seqscan=off; + set enable_bitmapscan=off; + set enable_indexonlyscan=on; +} +step rxy2 { select sum(p) from hash_tbl where p=30; } +step wy2 { insert into hash_tbl (id, p) + select g, 20 from generate_series(51, 60) g; } +step rxy4 { select sum(p) from hash_tbl where p=30; } +step wy4 { insert into hash_tbl (id, p) + select g, 60 from generate_series(51, 60) g; } +step c2 { commit; } + + +# An index scan (from one transaction) and an index insert (from another +# transaction) try to access the same bucket of the index but one transaction +# commits before other transaction begins so no r-w conflict. + +permutation rxy1 wx1 c1 rxy2 wy2 c2 +permutation rxy2 wy2 c2 rxy1 wx1 c1 + +# An index scan (from one transaction) and an index insert (from another +# transaction) try to access different buckets of the index and also one +# transaction commits before other transaction begins, so no r-w conflict. + +permutation rxy3 wx3 c1 rxy4 wy4 c2 +permutation rxy4 wy4 c2 rxy3 wx3 c1 + + +# An index scan (from one transaction) and an index insert (from another +# transaction) try to access the same bucket of the index and one transaction +# begins before other transaction commits so there is a r-w conflict. + +permutation rxy1 wx1 rxy2 c1 wy2 c2 +permutation rxy1 wx1 rxy2 wy2 c1 c2 +permutation rxy1 wx1 rxy2 wy2 c2 c1 +permutation rxy1 rxy2 wx1 c1 wy2 c2 +permutation rxy1 rxy2 wx1 wy2 c1 c2 +permutation rxy1 rxy2 wx1 wy2 c2 c1 +permutation rxy1 rxy2 wy2 wx1 c1 c2 +permutation rxy1 rxy2 wy2 wx1 c2 c1 +permutation rxy1 rxy2 wy2 c2 wx1 c1 +permutation rxy2 rxy1 wx1 c1 wy2 c2 +permutation rxy2 rxy1 wx1 wy2 c1 c2 +permutation rxy2 rxy1 wx1 wy2 c2 c1 +permutation rxy2 rxy1 wy2 wx1 c1 c2 +permutation rxy2 rxy1 wy2 wx1 c2 c1 +permutation rxy2 rxy1 wy2 c2 wx1 c1 +permutation rxy2 wy2 rxy1 wx1 c1 c2 +permutation rxy2 wy2 rxy1 wx1 c2 c1 +permutation rxy2 wy2 rxy1 c2 wx1 c1 + +# An index scan (from one transaction) and an index insert (from another +# transaction) try to access different buckets of the index so no r-w conflict. + +permutation rxy3 wx3 rxy4 c1 wy4 c2 +permutation rxy3 wx3 rxy4 wy4 c1 c2 +permutation rxy3 wx3 rxy4 wy4 c2 c1 +permutation rxy3 rxy4 wx3 c1 wy4 c2 +permutation rxy3 rxy4 wx3 wy4 c1 c2 +permutation rxy3 rxy4 wx3 wy4 c2 c1 +permutation rxy3 rxy4 wy4 wx3 c1 c2 +permutation rxy3 rxy4 wy4 wx3 c2 c1 +permutation rxy3 rxy4 wy4 c2 wx3 c1 +permutation rxy4 rxy3 wx3 c1 wy4 c2 +permutation rxy4 rxy3 wx3 wy4 c1 c2 +permutation rxy4 rxy3 wx3 wy4 c2 c1 +permutation rxy4 rxy3 wy4 wx3 c1 c2 +permutation rxy4 rxy3 wy4 wx3 c2 c1 +permutation rxy4 rxy3 wy4 c2 wx3 c1 +permutation rxy4 wy4 rxy3 wx3 c1 c2 +permutation rxy4 wy4 rxy3 wx3 c2 c1 +permutation rxy4 wy4 rxy3 c2 wx3 c1 diff --git a/src/test/isolation/specs/predicate-lock-hot-tuple.spec b/src/test/isolation/specs/predicate-lock-hot-tuple.spec new file mode 100644 index 0000000..5b8aecc --- /dev/null +++ b/src/test/isolation/specs/predicate-lock-hot-tuple.spec @@ -0,0 +1,37 @@ +# Test predicate locks on HOT updated tuples. +# +# This test has two serializable transactions. Both select two rows +# from the table, and then update one of them. +# If these were serialized (run one at a time), the transaction that +# runs later would see one of the rows to be updated. +# +# Any overlap between the transactions must cause a serialization failure. +# We used to have a bug in predicate locking HOT updated tuples, which +# caused the conflict to be missed, if the row was HOT updated. + +setup +{ + CREATE TABLE test (i int PRIMARY KEY, t text); + INSERT INTO test VALUES (5, 'apple'), (7, 'pear'), (11, 'banana'); + -- HOT-update 'pear' row. + UPDATE test SET t = 'pear_hot_updated' WHERE i = 7; +} + +teardown +{ + DROP TABLE test; +} + +session s1 +step b1 { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step r1 { SELECT * FROM test WHERE i IN (5, 7) } +step w1 { UPDATE test SET t = 'pear_xact1' WHERE i = 7 } +step c1 { COMMIT; } + +session s2 +step b2 { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step r2 { SELECT * FROM test WHERE i IN (5, 7) } +step w2 { UPDATE test SET t = 'apple_xact2' WHERE i = 5 } +step c2 { COMMIT; } + +permutation b1 b2 r1 r2 w1 w2 c1 c2 diff --git a/src/test/isolation/specs/prepared-transactions-cic.spec b/src/test/isolation/specs/prepared-transactions-cic.spec new file mode 100644 index 0000000..626b1b6 --- /dev/null +++ b/src/test/isolation/specs/prepared-transactions-cic.spec @@ -0,0 +1,37 @@ +# This test verifies that CREATE INDEX CONCURRENTLY interacts with prepared +# transactions correctly. +setup +{ + CREATE TABLE cic_test (a int); +} + +teardown +{ + DROP TABLE cic_test; +} + + +# Sessions for CREATE INDEX CONCURRENTLY test +session s1 +step w1 { BEGIN; INSERT INTO cic_test VALUES (1); } +step p1 { PREPARE TRANSACTION 's1'; } +step c1 { COMMIT PREPARED 's1'; } + +session s2 +# The isolation tester never recognizes that a lock of s1 blocks s2, because a +# prepared transaction's locks have no pid associated. While there's a slight +# chance of timeout while waiting for an autovacuum-held lock, that wouldn't +# change the output. Hence, no timeout is too short. +setup { SET lock_timeout = 10; } +step cic2 +{ + CREATE INDEX CONCURRENTLY on cic_test(a); +} +step r2 +{ + SET enable_seqscan to off; + SET enable_bitmapscan to off; + SELECT * FROM cic_test WHERE a = 1; +} + +permutation w1 p1 cic2 c1 r2 diff --git a/src/test/isolation/specs/prepared-transactions.spec b/src/test/isolation/specs/prepared-transactions.spec new file mode 100644 index 0000000..78b9d2c --- /dev/null +++ b/src/test/isolation/specs/prepared-transactions.spec @@ -0,0 +1,1507 @@ +# This test verifies that if there's a series of rw-conflicts +# s1 ---> s2 ---> s3, with s3 committing first +# at least one transaction will be aborted, regardless of the order in +# which the conflicts are detected and transactions prepare and +# commit. +# +# +# Tables test2 and test3 are used to create the +# s1 --> s2 and s2 --> s3 rw-dependencies respectively +# +# test1 isn't involved in the anomaly; s1 only inserts a row into it +# so that there's an easy way to tell (by looking for that row) if s1 +# successfully committed. +# +# force_snapshot is used to force s2 and s3 to take their snapshot +# immediately after BEGIN, so we can be sure the three transactions +# overlap. +setup +{ + CREATE TABLE test1 (a int); + CREATE TABLE test2 (b int); + CREATE TABLE test3 (c int); + CREATE TABLE force_snapshot (a int); +} + +teardown +{ + DROP TABLE test1; + DROP TABLE test2; + DROP TABLE test3; + DROP TABLE force_snapshot; +} + + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; INSERT INTO test1 VALUES (1); } +step r1 { SELECT * FROM test2; } +step p1 { PREPARE TRANSACTION 's1'; } +step c1 { COMMIT PREPARED 's1'; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; SELECT * FROM force_snapshot; } +step r2 { SELECT * FROM test3; } +step w2 { INSERT INTO test2 VALUES (2); } +step p2 { PREPARE TRANSACTION 's2'; } +step c2 { COMMIT PREPARED 's2'; } + +session s3 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; SELECT * FROM force_snapshot; } +step w3 { INSERT INTO test3 VALUES (3); } +step p3 { PREPARE TRANSACTION 's3'; } +step c3 { COMMIT PREPARED 's3'; } + +# When run at the end of the permutations below, this SELECT statement +# should never return any tuples, because at least one of the three +# transactions involved should be aborted. +session s4 +step check { SELECT * FROM test1,test2,test3; } + +# We run on all permutations of the statements above subject to the +# following constraints: +# - each transaction's reads/writes must happen before it prepares +# - each transaction must prepare before committing +# - s3 must be the first of the three transactions to commit +# ...which means that each permutation should fail. +# +# To bring the number of permutations down a bit, we further require +# them to satisfy *one* of the following: +# - r1 < w2 < r2 < w3 (T1-->T2 conflict on write, T2-->T3 on write) +# - r1 < w2 < w3 < r2 (T1-->T2 conflict on read, T2-->T3 on write) +# - w2 < r1 < r2 < w3 (T1-->T2 conflict on write, T2-->T3 on read) +# - w2 < r1 < w3 < r2 (T1-->T2 conflict on read, T2-->T3 on read) +# This eliminates some redundant combinations. For example, it doesn't +# matter if w2 happens before w3 as long as both come before the +# conflicting reads. +permutation r1 r2 w2 w3 p1 p2 p3 c3 c1 c2 check +permutation r1 r2 w2 w3 p1 p2 p3 c3 c2 c1 check +permutation r1 r2 w2 w3 p1 p3 p2 c3 c1 c2 check +permutation r1 r2 w2 w3 p1 p3 p2 c3 c2 c1 check +permutation r1 r2 w2 w3 p1 p3 c3 p2 c1 c2 check +permutation r1 r2 w2 w3 p1 p3 c3 p2 c2 c1 check +permutation r1 r2 w2 w3 p1 p3 c3 c1 p2 c2 check +permutation r1 r2 w2 w3 p2 p1 p3 c3 c1 c2 check +permutation r1 r2 w2 w3 p2 p1 p3 c3 c2 c1 check +permutation r1 r2 w2 w3 p2 p3 p1 c3 c1 c2 check +permutation r1 r2 w2 w3 p2 p3 p1 c3 c2 c1 check +permutation r1 r2 w2 w3 p2 p3 c3 p1 c1 c2 check +permutation r1 r2 w2 w3 p2 p3 c3 p1 c2 c1 check +permutation r1 r2 w2 w3 p2 p3 c3 c2 p1 c1 check +permutation r1 r2 w2 w3 p3 p1 p2 c3 c1 c2 check +permutation r1 r2 w2 w3 p3 p1 p2 c3 c2 c1 check +permutation r1 r2 w2 w3 p3 p1 c3 p2 c1 c2 check +permutation r1 r2 w2 w3 p3 p1 c3 p2 c2 c1 check +permutation r1 r2 w2 w3 p3 p1 c3 c1 p2 c2 check +permutation r1 r2 w2 w3 p3 p2 p1 c3 c1 c2 check +permutation r1 r2 w2 w3 p3 p2 p1 c3 c2 c1 check +permutation r1 r2 w2 w3 p3 p2 c3 p1 c1 c2 check +permutation r1 r2 w2 w3 p3 p2 c3 p1 c2 c1 check +permutation r1 r2 w2 w3 p3 p2 c3 c2 p1 c1 check +permutation r1 r2 w2 w3 p3 c3 p1 p2 c1 c2 check +permutation r1 r2 w2 w3 p3 c3 p1 p2 c2 c1 check +permutation r1 r2 w2 w3 p3 c3 p1 c1 p2 c2 check +permutation r1 r2 w2 w3 p3 c3 p2 p1 c1 c2 check +permutation r1 r2 w2 w3 p3 c3 p2 p1 c2 c1 check +permutation r1 r2 w2 w3 p3 c3 p2 c2 p1 c1 check +permutation r1 r2 w2 p1 w3 p2 p3 c3 c1 c2 check +permutation r1 r2 w2 p1 w3 p2 p3 c3 c2 c1 check +permutation r1 r2 w2 p1 w3 p3 p2 c3 c1 c2 check +permutation r1 r2 w2 p1 w3 p3 p2 c3 c2 c1 check +permutation r1 r2 w2 p1 w3 p3 c3 p2 c1 c2 check +permutation r1 r2 w2 p1 w3 p3 c3 p2 c2 c1 check +permutation r1 r2 w2 p1 w3 p3 c3 c1 p2 c2 check +permutation r1 r2 w2 p1 p2 w3 p3 c3 c1 c2 check +permutation r1 r2 w2 p1 p2 w3 p3 c3 c2 c1 check +permutation r1 r2 w2 p2 w3 p1 p3 c3 c1 c2 check +permutation r1 r2 w2 p2 w3 p1 p3 c3 c2 c1 check +permutation r1 r2 w2 p2 w3 p3 p1 c3 c1 c2 check +permutation r1 r2 w2 p2 w3 p3 p1 c3 c2 c1 check +permutation r1 r2 w2 p2 w3 p3 c3 p1 c1 c2 check +permutation r1 r2 w2 p2 w3 p3 c3 p1 c2 c1 check +permutation r1 r2 w2 p2 w3 p3 c3 c2 p1 c1 check +permutation r1 r2 w2 p2 p1 w3 p3 c3 c1 c2 check +permutation r1 r2 w2 p2 p1 w3 p3 c3 c2 c1 check +permutation r1 r2 p1 w2 w3 p2 p3 c3 c1 c2 check +permutation r1 r2 p1 w2 w3 p2 p3 c3 c2 c1 check +permutation r1 r2 p1 w2 w3 p3 p2 c3 c1 c2 check +permutation r1 r2 p1 w2 w3 p3 p2 c3 c2 c1 check +permutation r1 r2 p1 w2 w3 p3 c3 p2 c1 c2 check +permutation r1 r2 p1 w2 w3 p3 c3 p2 c2 c1 check +permutation r1 r2 p1 w2 w3 p3 c3 c1 p2 c2 check +permutation r1 r2 p1 w2 p2 w3 p3 c3 c1 c2 check +permutation r1 r2 p1 w2 p2 w3 p3 c3 c2 c1 check +permutation r1 w2 w3 r2 p1 p2 p3 c3 c1 c2 check +permutation r1 w2 w3 r2 p1 p2 p3 c3 c2 c1 check +permutation r1 w2 w3 r2 p1 p3 p2 c3 c1 c2 check +permutation r1 w2 w3 r2 p1 p3 p2 c3 c2 c1 check +permutation r1 w2 w3 r2 p1 p3 c3 p2 c1 c2 check +permutation r1 w2 w3 r2 p1 p3 c3 p2 c2 c1 check +permutation r1 w2 w3 r2 p1 p3 c3 c1 p2 c2 check +permutation r1 w2 w3 r2 p2 p1 p3 c3 c1 c2 check +permutation r1 w2 w3 r2 p2 p1 p3 c3 c2 c1 check +permutation r1 w2 w3 r2 p2 p3 p1 c3 c1 c2 check +permutation r1 w2 w3 r2 p2 p3 p1 c3 c2 c1 check +permutation r1 w2 w3 r2 p2 p3 c3 p1 c1 c2 check +permutation r1 w2 w3 r2 p2 p3 c3 p1 c2 c1 check +permutation r1 w2 w3 r2 p2 p3 c3 c2 p1 c1 check +permutation r1 w2 w3 r2 p3 p1 p2 c3 c1 c2 check +permutation r1 w2 w3 r2 p3 p1 p2 c3 c2 c1 check +permutation r1 w2 w3 r2 p3 p1 c3 p2 c1 c2 check +permutation r1 w2 w3 r2 p3 p1 c3 p2 c2 c1 check +permutation r1 w2 w3 r2 p3 p1 c3 c1 p2 c2 check +permutation r1 w2 w3 r2 p3 p2 p1 c3 c1 c2 check +permutation r1 w2 w3 r2 p3 p2 p1 c3 c2 c1 check +permutation r1 w2 w3 r2 p3 p2 c3 p1 c1 c2 check +permutation r1 w2 w3 r2 p3 p2 c3 p1 c2 c1 check +permutation r1 w2 w3 r2 p3 p2 c3 c2 p1 c1 check +permutation r1 w2 w3 r2 p3 c3 p1 p2 c1 c2 check +permutation r1 w2 w3 r2 p3 c3 p1 p2 c2 c1 check +permutation r1 w2 w3 r2 p3 c3 p1 c1 p2 c2 check +permutation r1 w2 w3 r2 p3 c3 p2 p1 c1 c2 check +permutation r1 w2 w3 r2 p3 c3 p2 p1 c2 c1 check +permutation r1 w2 w3 r2 p3 c3 p2 c2 p1 c1 check +permutation r1 w2 w3 p1 r2 p2 p3 c3 c1 c2 check +permutation r1 w2 w3 p1 r2 p2 p3 c3 c2 c1 check +permutation r1 w2 w3 p1 r2 p3 p2 c3 c1 c2 check +permutation r1 w2 w3 p1 r2 p3 p2 c3 c2 c1 check +permutation r1 w2 w3 p1 r2 p3 c3 p2 c1 c2 check +permutation r1 w2 w3 p1 r2 p3 c3 p2 c2 c1 check +permutation r1 w2 w3 p1 r2 p3 c3 c1 p2 c2 check +permutation r1 w2 w3 p1 p3 r2 p2 c3 c1 c2 check +permutation r1 w2 w3 p1 p3 r2 p2 c3 c2 c1 check +permutation r1 w2 w3 p1 p3 r2 c3 p2 c1 c2 check +permutation r1 w2 w3 p1 p3 r2 c3 p2 c2 c1 check +permutation r1 w2 w3 p1 p3 r2 c3 c1 p2 c2 check +permutation r1 w2 w3 p1 p3 c3 r2 p2 c1 c2 check +permutation r1 w2 w3 p1 p3 c3 r2 p2 c2 c1 check +permutation r1 w2 w3 p1 p3 c3 r2 c1 p2 c2 check +permutation r1 w2 w3 p1 p3 c3 c1 r2 p2 c2 check +permutation r1 w2 w3 p3 r2 p1 p2 c3 c1 c2 check +permutation r1 w2 w3 p3 r2 p1 p2 c3 c2 c1 check +permutation r1 w2 w3 p3 r2 p1 c3 p2 c1 c2 check +permutation r1 w2 w3 p3 r2 p1 c3 p2 c2 c1 check +permutation r1 w2 w3 p3 r2 p1 c3 c1 p2 c2 check +permutation r1 w2 w3 p3 r2 p2 p1 c3 c1 c2 check +permutation r1 w2 w3 p3 r2 p2 p1 c3 c2 c1 check +permutation r1 w2 w3 p3 r2 p2 c3 p1 c1 c2 check +permutation r1 w2 w3 p3 r2 p2 c3 p1 c2 c1 check +permutation r1 w2 w3 p3 r2 p2 c3 c2 p1 c1 check +permutation r1 w2 w3 p3 r2 c3 p1 p2 c1 c2 check +permutation r1 w2 w3 p3 r2 c3 p1 p2 c2 c1 check +permutation r1 w2 w3 p3 r2 c3 p1 c1 p2 c2 check +permutation r1 w2 w3 p3 r2 c3 p2 p1 c1 c2 check +permutation r1 w2 w3 p3 r2 c3 p2 p1 c2 c1 check +permutation r1 w2 w3 p3 r2 c3 p2 c2 p1 c1 check +permutation r1 w2 w3 p3 p1 r2 p2 c3 c1 c2 check +permutation r1 w2 w3 p3 p1 r2 p2 c3 c2 c1 check +permutation r1 w2 w3 p3 p1 r2 c3 p2 c1 c2 check +permutation r1 w2 w3 p3 p1 r2 c3 p2 c2 c1 check +permutation r1 w2 w3 p3 p1 r2 c3 c1 p2 c2 check +permutation r1 w2 w3 p3 p1 c3 r2 p2 c1 c2 check +permutation r1 w2 w3 p3 p1 c3 r2 p2 c2 c1 check +permutation r1 w2 w3 p3 p1 c3 r2 c1 p2 c2 check +permutation r1 w2 w3 p3 p1 c3 c1 r2 p2 c2 check +permutation r1 w2 w3 p3 c3 r2 p1 p2 c1 c2 check +permutation r1 w2 w3 p3 c3 r2 p1 p2 c2 c1 check +permutation r1 w2 w3 p3 c3 r2 p1 c1 p2 c2 check +permutation r1 w2 w3 p3 c3 r2 p2 p1 c1 c2 check +permutation r1 w2 w3 p3 c3 r2 p2 p1 c2 c1 check +permutation r1 w2 w3 p3 c3 r2 p2 c2 p1 c1 check +permutation r1 w2 w3 p3 c3 p1 r2 p2 c1 c2 check +permutation r1 w2 w3 p3 c3 p1 r2 p2 c2 c1 check +permutation r1 w2 w3 p3 c3 p1 r2 c1 p2 c2 check +permutation r1 w2 w3 p3 c3 p1 c1 r2 p2 c2 check +permutation r1 w2 p1 w3 r2 p2 p3 c3 c1 c2 check +permutation r1 w2 p1 w3 r2 p2 p3 c3 c2 c1 check +permutation r1 w2 p1 w3 r2 p3 p2 c3 c1 c2 check +permutation r1 w2 p1 w3 r2 p3 p2 c3 c2 c1 check +permutation r1 w2 p1 w3 r2 p3 c3 p2 c1 c2 check +permutation r1 w2 p1 w3 r2 p3 c3 p2 c2 c1 check +permutation r1 w2 p1 w3 r2 p3 c3 c1 p2 c2 check +permutation r1 w2 p1 w3 p3 r2 p2 c3 c1 c2 check +permutation r1 w2 p1 w3 p3 r2 p2 c3 c2 c1 check +permutation r1 w2 p1 w3 p3 r2 c3 p2 c1 c2 check +permutation r1 w2 p1 w3 p3 r2 c3 p2 c2 c1 check +permutation r1 w2 p1 w3 p3 r2 c3 c1 p2 c2 check +permutation r1 w2 p1 w3 p3 c3 r2 p2 c1 c2 check +permutation r1 w2 p1 w3 p3 c3 r2 p2 c2 c1 check +permutation r1 w2 p1 w3 p3 c3 r2 c1 p2 c2 check +permutation r1 w2 p1 w3 p3 c3 c1 r2 p2 c2 check +permutation r1 w3 r2 w2 p1 p2 p3 c3 c1 c2 check +permutation r1 w3 r2 w2 p1 p2 p3 c3 c2 c1 check +permutation r1 w3 r2 w2 p1 p3 p2 c3 c1 c2 check +permutation r1 w3 r2 w2 p1 p3 p2 c3 c2 c1 check +permutation r1 w3 r2 w2 p1 p3 c3 p2 c1 c2 check +permutation r1 w3 r2 w2 p1 p3 c3 p2 c2 c1 check +permutation r1 w3 r2 w2 p1 p3 c3 c1 p2 c2 check +permutation r1 w3 r2 w2 p2 p1 p3 c3 c1 c2 check +permutation r1 w3 r2 w2 p2 p1 p3 c3 c2 c1 check +permutation r1 w3 r2 w2 p2 p3 p1 c3 c1 c2 check +permutation r1 w3 r2 w2 p2 p3 p1 c3 c2 c1 check +permutation r1 w3 r2 w2 p2 p3 c3 p1 c1 c2 check +permutation r1 w3 r2 w2 p2 p3 c3 p1 c2 c1 check +permutation r1 w3 r2 w2 p2 p3 c3 c2 p1 c1 check +permutation r1 w3 r2 w2 p3 p1 p2 c3 c1 c2 check +permutation r1 w3 r2 w2 p3 p1 p2 c3 c2 c1 check +permutation r1 w3 r2 w2 p3 p1 c3 p2 c1 c2 check +permutation r1 w3 r2 w2 p3 p1 c3 p2 c2 c1 check +permutation r1 w3 r2 w2 p3 p1 c3 c1 p2 c2 check +permutation r1 w3 r2 w2 p3 p2 p1 c3 c1 c2 check +permutation r1 w3 r2 w2 p3 p2 p1 c3 c2 c1 check +permutation r1 w3 r2 w2 p3 p2 c3 p1 c1 c2 check +permutation r1 w3 r2 w2 p3 p2 c3 p1 c2 c1 check +permutation r1 w3 r2 w2 p3 p2 c3 c2 p1 c1 check +permutation r1 w3 r2 w2 p3 c3 p1 p2 c1 c2 check +permutation r1 w3 r2 w2 p3 c3 p1 p2 c2 c1 check +permutation r1 w3 r2 w2 p3 c3 p1 c1 p2 c2 check +permutation r1 w3 r2 w2 p3 c3 p2 p1 c1 c2 check +permutation r1 w3 r2 w2 p3 c3 p2 p1 c2 c1 check +permutation r1 w3 r2 w2 p3 c3 p2 c2 p1 c1 check +permutation r1 w3 r2 p1 w2 p2 p3 c3 c1 c2 check +permutation r1 w3 r2 p1 w2 p2 p3 c3 c2 c1 check +permutation r1 w3 r2 p1 w2 p3 p2 c3 c1 c2 check +permutation r1 w3 r2 p1 w2 p3 p2 c3 c2 c1 check +permutation r1 w3 r2 p1 w2 p3 c3 p2 c1 c2 check +permutation r1 w3 r2 p1 w2 p3 c3 p2 c2 c1 check +permutation r1 w3 r2 p1 w2 p3 c3 c1 p2 c2 check +permutation r1 w3 r2 p1 p3 w2 p2 c3 c1 c2 check +permutation r1 w3 r2 p1 p3 w2 p2 c3 c2 c1 check +permutation r1 w3 r2 p1 p3 w2 c3 p2 c1 c2 check +permutation r1 w3 r2 p1 p3 w2 c3 p2 c2 c1 check +permutation r1 w3 r2 p1 p3 w2 c3 c1 p2 c2 check +permutation r1 w3 r2 p1 p3 c3 w2 p2 c1 c2 check +permutation r1 w3 r2 p1 p3 c3 w2 p2 c2 c1 check +permutation r1 w3 r2 p1 p3 c3 w2 c1 p2 c2 check +permutation r1 w3 r2 p1 p3 c3 c1 w2 p2 c2 check +permutation r1 w3 r2 p3 w2 p1 p2 c3 c1 c2 check +permutation r1 w3 r2 p3 w2 p1 p2 c3 c2 c1 check +permutation r1 w3 r2 p3 w2 p1 c3 p2 c1 c2 check +permutation r1 w3 r2 p3 w2 p1 c3 p2 c2 c1 check +permutation r1 w3 r2 p3 w2 p1 c3 c1 p2 c2 check +permutation r1 w3 r2 p3 w2 p2 p1 c3 c1 c2 check +permutation r1 w3 r2 p3 w2 p2 p1 c3 c2 c1 check +permutation r1 w3 r2 p3 w2 p2 c3 p1 c1 c2 check +permutation r1 w3 r2 p3 w2 p2 c3 p1 c2 c1 check +permutation r1 w3 r2 p3 w2 p2 c3 c2 p1 c1 check +permutation r1 w3 r2 p3 w2 c3 p1 p2 c1 c2 check +permutation r1 w3 r2 p3 w2 c3 p1 p2 c2 c1 check +permutation r1 w3 r2 p3 w2 c3 p1 c1 p2 c2 check +permutation r1 w3 r2 p3 w2 c3 p2 p1 c1 c2 check +permutation r1 w3 r2 p3 w2 c3 p2 p1 c2 c1 check +permutation r1 w3 r2 p3 w2 c3 p2 c2 p1 c1 check +permutation r1 w3 r2 p3 p1 w2 p2 c3 c1 c2 check +permutation r1 w3 r2 p3 p1 w2 p2 c3 c2 c1 check +permutation r1 w3 r2 p3 p1 w2 c3 p2 c1 c2 check +permutation r1 w3 r2 p3 p1 w2 c3 p2 c2 c1 check +permutation r1 w3 r2 p3 p1 w2 c3 c1 p2 c2 check +permutation r1 w3 r2 p3 p1 c3 w2 p2 c1 c2 check +permutation r1 w3 r2 p3 p1 c3 w2 p2 c2 c1 check +permutation r1 w3 r2 p3 p1 c3 w2 c1 p2 c2 check +permutation r1 w3 r2 p3 p1 c3 c1 w2 p2 c2 check +permutation r1 w3 r2 p3 c3 w2 p1 p2 c1 c2 check +permutation r1 w3 r2 p3 c3 w2 p1 p2 c2 c1 check +permutation r1 w3 r2 p3 c3 w2 p1 c1 p2 c2 check +permutation r1 w3 r2 p3 c3 w2 p2 p1 c1 c2 check +permutation r1 w3 r2 p3 c3 w2 p2 p1 c2 c1 check +permutation r1 w3 r2 p3 c3 w2 p2 c2 p1 c1 check +permutation r1 w3 r2 p3 c3 p1 w2 p2 c1 c2 check +permutation r1 w3 r2 p3 c3 p1 w2 p2 c2 c1 check +permutation r1 w3 r2 p3 c3 p1 w2 c1 p2 c2 check +permutation r1 w3 r2 p3 c3 p1 c1 w2 p2 c2 check +permutation r1 w3 w2 r2 p1 p2 p3 c3 c1 c2 check +permutation r1 w3 w2 r2 p1 p2 p3 c3 c2 c1 check +permutation r1 w3 w2 r2 p1 p3 p2 c3 c1 c2 check +permutation r1 w3 w2 r2 p1 p3 p2 c3 c2 c1 check +permutation r1 w3 w2 r2 p1 p3 c3 p2 c1 c2 check +permutation r1 w3 w2 r2 p1 p3 c3 p2 c2 c1 check +permutation r1 w3 w2 r2 p1 p3 c3 c1 p2 c2 check +permutation r1 w3 w2 r2 p2 p1 p3 c3 c1 c2 check +permutation r1 w3 w2 r2 p2 p1 p3 c3 c2 c1 check +permutation r1 w3 w2 r2 p2 p3 p1 c3 c1 c2 check +permutation r1 w3 w2 r2 p2 p3 p1 c3 c2 c1 check +permutation r1 w3 w2 r2 p2 p3 c3 p1 c1 c2 check +permutation r1 w3 w2 r2 p2 p3 c3 p1 c2 c1 check +permutation r1 w3 w2 r2 p2 p3 c3 c2 p1 c1 check +permutation r1 w3 w2 r2 p3 p1 p2 c3 c1 c2 check +permutation r1 w3 w2 r2 p3 p1 p2 c3 c2 c1 check +permutation r1 w3 w2 r2 p3 p1 c3 p2 c1 c2 check +permutation r1 w3 w2 r2 p3 p1 c3 p2 c2 c1 check +permutation r1 w3 w2 r2 p3 p1 c3 c1 p2 c2 check +permutation r1 w3 w2 r2 p3 p2 p1 c3 c1 c2 check +permutation r1 w3 w2 r2 p3 p2 p1 c3 c2 c1 check +permutation r1 w3 w2 r2 p3 p2 c3 p1 c1 c2 check +permutation r1 w3 w2 r2 p3 p2 c3 p1 c2 c1 check +permutation r1 w3 w2 r2 p3 p2 c3 c2 p1 c1 check +permutation r1 w3 w2 r2 p3 c3 p1 p2 c1 c2 check +permutation r1 w3 w2 r2 p3 c3 p1 p2 c2 c1 check +permutation r1 w3 w2 r2 p3 c3 p1 c1 p2 c2 check +permutation r1 w3 w2 r2 p3 c3 p2 p1 c1 c2 check +permutation r1 w3 w2 r2 p3 c3 p2 p1 c2 c1 check +permutation r1 w3 w2 r2 p3 c3 p2 c2 p1 c1 check +permutation r1 w3 w2 p1 r2 p2 p3 c3 c1 c2 check +permutation r1 w3 w2 p1 r2 p2 p3 c3 c2 c1 check +permutation r1 w3 w2 p1 r2 p3 p2 c3 c1 c2 check +permutation r1 w3 w2 p1 r2 p3 p2 c3 c2 c1 check +permutation r1 w3 w2 p1 r2 p3 c3 p2 c1 c2 check +permutation r1 w3 w2 p1 r2 p3 c3 p2 c2 c1 check +permutation r1 w3 w2 p1 r2 p3 c3 c1 p2 c2 check +permutation r1 w3 w2 p1 p3 r2 p2 c3 c1 c2 check +permutation r1 w3 w2 p1 p3 r2 p2 c3 c2 c1 check +permutation r1 w3 w2 p1 p3 r2 c3 p2 c1 c2 check +permutation r1 w3 w2 p1 p3 r2 c3 p2 c2 c1 check +permutation r1 w3 w2 p1 p3 r2 c3 c1 p2 c2 check +permutation r1 w3 w2 p1 p3 c3 r2 p2 c1 c2 check +permutation r1 w3 w2 p1 p3 c3 r2 p2 c2 c1 check +permutation r1 w3 w2 p1 p3 c3 r2 c1 p2 c2 check +permutation r1 w3 w2 p1 p3 c3 c1 r2 p2 c2 check +permutation r1 w3 w2 p3 r2 p1 p2 c3 c1 c2 check +permutation r1 w3 w2 p3 r2 p1 p2 c3 c2 c1 check +permutation r1 w3 w2 p3 r2 p1 c3 p2 c1 c2 check +permutation r1 w3 w2 p3 r2 p1 c3 p2 c2 c1 check +permutation r1 w3 w2 p3 r2 p1 c3 c1 p2 c2 check +permutation r1 w3 w2 p3 r2 p2 p1 c3 c1 c2 check +permutation r1 w3 w2 p3 r2 p2 p1 c3 c2 c1 check +permutation r1 w3 w2 p3 r2 p2 c3 p1 c1 c2 check +permutation r1 w3 w2 p3 r2 p2 c3 p1 c2 c1 check +permutation r1 w3 w2 p3 r2 p2 c3 c2 p1 c1 check +permutation r1 w3 w2 p3 r2 c3 p1 p2 c1 c2 check +permutation r1 w3 w2 p3 r2 c3 p1 p2 c2 c1 check +permutation r1 w3 w2 p3 r2 c3 p1 c1 p2 c2 check +permutation r1 w3 w2 p3 r2 c3 p2 p1 c1 c2 check +permutation r1 w3 w2 p3 r2 c3 p2 p1 c2 c1 check +permutation r1 w3 w2 p3 r2 c3 p2 c2 p1 c1 check +permutation r1 w3 w2 p3 p1 r2 p2 c3 c1 c2 check +permutation r1 w3 w2 p3 p1 r2 p2 c3 c2 c1 check +permutation r1 w3 w2 p3 p1 r2 c3 p2 c1 c2 check +permutation r1 w3 w2 p3 p1 r2 c3 p2 c2 c1 check +permutation r1 w3 w2 p3 p1 r2 c3 c1 p2 c2 check +permutation r1 w3 w2 p3 p1 c3 r2 p2 c1 c2 check +permutation r1 w3 w2 p3 p1 c3 r2 p2 c2 c1 check +permutation r1 w3 w2 p3 p1 c3 r2 c1 p2 c2 check +permutation r1 w3 w2 p3 p1 c3 c1 r2 p2 c2 check +permutation r1 w3 w2 p3 c3 r2 p1 p2 c1 c2 check +permutation r1 w3 w2 p3 c3 r2 p1 p2 c2 c1 check +permutation r1 w3 w2 p3 c3 r2 p1 c1 p2 c2 check +permutation r1 w3 w2 p3 c3 r2 p2 p1 c1 c2 check +permutation r1 w3 w2 p3 c3 r2 p2 p1 c2 c1 check +permutation r1 w3 w2 p3 c3 r2 p2 c2 p1 c1 check +permutation r1 w3 w2 p3 c3 p1 r2 p2 c1 c2 check +permutation r1 w3 w2 p3 c3 p1 r2 p2 c2 c1 check +permutation r1 w3 w2 p3 c3 p1 r2 c1 p2 c2 check +permutation r1 w3 w2 p3 c3 p1 c1 r2 p2 c2 check +permutation r1 w3 p1 r2 w2 p2 p3 c3 c1 c2 check +permutation r1 w3 p1 r2 w2 p2 p3 c3 c2 c1 check +permutation r1 w3 p1 r2 w2 p3 p2 c3 c1 c2 check +permutation r1 w3 p1 r2 w2 p3 p2 c3 c2 c1 check +permutation r1 w3 p1 r2 w2 p3 c3 p2 c1 c2 check +permutation r1 w3 p1 r2 w2 p3 c3 p2 c2 c1 check +permutation r1 w3 p1 r2 w2 p3 c3 c1 p2 c2 check +permutation r1 w3 p1 r2 p3 w2 p2 c3 c1 c2 check +permutation r1 w3 p1 r2 p3 w2 p2 c3 c2 c1 check +permutation r1 w3 p1 r2 p3 w2 c3 p2 c1 c2 check +permutation r1 w3 p1 r2 p3 w2 c3 p2 c2 c1 check +permutation r1 w3 p1 r2 p3 w2 c3 c1 p2 c2 check +permutation r1 w3 p1 r2 p3 c3 w2 p2 c1 c2 check +permutation r1 w3 p1 r2 p3 c3 w2 p2 c2 c1 check +permutation r1 w3 p1 r2 p3 c3 w2 c1 p2 c2 check +permutation r1 w3 p1 r2 p3 c3 c1 w2 p2 c2 check +permutation r1 w3 p1 w2 r2 p2 p3 c3 c1 c2 check +permutation r1 w3 p1 w2 r2 p2 p3 c3 c2 c1 check +permutation r1 w3 p1 w2 r2 p3 p2 c3 c1 c2 check +permutation r1 w3 p1 w2 r2 p3 p2 c3 c2 c1 check +permutation r1 w3 p1 w2 r2 p3 c3 p2 c1 c2 check +permutation r1 w3 p1 w2 r2 p3 c3 p2 c2 c1 check +permutation r1 w3 p1 w2 r2 p3 c3 c1 p2 c2 check +permutation r1 w3 p1 w2 p3 r2 p2 c3 c1 c2 check +permutation r1 w3 p1 w2 p3 r2 p2 c3 c2 c1 check +permutation r1 w3 p1 w2 p3 r2 c3 p2 c1 c2 check +permutation r1 w3 p1 w2 p3 r2 c3 p2 c2 c1 check +permutation r1 w3 p1 w2 p3 r2 c3 c1 p2 c2 check +permutation r1 w3 p1 w2 p3 c3 r2 p2 c1 c2 check +permutation r1 w3 p1 w2 p3 c3 r2 p2 c2 c1 check +permutation r1 w3 p1 w2 p3 c3 r2 c1 p2 c2 check +permutation r1 w3 p1 w2 p3 c3 c1 r2 p2 c2 check +permutation r1 w3 p1 p3 r2 w2 p2 c3 c1 c2 check +permutation r1 w3 p1 p3 r2 w2 p2 c3 c2 c1 check +permutation r1 w3 p1 p3 r2 w2 c3 p2 c1 c2 check +permutation r1 w3 p1 p3 r2 w2 c3 p2 c2 c1 check +permutation r1 w3 p1 p3 r2 w2 c3 c1 p2 c2 check +permutation r1 w3 p1 p3 r2 c3 w2 p2 c1 c2 check +permutation r1 w3 p1 p3 r2 c3 w2 p2 c2 c1 check +permutation r1 w3 p1 p3 r2 c3 w2 c1 p2 c2 check +permutation r1 w3 p1 p3 r2 c3 c1 w2 p2 c2 check +permutation r1 w3 p1 p3 w2 r2 p2 c3 c1 c2 check +permutation r1 w3 p1 p3 w2 r2 p2 c3 c2 c1 check +permutation r1 w3 p1 p3 w2 r2 c3 p2 c1 c2 check +permutation r1 w3 p1 p3 w2 r2 c3 p2 c2 c1 check +permutation r1 w3 p1 p3 w2 r2 c3 c1 p2 c2 check +permutation r1 w3 p1 p3 w2 c3 r2 p2 c1 c2 check +permutation r1 w3 p1 p3 w2 c3 r2 p2 c2 c1 check +permutation r1 w3 p1 p3 w2 c3 r2 c1 p2 c2 check +permutation r1 w3 p1 p3 w2 c3 c1 r2 p2 c2 check +permutation r1 w3 p1 p3 c3 r2 w2 p2 c1 c2 check +permutation r1 w3 p1 p3 c3 r2 w2 p2 c2 c1 check +permutation r1 w3 p1 p3 c3 r2 w2 c1 p2 c2 check +permutation r1 w3 p1 p3 c3 r2 c1 w2 p2 c2 check +permutation r1 w3 p1 p3 c3 w2 r2 p2 c1 c2 check +permutation r1 w3 p1 p3 c3 w2 r2 p2 c2 c1 check +permutation r1 w3 p1 p3 c3 w2 r2 c1 p2 c2 check +permutation r1 w3 p1 p3 c3 w2 c1 r2 p2 c2 check +permutation r1 w3 p1 p3 c3 c1 r2 w2 p2 c2 check +permutation r1 w3 p1 p3 c3 c1 w2 r2 p2 c2 check +permutation r1 w3 p3 r2 w2 p1 p2 c3 c1 c2 check +permutation r1 w3 p3 r2 w2 p1 p2 c3 c2 c1 check +permutation r1 w3 p3 r2 w2 p1 c3 p2 c1 c2 check +permutation r1 w3 p3 r2 w2 p1 c3 p2 c2 c1 check +permutation r1 w3 p3 r2 w2 p1 c3 c1 p2 c2 check +permutation r1 w3 p3 r2 w2 p2 p1 c3 c1 c2 check +permutation r1 w3 p3 r2 w2 p2 p1 c3 c2 c1 check +permutation r1 w3 p3 r2 w2 p2 c3 p1 c1 c2 check +permutation r1 w3 p3 r2 w2 p2 c3 p1 c2 c1 check +permutation r1 w3 p3 r2 w2 p2 c3 c2 p1 c1 check +permutation r1 w3 p3 r2 w2 c3 p1 p2 c1 c2 check +permutation r1 w3 p3 r2 w2 c3 p1 p2 c2 c1 check +permutation r1 w3 p3 r2 w2 c3 p1 c1 p2 c2 check +permutation r1 w3 p3 r2 w2 c3 p2 p1 c1 c2 check +permutation r1 w3 p3 r2 w2 c3 p2 p1 c2 c1 check +permutation r1 w3 p3 r2 w2 c3 p2 c2 p1 c1 check +permutation r1 w3 p3 r2 p1 w2 p2 c3 c1 c2 check +permutation r1 w3 p3 r2 p1 w2 p2 c3 c2 c1 check +permutation r1 w3 p3 r2 p1 w2 c3 p2 c1 c2 check +permutation r1 w3 p3 r2 p1 w2 c3 p2 c2 c1 check +permutation r1 w3 p3 r2 p1 w2 c3 c1 p2 c2 check +permutation r1 w3 p3 r2 p1 c3 w2 p2 c1 c2 check +permutation r1 w3 p3 r2 p1 c3 w2 p2 c2 c1 check +permutation r1 w3 p3 r2 p1 c3 w2 c1 p2 c2 check +permutation r1 w3 p3 r2 p1 c3 c1 w2 p2 c2 check +permutation r1 w3 p3 r2 c3 w2 p1 p2 c1 c2 check +permutation r1 w3 p3 r2 c3 w2 p1 p2 c2 c1 check +permutation r1 w3 p3 r2 c3 w2 p1 c1 p2 c2 check +permutation r1 w3 p3 r2 c3 w2 p2 p1 c1 c2 check +permutation r1 w3 p3 r2 c3 w2 p2 p1 c2 c1 check +permutation r1 w3 p3 r2 c3 w2 p2 c2 p1 c1 check +permutation r1 w3 p3 r2 c3 p1 w2 p2 c1 c2 check +permutation r1 w3 p3 r2 c3 p1 w2 p2 c2 c1 check +permutation r1 w3 p3 r2 c3 p1 w2 c1 p2 c2 check +permutation r1 w3 p3 r2 c3 p1 c1 w2 p2 c2 check +permutation r1 w3 p3 w2 r2 p1 p2 c3 c1 c2 check +permutation r1 w3 p3 w2 r2 p1 p2 c3 c2 c1 check +permutation r1 w3 p3 w2 r2 p1 c3 p2 c1 c2 check +permutation r1 w3 p3 w2 r2 p1 c3 p2 c2 c1 check +permutation r1 w3 p3 w2 r2 p1 c3 c1 p2 c2 check +permutation r1 w3 p3 w2 r2 p2 p1 c3 c1 c2 check +permutation r1 w3 p3 w2 r2 p2 p1 c3 c2 c1 check +permutation r1 w3 p3 w2 r2 p2 c3 p1 c1 c2 check +permutation r1 w3 p3 w2 r2 p2 c3 p1 c2 c1 check +permutation r1 w3 p3 w2 r2 p2 c3 c2 p1 c1 check +permutation r1 w3 p3 w2 r2 c3 p1 p2 c1 c2 check +permutation r1 w3 p3 w2 r2 c3 p1 p2 c2 c1 check +permutation r1 w3 p3 w2 r2 c3 p1 c1 p2 c2 check +permutation r1 w3 p3 w2 r2 c3 p2 p1 c1 c2 check +permutation r1 w3 p3 w2 r2 c3 p2 p1 c2 c1 check +permutation r1 w3 p3 w2 r2 c3 p2 c2 p1 c1 check +permutation r1 w3 p3 w2 p1 r2 p2 c3 c1 c2 check +permutation r1 w3 p3 w2 p1 r2 p2 c3 c2 c1 check +permutation r1 w3 p3 w2 p1 r2 c3 p2 c1 c2 check +permutation r1 w3 p3 w2 p1 r2 c3 p2 c2 c1 check +permutation r1 w3 p3 w2 p1 r2 c3 c1 p2 c2 check +permutation r1 w3 p3 w2 p1 c3 r2 p2 c1 c2 check +permutation r1 w3 p3 w2 p1 c3 r2 p2 c2 c1 check +permutation r1 w3 p3 w2 p1 c3 r2 c1 p2 c2 check +permutation r1 w3 p3 w2 p1 c3 c1 r2 p2 c2 check +permutation r1 w3 p3 w2 c3 r2 p1 p2 c1 c2 check +permutation r1 w3 p3 w2 c3 r2 p1 p2 c2 c1 check +permutation r1 w3 p3 w2 c3 r2 p1 c1 p2 c2 check +permutation r1 w3 p3 w2 c3 r2 p2 p1 c1 c2 check +permutation r1 w3 p3 w2 c3 r2 p2 p1 c2 c1 check +permutation r1 w3 p3 w2 c3 r2 p2 c2 p1 c1 check +permutation r1 w3 p3 w2 c3 p1 r2 p2 c1 c2 check +permutation r1 w3 p3 w2 c3 p1 r2 p2 c2 c1 check +permutation r1 w3 p3 w2 c3 p1 r2 c1 p2 c2 check +permutation r1 w3 p3 w2 c3 p1 c1 r2 p2 c2 check +permutation r1 w3 p3 p1 r2 w2 p2 c3 c1 c2 check +permutation r1 w3 p3 p1 r2 w2 p2 c3 c2 c1 check +permutation r1 w3 p3 p1 r2 w2 c3 p2 c1 c2 check +permutation r1 w3 p3 p1 r2 w2 c3 p2 c2 c1 check +permutation r1 w3 p3 p1 r2 w2 c3 c1 p2 c2 check +permutation r1 w3 p3 p1 r2 c3 w2 p2 c1 c2 check +permutation r1 w3 p3 p1 r2 c3 w2 p2 c2 c1 check +permutation r1 w3 p3 p1 r2 c3 w2 c1 p2 c2 check +permutation r1 w3 p3 p1 r2 c3 c1 w2 p2 c2 check +permutation r1 w3 p3 p1 w2 r2 p2 c3 c1 c2 check +permutation r1 w3 p3 p1 w2 r2 p2 c3 c2 c1 check +permutation r1 w3 p3 p1 w2 r2 c3 p2 c1 c2 check +permutation r1 w3 p3 p1 w2 r2 c3 p2 c2 c1 check +permutation r1 w3 p3 p1 w2 r2 c3 c1 p2 c2 check +permutation r1 w3 p3 p1 w2 c3 r2 p2 c1 c2 check +permutation r1 w3 p3 p1 w2 c3 r2 p2 c2 c1 check +permutation r1 w3 p3 p1 w2 c3 r2 c1 p2 c2 check +permutation r1 w3 p3 p1 w2 c3 c1 r2 p2 c2 check +permutation r1 w3 p3 p1 c3 r2 w2 p2 c1 c2 check +permutation r1 w3 p3 p1 c3 r2 w2 p2 c2 c1 check +permutation r1 w3 p3 p1 c3 r2 w2 c1 p2 c2 check +permutation r1 w3 p3 p1 c3 r2 c1 w2 p2 c2 check +permutation r1 w3 p3 p1 c3 w2 r2 p2 c1 c2 check +permutation r1 w3 p3 p1 c3 w2 r2 p2 c2 c1 check +permutation r1 w3 p3 p1 c3 w2 r2 c1 p2 c2 check +permutation r1 w3 p3 p1 c3 w2 c1 r2 p2 c2 check +permutation r1 w3 p3 p1 c3 c1 r2 w2 p2 c2 check +permutation r1 w3 p3 p1 c3 c1 w2 r2 p2 c2 check +permutation r1 w3 p3 c3 r2 w2 p1 p2 c1 c2 check +permutation r1 w3 p3 c3 r2 w2 p1 p2 c2 c1 check +permutation r1 w3 p3 c3 r2 w2 p1 c1 p2 c2 check +permutation r1 w3 p3 c3 r2 w2 p2 p1 c1 c2 check +permutation r1 w3 p3 c3 r2 w2 p2 p1 c2 c1 check +permutation r1 w3 p3 c3 r2 w2 p2 c2 p1 c1 check +permutation r1 w3 p3 c3 r2 p1 w2 p2 c1 c2 check +permutation r1 w3 p3 c3 r2 p1 w2 p2 c2 c1 check +permutation r1 w3 p3 c3 r2 p1 w2 c1 p2 c2 check +permutation r1 w3 p3 c3 r2 p1 c1 w2 p2 c2 check +permutation r1 w3 p3 c3 w2 r2 p1 p2 c1 c2 check +permutation r1 w3 p3 c3 w2 r2 p1 p2 c2 c1 check +permutation r1 w3 p3 c3 w2 r2 p1 c1 p2 c2 check +permutation r1 w3 p3 c3 w2 r2 p2 p1 c1 c2 check +permutation r1 w3 p3 c3 w2 r2 p2 p1 c2 c1 check +permutation r1 w3 p3 c3 w2 r2 p2 c2 p1 c1 check +permutation r1 w3 p3 c3 w2 p1 r2 p2 c1 c2 check +permutation r1 w3 p3 c3 w2 p1 r2 p2 c2 c1 check +permutation r1 w3 p3 c3 w2 p1 r2 c1 p2 c2 check +permutation r1 w3 p3 c3 w2 p1 c1 r2 p2 c2 check +permutation r1 w3 p3 c3 p1 r2 w2 p2 c1 c2 check +permutation r1 w3 p3 c3 p1 r2 w2 p2 c2 c1 check +permutation r1 w3 p3 c3 p1 r2 w2 c1 p2 c2 check +permutation r1 w3 p3 c3 p1 r2 c1 w2 p2 c2 check +permutation r1 w3 p3 c3 p1 w2 r2 p2 c1 c2 check +permutation r1 w3 p3 c3 p1 w2 r2 p2 c2 c1 check +permutation r1 w3 p3 c3 p1 w2 r2 c1 p2 c2 check +permutation r1 w3 p3 c3 p1 w2 c1 r2 p2 c2 check +permutation r1 w3 p3 c3 p1 c1 r2 w2 p2 c2 check +permutation r1 w3 p3 c3 p1 c1 w2 r2 p2 c2 check +permutation r1 p1 r2 w2 w3 p2 p3 c3 c1 c2 check +permutation r1 p1 r2 w2 w3 p2 p3 c3 c2 c1 check +permutation r1 p1 r2 w2 w3 p3 p2 c3 c1 c2 check +permutation r1 p1 r2 w2 w3 p3 p2 c3 c2 c1 check +permutation r1 p1 r2 w2 w3 p3 c3 p2 c1 c2 check +permutation r1 p1 r2 w2 w3 p3 c3 p2 c2 c1 check +permutation r1 p1 r2 w2 w3 p3 c3 c1 p2 c2 check +permutation r1 p1 r2 w2 p2 w3 p3 c3 c1 c2 check +permutation r1 p1 r2 w2 p2 w3 p3 c3 c2 c1 check +permutation r1 p1 w2 w3 r2 p2 p3 c3 c1 c2 check +permutation r1 p1 w2 w3 r2 p2 p3 c3 c2 c1 check +permutation r1 p1 w2 w3 r2 p3 p2 c3 c1 c2 check +permutation r1 p1 w2 w3 r2 p3 p2 c3 c2 c1 check +permutation r1 p1 w2 w3 r2 p3 c3 p2 c1 c2 check +permutation r1 p1 w2 w3 r2 p3 c3 p2 c2 c1 check +permutation r1 p1 w2 w3 r2 p3 c3 c1 p2 c2 check +permutation r1 p1 w2 w3 p3 r2 p2 c3 c1 c2 check +permutation r1 p1 w2 w3 p3 r2 p2 c3 c2 c1 check +permutation r1 p1 w2 w3 p3 r2 c3 p2 c1 c2 check +permutation r1 p1 w2 w3 p3 r2 c3 p2 c2 c1 check +permutation r1 p1 w2 w3 p3 r2 c3 c1 p2 c2 check +permutation r1 p1 w2 w3 p3 c3 r2 p2 c1 c2 check +permutation r1 p1 w2 w3 p3 c3 r2 p2 c2 c1 check +permutation r1 p1 w2 w3 p3 c3 r2 c1 p2 c2 check +permutation r1 p1 w2 w3 p3 c3 c1 r2 p2 c2 check +permutation r1 p1 w3 r2 w2 p2 p3 c3 c1 c2 check +permutation r1 p1 w3 r2 w2 p2 p3 c3 c2 c1 check +permutation r1 p1 w3 r2 w2 p3 p2 c3 c1 c2 check +permutation r1 p1 w3 r2 w2 p3 p2 c3 c2 c1 check +permutation r1 p1 w3 r2 w2 p3 c3 p2 c1 c2 check +permutation r1 p1 w3 r2 w2 p3 c3 p2 c2 c1 check +permutation r1 p1 w3 r2 w2 p3 c3 c1 p2 c2 check +permutation r1 p1 w3 r2 p3 w2 p2 c3 c1 c2 check +permutation r1 p1 w3 r2 p3 w2 p2 c3 c2 c1 check +permutation r1 p1 w3 r2 p3 w2 c3 p2 c1 c2 check +permutation r1 p1 w3 r2 p3 w2 c3 p2 c2 c1 check +permutation r1 p1 w3 r2 p3 w2 c3 c1 p2 c2 check +permutation r1 p1 w3 r2 p3 c3 w2 p2 c1 c2 check +permutation r1 p1 w3 r2 p3 c3 w2 p2 c2 c1 check +permutation r1 p1 w3 r2 p3 c3 w2 c1 p2 c2 check +permutation r1 p1 w3 r2 p3 c3 c1 w2 p2 c2 check +permutation r1 p1 w3 w2 r2 p2 p3 c3 c1 c2 check +permutation r1 p1 w3 w2 r2 p2 p3 c3 c2 c1 check +permutation r1 p1 w3 w2 r2 p3 p2 c3 c1 c2 check +permutation r1 p1 w3 w2 r2 p3 p2 c3 c2 c1 check +permutation r1 p1 w3 w2 r2 p3 c3 p2 c1 c2 check +permutation r1 p1 w3 w2 r2 p3 c3 p2 c2 c1 check +permutation r1 p1 w3 w2 r2 p3 c3 c1 p2 c2 check +permutation r1 p1 w3 w2 p3 r2 p2 c3 c1 c2 check +permutation r1 p1 w3 w2 p3 r2 p2 c3 c2 c1 check +permutation r1 p1 w3 w2 p3 r2 c3 p2 c1 c2 check +permutation r1 p1 w3 w2 p3 r2 c3 p2 c2 c1 check +permutation r1 p1 w3 w2 p3 r2 c3 c1 p2 c2 check +permutation r1 p1 w3 w2 p3 c3 r2 p2 c1 c2 check +permutation r1 p1 w3 w2 p3 c3 r2 p2 c2 c1 check +permutation r1 p1 w3 w2 p3 c3 r2 c1 p2 c2 check +permutation r1 p1 w3 w2 p3 c3 c1 r2 p2 c2 check +permutation r1 p1 w3 p3 r2 w2 p2 c3 c1 c2 check +permutation r1 p1 w3 p3 r2 w2 p2 c3 c2 c1 check +permutation r1 p1 w3 p3 r2 w2 c3 p2 c1 c2 check +permutation r1 p1 w3 p3 r2 w2 c3 p2 c2 c1 check +permutation r1 p1 w3 p3 r2 w2 c3 c1 p2 c2 check +permutation r1 p1 w3 p3 r2 c3 w2 p2 c1 c2 check +permutation r1 p1 w3 p3 r2 c3 w2 p2 c2 c1 check +permutation r1 p1 w3 p3 r2 c3 w2 c1 p2 c2 check +permutation r1 p1 w3 p3 r2 c3 c1 w2 p2 c2 check +permutation r1 p1 w3 p3 w2 r2 p2 c3 c1 c2 check +permutation r1 p1 w3 p3 w2 r2 p2 c3 c2 c1 check +permutation r1 p1 w3 p3 w2 r2 c3 p2 c1 c2 check +permutation r1 p1 w3 p3 w2 r2 c3 p2 c2 c1 check +permutation r1 p1 w3 p3 w2 r2 c3 c1 p2 c2 check +permutation r1 p1 w3 p3 w2 c3 r2 p2 c1 c2 check +permutation r1 p1 w3 p3 w2 c3 r2 p2 c2 c1 check +permutation r1 p1 w3 p3 w2 c3 r2 c1 p2 c2 check +permutation r1 p1 w3 p3 w2 c3 c1 r2 p2 c2 check +permutation r1 p1 w3 p3 c3 r2 w2 p2 c1 c2 check +permutation r1 p1 w3 p3 c3 r2 w2 p2 c2 c1 check +permutation r1 p1 w3 p3 c3 r2 w2 c1 p2 c2 check +permutation r1 p1 w3 p3 c3 r2 c1 w2 p2 c2 check +permutation r1 p1 w3 p3 c3 w2 r2 p2 c1 c2 check +permutation r1 p1 w3 p3 c3 w2 r2 p2 c2 c1 check +permutation r1 p1 w3 p3 c3 w2 r2 c1 p2 c2 check +permutation r1 p1 w3 p3 c3 w2 c1 r2 p2 c2 check +permutation r1 p1 w3 p3 c3 c1 r2 w2 p2 c2 check +permutation r1 p1 w3 p3 c3 c1 w2 r2 p2 c2 check +permutation w2 r1 r2 w3 p1 p2 p3 c3 c1 c2 check +permutation w2 r1 r2 w3 p1 p2 p3 c3 c2 c1 check +permutation w2 r1 r2 w3 p1 p3 p2 c3 c1 c2 check +permutation w2 r1 r2 w3 p1 p3 p2 c3 c2 c1 check +permutation w2 r1 r2 w3 p1 p3 c3 p2 c1 c2 check +permutation w2 r1 r2 w3 p1 p3 c3 p2 c2 c1 check +permutation w2 r1 r2 w3 p1 p3 c3 c1 p2 c2 check +permutation w2 r1 r2 w3 p2 p1 p3 c3 c1 c2 check +permutation w2 r1 r2 w3 p2 p1 p3 c3 c2 c1 check +permutation w2 r1 r2 w3 p2 p3 p1 c3 c1 c2 check +permutation w2 r1 r2 w3 p2 p3 p1 c3 c2 c1 check +permutation w2 r1 r2 w3 p2 p3 c3 p1 c1 c2 check +permutation w2 r1 r2 w3 p2 p3 c3 p1 c2 c1 check +permutation w2 r1 r2 w3 p2 p3 c3 c2 p1 c1 check +permutation w2 r1 r2 w3 p3 p1 p2 c3 c1 c2 check +permutation w2 r1 r2 w3 p3 p1 p2 c3 c2 c1 check +permutation w2 r1 r2 w3 p3 p1 c3 p2 c1 c2 check +permutation w2 r1 r2 w3 p3 p1 c3 p2 c2 c1 check +permutation w2 r1 r2 w3 p3 p1 c3 c1 p2 c2 check +permutation w2 r1 r2 w3 p3 p2 p1 c3 c1 c2 check +permutation w2 r1 r2 w3 p3 p2 p1 c3 c2 c1 check +permutation w2 r1 r2 w3 p3 p2 c3 p1 c1 c2 check +permutation w2 r1 r2 w3 p3 p2 c3 p1 c2 c1 check +permutation w2 r1 r2 w3 p3 p2 c3 c2 p1 c1 check +permutation w2 r1 r2 w3 p3 c3 p1 p2 c1 c2 check +permutation w2 r1 r2 w3 p3 c3 p1 p2 c2 c1 check +permutation w2 r1 r2 w3 p3 c3 p1 c1 p2 c2 check +permutation w2 r1 r2 w3 p3 c3 p2 p1 c1 c2 check +permutation w2 r1 r2 w3 p3 c3 p2 p1 c2 c1 check +permutation w2 r1 r2 w3 p3 c3 p2 c2 p1 c1 check +permutation w2 r1 r2 p1 w3 p2 p3 c3 c1 c2 check +permutation w2 r1 r2 p1 w3 p2 p3 c3 c2 c1 check +permutation w2 r1 r2 p1 w3 p3 p2 c3 c1 c2 check +permutation w2 r1 r2 p1 w3 p3 p2 c3 c2 c1 check +permutation w2 r1 r2 p1 w3 p3 c3 p2 c1 c2 check +permutation w2 r1 r2 p1 w3 p3 c3 p2 c2 c1 check +permutation w2 r1 r2 p1 w3 p3 c3 c1 p2 c2 check +permutation w2 r1 r2 p1 p2 w3 p3 c3 c1 c2 check +permutation w2 r1 r2 p1 p2 w3 p3 c3 c2 c1 check +permutation w2 r1 r2 p2 w3 p1 p3 c3 c1 c2 check +permutation w2 r1 r2 p2 w3 p1 p3 c3 c2 c1 check +permutation w2 r1 r2 p2 w3 p3 p1 c3 c1 c2 check +permutation w2 r1 r2 p2 w3 p3 p1 c3 c2 c1 check +permutation w2 r1 r2 p2 w3 p3 c3 p1 c1 c2 check +permutation w2 r1 r2 p2 w3 p3 c3 p1 c2 c1 check +permutation w2 r1 r2 p2 w3 p3 c3 c2 p1 c1 check +permutation w2 r1 r2 p2 p1 w3 p3 c3 c1 c2 check +permutation w2 r1 r2 p2 p1 w3 p3 c3 c2 c1 check +permutation w2 r1 w3 r2 p1 p2 p3 c3 c1 c2 check +permutation w2 r1 w3 r2 p1 p2 p3 c3 c2 c1 check +permutation w2 r1 w3 r2 p1 p3 p2 c3 c1 c2 check +permutation w2 r1 w3 r2 p1 p3 p2 c3 c2 c1 check +permutation w2 r1 w3 r2 p1 p3 c3 p2 c1 c2 check +permutation w2 r1 w3 r2 p1 p3 c3 p2 c2 c1 check +permutation w2 r1 w3 r2 p1 p3 c3 c1 p2 c2 check +permutation w2 r1 w3 r2 p2 p1 p3 c3 c1 c2 check +permutation w2 r1 w3 r2 p2 p1 p3 c3 c2 c1 check +permutation w2 r1 w3 r2 p2 p3 p1 c3 c1 c2 check +permutation w2 r1 w3 r2 p2 p3 p1 c3 c2 c1 check +permutation w2 r1 w3 r2 p2 p3 c3 p1 c1 c2 check +permutation w2 r1 w3 r2 p2 p3 c3 p1 c2 c1 check +permutation w2 r1 w3 r2 p2 p3 c3 c2 p1 c1 check +permutation w2 r1 w3 r2 p3 p1 p2 c3 c1 c2 check +permutation w2 r1 w3 r2 p3 p1 p2 c3 c2 c1 check +permutation w2 r1 w3 r2 p3 p1 c3 p2 c1 c2 check +permutation w2 r1 w3 r2 p3 p1 c3 p2 c2 c1 check +permutation w2 r1 w3 r2 p3 p1 c3 c1 p2 c2 check +permutation w2 r1 w3 r2 p3 p2 p1 c3 c1 c2 check +permutation w2 r1 w3 r2 p3 p2 p1 c3 c2 c1 check +permutation w2 r1 w3 r2 p3 p2 c3 p1 c1 c2 check +permutation w2 r1 w3 r2 p3 p2 c3 p1 c2 c1 check +permutation w2 r1 w3 r2 p3 p2 c3 c2 p1 c1 check +permutation w2 r1 w3 r2 p3 c3 p1 p2 c1 c2 check +permutation w2 r1 w3 r2 p3 c3 p1 p2 c2 c1 check +permutation w2 r1 w3 r2 p3 c3 p1 c1 p2 c2 check +permutation w2 r1 w3 r2 p3 c3 p2 p1 c1 c2 check +permutation w2 r1 w3 r2 p3 c3 p2 p1 c2 c1 check +permutation w2 r1 w3 r2 p3 c3 p2 c2 p1 c1 check +permutation w2 r1 w3 p1 r2 p2 p3 c3 c1 c2 check +permutation w2 r1 w3 p1 r2 p2 p3 c3 c2 c1 check +permutation w2 r1 w3 p1 r2 p3 p2 c3 c1 c2 check +permutation w2 r1 w3 p1 r2 p3 p2 c3 c2 c1 check +permutation w2 r1 w3 p1 r2 p3 c3 p2 c1 c2 check +permutation w2 r1 w3 p1 r2 p3 c3 p2 c2 c1 check +permutation w2 r1 w3 p1 r2 p3 c3 c1 p2 c2 check +permutation w2 r1 w3 p1 p3 r2 p2 c3 c1 c2 check +permutation w2 r1 w3 p1 p3 r2 p2 c3 c2 c1 check +permutation w2 r1 w3 p1 p3 r2 c3 p2 c1 c2 check +permutation w2 r1 w3 p1 p3 r2 c3 p2 c2 c1 check +permutation w2 r1 w3 p1 p3 r2 c3 c1 p2 c2 check +permutation w2 r1 w3 p1 p3 c3 r2 p2 c1 c2 check +permutation w2 r1 w3 p1 p3 c3 r2 p2 c2 c1 check +permutation w2 r1 w3 p1 p3 c3 r2 c1 p2 c2 check +permutation w2 r1 w3 p1 p3 c3 c1 r2 p2 c2 check +permutation w2 r1 w3 p3 r2 p1 p2 c3 c1 c2 check +permutation w2 r1 w3 p3 r2 p1 p2 c3 c2 c1 check +permutation w2 r1 w3 p3 r2 p1 c3 p2 c1 c2 check +permutation w2 r1 w3 p3 r2 p1 c3 p2 c2 c1 check +permutation w2 r1 w3 p3 r2 p1 c3 c1 p2 c2 check +permutation w2 r1 w3 p3 r2 p2 p1 c3 c1 c2 check +permutation w2 r1 w3 p3 r2 p2 p1 c3 c2 c1 check +permutation w2 r1 w3 p3 r2 p2 c3 p1 c1 c2 check +permutation w2 r1 w3 p3 r2 p2 c3 p1 c2 c1 check +permutation w2 r1 w3 p3 r2 p2 c3 c2 p1 c1 check +permutation w2 r1 w3 p3 r2 c3 p1 p2 c1 c2 check +permutation w2 r1 w3 p3 r2 c3 p1 p2 c2 c1 check +permutation w2 r1 w3 p3 r2 c3 p1 c1 p2 c2 check +permutation w2 r1 w3 p3 r2 c3 p2 p1 c1 c2 check +permutation w2 r1 w3 p3 r2 c3 p2 p1 c2 c1 check +permutation w2 r1 w3 p3 r2 c3 p2 c2 p1 c1 check +permutation w2 r1 w3 p3 p1 r2 p2 c3 c1 c2 check +permutation w2 r1 w3 p3 p1 r2 p2 c3 c2 c1 check +permutation w2 r1 w3 p3 p1 r2 c3 p2 c1 c2 check +permutation w2 r1 w3 p3 p1 r2 c3 p2 c2 c1 check +permutation w2 r1 w3 p3 p1 r2 c3 c1 p2 c2 check +permutation w2 r1 w3 p3 p1 c3 r2 p2 c1 c2 check +permutation w2 r1 w3 p3 p1 c3 r2 p2 c2 c1 check +permutation w2 r1 w3 p3 p1 c3 r2 c1 p2 c2 check +permutation w2 r1 w3 p3 p1 c3 c1 r2 p2 c2 check +permutation w2 r1 w3 p3 c3 r2 p1 p2 c1 c2 check +permutation w2 r1 w3 p3 c3 r2 p1 p2 c2 c1 check +permutation w2 r1 w3 p3 c3 r2 p1 c1 p2 c2 check +permutation w2 r1 w3 p3 c3 r2 p2 p1 c1 c2 check +permutation w2 r1 w3 p3 c3 r2 p2 p1 c2 c1 check +permutation w2 r1 w3 p3 c3 r2 p2 c2 p1 c1 check +permutation w2 r1 w3 p3 c3 p1 r2 p2 c1 c2 check +permutation w2 r1 w3 p3 c3 p1 r2 p2 c2 c1 check +permutation w2 r1 w3 p3 c3 p1 r2 c1 p2 c2 check +permutation w2 r1 w3 p3 c3 p1 c1 r2 p2 c2 check +permutation w2 r1 p1 r2 w3 p2 p3 c3 c1 c2 check +permutation w2 r1 p1 r2 w3 p2 p3 c3 c2 c1 check +permutation w2 r1 p1 r2 w3 p3 p2 c3 c1 c2 check +permutation w2 r1 p1 r2 w3 p3 p2 c3 c2 c1 check +permutation w2 r1 p1 r2 w3 p3 c3 p2 c1 c2 check +permutation w2 r1 p1 r2 w3 p3 c3 p2 c2 c1 check +permutation w2 r1 p1 r2 w3 p3 c3 c1 p2 c2 check +permutation w2 r1 p1 r2 p2 w3 p3 c3 c1 c2 check +permutation w2 r1 p1 r2 p2 w3 p3 c3 c2 c1 check +permutation w2 r1 p1 w3 r2 p2 p3 c3 c1 c2 check +permutation w2 r1 p1 w3 r2 p2 p3 c3 c2 c1 check +permutation w2 r1 p1 w3 r2 p3 p2 c3 c1 c2 check +permutation w2 r1 p1 w3 r2 p3 p2 c3 c2 c1 check +permutation w2 r1 p1 w3 r2 p3 c3 p2 c1 c2 check +permutation w2 r1 p1 w3 r2 p3 c3 p2 c2 c1 check +permutation w2 r1 p1 w3 r2 p3 c3 c1 p2 c2 check +permutation w2 r1 p1 w3 p3 r2 p2 c3 c1 c2 check +permutation w2 r1 p1 w3 p3 r2 p2 c3 c2 c1 check +permutation w2 r1 p1 w3 p3 r2 c3 p2 c1 c2 check +permutation w2 r1 p1 w3 p3 r2 c3 p2 c2 c1 check +permutation w2 r1 p1 w3 p3 r2 c3 c1 p2 c2 check +permutation w2 r1 p1 w3 p3 c3 r2 p2 c1 c2 check +permutation w2 r1 p1 w3 p3 c3 r2 p2 c2 c1 check +permutation w2 r1 p1 w3 p3 c3 r2 c1 p2 c2 check +permutation w2 r1 p1 w3 p3 c3 c1 r2 p2 c2 check +permutation w3 r1 r2 w2 p1 p2 p3 c3 c1 c2 check +permutation w3 r1 r2 w2 p1 p2 p3 c3 c2 c1 check +permutation w3 r1 r2 w2 p1 p3 p2 c3 c1 c2 check +permutation w3 r1 r2 w2 p1 p3 p2 c3 c2 c1 check +permutation w3 r1 r2 w2 p1 p3 c3 p2 c1 c2 check +permutation w3 r1 r2 w2 p1 p3 c3 p2 c2 c1 check +permutation w3 r1 r2 w2 p1 p3 c3 c1 p2 c2 check +permutation w3 r1 r2 w2 p2 p1 p3 c3 c1 c2 check +permutation w3 r1 r2 w2 p2 p1 p3 c3 c2 c1 check +permutation w3 r1 r2 w2 p2 p3 p1 c3 c1 c2 check +permutation w3 r1 r2 w2 p2 p3 p1 c3 c2 c1 check +permutation w3 r1 r2 w2 p2 p3 c3 p1 c1 c2 check +permutation w3 r1 r2 w2 p2 p3 c3 p1 c2 c1 check +permutation w3 r1 r2 w2 p2 p3 c3 c2 p1 c1 check +permutation w3 r1 r2 w2 p3 p1 p2 c3 c1 c2 check +permutation w3 r1 r2 w2 p3 p1 p2 c3 c2 c1 check +permutation w3 r1 r2 w2 p3 p1 c3 p2 c1 c2 check +permutation w3 r1 r2 w2 p3 p1 c3 p2 c2 c1 check +permutation w3 r1 r2 w2 p3 p1 c3 c1 p2 c2 check +permutation w3 r1 r2 w2 p3 p2 p1 c3 c1 c2 check +permutation w3 r1 r2 w2 p3 p2 p1 c3 c2 c1 check +permutation w3 r1 r2 w2 p3 p2 c3 p1 c1 c2 check +permutation w3 r1 r2 w2 p3 p2 c3 p1 c2 c1 check +permutation w3 r1 r2 w2 p3 p2 c3 c2 p1 c1 check +permutation w3 r1 r2 w2 p3 c3 p1 p2 c1 c2 check +permutation w3 r1 r2 w2 p3 c3 p1 p2 c2 c1 check +permutation w3 r1 r2 w2 p3 c3 p1 c1 p2 c2 check +permutation w3 r1 r2 w2 p3 c3 p2 p1 c1 c2 check +permutation w3 r1 r2 w2 p3 c3 p2 p1 c2 c1 check +permutation w3 r1 r2 w2 p3 c3 p2 c2 p1 c1 check +permutation w3 r1 r2 p1 w2 p2 p3 c3 c1 c2 check +permutation w3 r1 r2 p1 w2 p2 p3 c3 c2 c1 check +permutation w3 r1 r2 p1 w2 p3 p2 c3 c1 c2 check +permutation w3 r1 r2 p1 w2 p3 p2 c3 c2 c1 check +permutation w3 r1 r2 p1 w2 p3 c3 p2 c1 c2 check +permutation w3 r1 r2 p1 w2 p3 c3 p2 c2 c1 check +permutation w3 r1 r2 p1 w2 p3 c3 c1 p2 c2 check +permutation w3 r1 r2 p1 p3 w2 p2 c3 c1 c2 check +permutation w3 r1 r2 p1 p3 w2 p2 c3 c2 c1 check +permutation w3 r1 r2 p1 p3 w2 c3 p2 c1 c2 check +permutation w3 r1 r2 p1 p3 w2 c3 p2 c2 c1 check +permutation w3 r1 r2 p1 p3 w2 c3 c1 p2 c2 check +permutation w3 r1 r2 p1 p3 c3 w2 p2 c1 c2 check +permutation w3 r1 r2 p1 p3 c3 w2 p2 c2 c1 check +permutation w3 r1 r2 p1 p3 c3 w2 c1 p2 c2 check +permutation w3 r1 r2 p1 p3 c3 c1 w2 p2 c2 check +permutation w3 r1 r2 p3 w2 p1 p2 c3 c1 c2 check +permutation w3 r1 r2 p3 w2 p1 p2 c3 c2 c1 check +permutation w3 r1 r2 p3 w2 p1 c3 p2 c1 c2 check +permutation w3 r1 r2 p3 w2 p1 c3 p2 c2 c1 check +permutation w3 r1 r2 p3 w2 p1 c3 c1 p2 c2 check +permutation w3 r1 r2 p3 w2 p2 p1 c3 c1 c2 check +permutation w3 r1 r2 p3 w2 p2 p1 c3 c2 c1 check +permutation w3 r1 r2 p3 w2 p2 c3 p1 c1 c2 check +permutation w3 r1 r2 p3 w2 p2 c3 p1 c2 c1 check +permutation w3 r1 r2 p3 w2 p2 c3 c2 p1 c1 check +permutation w3 r1 r2 p3 w2 c3 p1 p2 c1 c2 check +permutation w3 r1 r2 p3 w2 c3 p1 p2 c2 c1 check +permutation w3 r1 r2 p3 w2 c3 p1 c1 p2 c2 check +permutation w3 r1 r2 p3 w2 c3 p2 p1 c1 c2 check +permutation w3 r1 r2 p3 w2 c3 p2 p1 c2 c1 check +permutation w3 r1 r2 p3 w2 c3 p2 c2 p1 c1 check +permutation w3 r1 r2 p3 p1 w2 p2 c3 c1 c2 check +permutation w3 r1 r2 p3 p1 w2 p2 c3 c2 c1 check +permutation w3 r1 r2 p3 p1 w2 c3 p2 c1 c2 check +permutation w3 r1 r2 p3 p1 w2 c3 p2 c2 c1 check +permutation w3 r1 r2 p3 p1 w2 c3 c1 p2 c2 check +permutation w3 r1 r2 p3 p1 c3 w2 p2 c1 c2 check +permutation w3 r1 r2 p3 p1 c3 w2 p2 c2 c1 check +permutation w3 r1 r2 p3 p1 c3 w2 c1 p2 c2 check +permutation w3 r1 r2 p3 p1 c3 c1 w2 p2 c2 check +permutation w3 r1 r2 p3 c3 w2 p1 p2 c1 c2 check +permutation w3 r1 r2 p3 c3 w2 p1 p2 c2 c1 check +permutation w3 r1 r2 p3 c3 w2 p1 c1 p2 c2 check +permutation w3 r1 r2 p3 c3 w2 p2 p1 c1 c2 check +permutation w3 r1 r2 p3 c3 w2 p2 p1 c2 c1 check +permutation w3 r1 r2 p3 c3 w2 p2 c2 p1 c1 check +permutation w3 r1 r2 p3 c3 p1 w2 p2 c1 c2 check +permutation w3 r1 r2 p3 c3 p1 w2 p2 c2 c1 check +permutation w3 r1 r2 p3 c3 p1 w2 c1 p2 c2 check +permutation w3 r1 r2 p3 c3 p1 c1 w2 p2 c2 check +permutation w3 r1 w2 r2 p1 p2 p3 c3 c1 c2 check +permutation w3 r1 w2 r2 p1 p2 p3 c3 c2 c1 check +permutation w3 r1 w2 r2 p1 p3 p2 c3 c1 c2 check +permutation w3 r1 w2 r2 p1 p3 p2 c3 c2 c1 check +permutation w3 r1 w2 r2 p1 p3 c3 p2 c1 c2 check +permutation w3 r1 w2 r2 p1 p3 c3 p2 c2 c1 check +permutation w3 r1 w2 r2 p1 p3 c3 c1 p2 c2 check +permutation w3 r1 w2 r2 p2 p1 p3 c3 c1 c2 check +permutation w3 r1 w2 r2 p2 p1 p3 c3 c2 c1 check +permutation w3 r1 w2 r2 p2 p3 p1 c3 c1 c2 check +permutation w3 r1 w2 r2 p2 p3 p1 c3 c2 c1 check +permutation w3 r1 w2 r2 p2 p3 c3 p1 c1 c2 check +permutation w3 r1 w2 r2 p2 p3 c3 p1 c2 c1 check +permutation w3 r1 w2 r2 p2 p3 c3 c2 p1 c1 check +permutation w3 r1 w2 r2 p3 p1 p2 c3 c1 c2 check +permutation w3 r1 w2 r2 p3 p1 p2 c3 c2 c1 check +permutation w3 r1 w2 r2 p3 p1 c3 p2 c1 c2 check +permutation w3 r1 w2 r2 p3 p1 c3 p2 c2 c1 check +permutation w3 r1 w2 r2 p3 p1 c3 c1 p2 c2 check +permutation w3 r1 w2 r2 p3 p2 p1 c3 c1 c2 check +permutation w3 r1 w2 r2 p3 p2 p1 c3 c2 c1 check +permutation w3 r1 w2 r2 p3 p2 c3 p1 c1 c2 check +permutation w3 r1 w2 r2 p3 p2 c3 p1 c2 c1 check +permutation w3 r1 w2 r2 p3 p2 c3 c2 p1 c1 check +permutation w3 r1 w2 r2 p3 c3 p1 p2 c1 c2 check +permutation w3 r1 w2 r2 p3 c3 p1 p2 c2 c1 check +permutation w3 r1 w2 r2 p3 c3 p1 c1 p2 c2 check +permutation w3 r1 w2 r2 p3 c3 p2 p1 c1 c2 check +permutation w3 r1 w2 r2 p3 c3 p2 p1 c2 c1 check +permutation w3 r1 w2 r2 p3 c3 p2 c2 p1 c1 check +permutation w3 r1 w2 p1 r2 p2 p3 c3 c1 c2 check +permutation w3 r1 w2 p1 r2 p2 p3 c3 c2 c1 check +permutation w3 r1 w2 p1 r2 p3 p2 c3 c1 c2 check +permutation w3 r1 w2 p1 r2 p3 p2 c3 c2 c1 check +permutation w3 r1 w2 p1 r2 p3 c3 p2 c1 c2 check +permutation w3 r1 w2 p1 r2 p3 c3 p2 c2 c1 check +permutation w3 r1 w2 p1 r2 p3 c3 c1 p2 c2 check +permutation w3 r1 w2 p1 p3 r2 p2 c3 c1 c2 check +permutation w3 r1 w2 p1 p3 r2 p2 c3 c2 c1 check +permutation w3 r1 w2 p1 p3 r2 c3 p2 c1 c2 check +permutation w3 r1 w2 p1 p3 r2 c3 p2 c2 c1 check +permutation w3 r1 w2 p1 p3 r2 c3 c1 p2 c2 check +permutation w3 r1 w2 p1 p3 c3 r2 p2 c1 c2 check +permutation w3 r1 w2 p1 p3 c3 r2 p2 c2 c1 check +permutation w3 r1 w2 p1 p3 c3 r2 c1 p2 c2 check +permutation w3 r1 w2 p1 p3 c3 c1 r2 p2 c2 check +permutation w3 r1 w2 p3 r2 p1 p2 c3 c1 c2 check +permutation w3 r1 w2 p3 r2 p1 p2 c3 c2 c1 check +permutation w3 r1 w2 p3 r2 p1 c3 p2 c1 c2 check +permutation w3 r1 w2 p3 r2 p1 c3 p2 c2 c1 check +permutation w3 r1 w2 p3 r2 p1 c3 c1 p2 c2 check +permutation w3 r1 w2 p3 r2 p2 p1 c3 c1 c2 check +permutation w3 r1 w2 p3 r2 p2 p1 c3 c2 c1 check +permutation w3 r1 w2 p3 r2 p2 c3 p1 c1 c2 check +permutation w3 r1 w2 p3 r2 p2 c3 p1 c2 c1 check +permutation w3 r1 w2 p3 r2 p2 c3 c2 p1 c1 check +permutation w3 r1 w2 p3 r2 c3 p1 p2 c1 c2 check +permutation w3 r1 w2 p3 r2 c3 p1 p2 c2 c1 check +permutation w3 r1 w2 p3 r2 c3 p1 c1 p2 c2 check +permutation w3 r1 w2 p3 r2 c3 p2 p1 c1 c2 check +permutation w3 r1 w2 p3 r2 c3 p2 p1 c2 c1 check +permutation w3 r1 w2 p3 r2 c3 p2 c2 p1 c1 check +permutation w3 r1 w2 p3 p1 r2 p2 c3 c1 c2 check +permutation w3 r1 w2 p3 p1 r2 p2 c3 c2 c1 check +permutation w3 r1 w2 p3 p1 r2 c3 p2 c1 c2 check +permutation w3 r1 w2 p3 p1 r2 c3 p2 c2 c1 check +permutation w3 r1 w2 p3 p1 r2 c3 c1 p2 c2 check +permutation w3 r1 w2 p3 p1 c3 r2 p2 c1 c2 check +permutation w3 r1 w2 p3 p1 c3 r2 p2 c2 c1 check +permutation w3 r1 w2 p3 p1 c3 r2 c1 p2 c2 check +permutation w3 r1 w2 p3 p1 c3 c1 r2 p2 c2 check +permutation w3 r1 w2 p3 c3 r2 p1 p2 c1 c2 check +permutation w3 r1 w2 p3 c3 r2 p1 p2 c2 c1 check +permutation w3 r1 w2 p3 c3 r2 p1 c1 p2 c2 check +permutation w3 r1 w2 p3 c3 r2 p2 p1 c1 c2 check +permutation w3 r1 w2 p3 c3 r2 p2 p1 c2 c1 check +permutation w3 r1 w2 p3 c3 r2 p2 c2 p1 c1 check +permutation w3 r1 w2 p3 c3 p1 r2 p2 c1 c2 check +permutation w3 r1 w2 p3 c3 p1 r2 p2 c2 c1 check +permutation w3 r1 w2 p3 c3 p1 r2 c1 p2 c2 check +permutation w3 r1 w2 p3 c3 p1 c1 r2 p2 c2 check +permutation w3 r1 p1 r2 w2 p2 p3 c3 c1 c2 check +permutation w3 r1 p1 r2 w2 p2 p3 c3 c2 c1 check +permutation w3 r1 p1 r2 w2 p3 p2 c3 c1 c2 check +permutation w3 r1 p1 r2 w2 p3 p2 c3 c2 c1 check +permutation w3 r1 p1 r2 w2 p3 c3 p2 c1 c2 check +permutation w3 r1 p1 r2 w2 p3 c3 p2 c2 c1 check +permutation w3 r1 p1 r2 w2 p3 c3 c1 p2 c2 check +permutation w3 r1 p1 r2 p3 w2 p2 c3 c1 c2 check +permutation w3 r1 p1 r2 p3 w2 p2 c3 c2 c1 check +permutation w3 r1 p1 r2 p3 w2 c3 p2 c1 c2 check +permutation w3 r1 p1 r2 p3 w2 c3 p2 c2 c1 check +permutation w3 r1 p1 r2 p3 w2 c3 c1 p2 c2 check +permutation w3 r1 p1 r2 p3 c3 w2 p2 c1 c2 check +permutation w3 r1 p1 r2 p3 c3 w2 p2 c2 c1 check +permutation w3 r1 p1 r2 p3 c3 w2 c1 p2 c2 check +permutation w3 r1 p1 r2 p3 c3 c1 w2 p2 c2 check +permutation w3 r1 p1 w2 r2 p2 p3 c3 c1 c2 check +permutation w3 r1 p1 w2 r2 p2 p3 c3 c2 c1 check +permutation w3 r1 p1 w2 r2 p3 p2 c3 c1 c2 check +permutation w3 r1 p1 w2 r2 p3 p2 c3 c2 c1 check +permutation w3 r1 p1 w2 r2 p3 c3 p2 c1 c2 check +permutation w3 r1 p1 w2 r2 p3 c3 p2 c2 c1 check +permutation w3 r1 p1 w2 r2 p3 c3 c1 p2 c2 check +permutation w3 r1 p1 w2 p3 r2 p2 c3 c1 c2 check +permutation w3 r1 p1 w2 p3 r2 p2 c3 c2 c1 check +permutation w3 r1 p1 w2 p3 r2 c3 p2 c1 c2 check +permutation w3 r1 p1 w2 p3 r2 c3 p2 c2 c1 check +permutation w3 r1 p1 w2 p3 r2 c3 c1 p2 c2 check +permutation w3 r1 p1 w2 p3 c3 r2 p2 c1 c2 check +permutation w3 r1 p1 w2 p3 c3 r2 p2 c2 c1 check +permutation w3 r1 p1 w2 p3 c3 r2 c1 p2 c2 check +permutation w3 r1 p1 w2 p3 c3 c1 r2 p2 c2 check +permutation w3 r1 p1 p3 r2 w2 p2 c3 c1 c2 check +permutation w3 r1 p1 p3 r2 w2 p2 c3 c2 c1 check +permutation w3 r1 p1 p3 r2 w2 c3 p2 c1 c2 check +permutation w3 r1 p1 p3 r2 w2 c3 p2 c2 c1 check +permutation w3 r1 p1 p3 r2 w2 c3 c1 p2 c2 check +permutation w3 r1 p1 p3 r2 c3 w2 p2 c1 c2 check +permutation w3 r1 p1 p3 r2 c3 w2 p2 c2 c1 check +permutation w3 r1 p1 p3 r2 c3 w2 c1 p2 c2 check +permutation w3 r1 p1 p3 r2 c3 c1 w2 p2 c2 check +permutation w3 r1 p1 p3 w2 r2 p2 c3 c1 c2 check +permutation w3 r1 p1 p3 w2 r2 p2 c3 c2 c1 check +permutation w3 r1 p1 p3 w2 r2 c3 p2 c1 c2 check +permutation w3 r1 p1 p3 w2 r2 c3 p2 c2 c1 check +permutation w3 r1 p1 p3 w2 r2 c3 c1 p2 c2 check +permutation w3 r1 p1 p3 w2 c3 r2 p2 c1 c2 check +permutation w3 r1 p1 p3 w2 c3 r2 p2 c2 c1 check +permutation w3 r1 p1 p3 w2 c3 r2 c1 p2 c2 check +permutation w3 r1 p1 p3 w2 c3 c1 r2 p2 c2 check +permutation w3 r1 p1 p3 c3 r2 w2 p2 c1 c2 check +permutation w3 r1 p1 p3 c3 r2 w2 p2 c2 c1 check +permutation w3 r1 p1 p3 c3 r2 w2 c1 p2 c2 check +permutation w3 r1 p1 p3 c3 r2 c1 w2 p2 c2 check +permutation w3 r1 p1 p3 c3 w2 r2 p2 c1 c2 check +permutation w3 r1 p1 p3 c3 w2 r2 p2 c2 c1 check +permutation w3 r1 p1 p3 c3 w2 r2 c1 p2 c2 check +permutation w3 r1 p1 p3 c3 w2 c1 r2 p2 c2 check +permutation w3 r1 p1 p3 c3 c1 r2 w2 p2 c2 check +permutation w3 r1 p1 p3 c3 c1 w2 r2 p2 c2 check +permutation w3 r1 p3 r2 w2 p1 p2 c3 c1 c2 check +permutation w3 r1 p3 r2 w2 p1 p2 c3 c2 c1 check +permutation w3 r1 p3 r2 w2 p1 c3 p2 c1 c2 check +permutation w3 r1 p3 r2 w2 p1 c3 p2 c2 c1 check +permutation w3 r1 p3 r2 w2 p1 c3 c1 p2 c2 check +permutation w3 r1 p3 r2 w2 p2 p1 c3 c1 c2 check +permutation w3 r1 p3 r2 w2 p2 p1 c3 c2 c1 check +permutation w3 r1 p3 r2 w2 p2 c3 p1 c1 c2 check +permutation w3 r1 p3 r2 w2 p2 c3 p1 c2 c1 check +permutation w3 r1 p3 r2 w2 p2 c3 c2 p1 c1 check +permutation w3 r1 p3 r2 w2 c3 p1 p2 c1 c2 check +permutation w3 r1 p3 r2 w2 c3 p1 p2 c2 c1 check +permutation w3 r1 p3 r2 w2 c3 p1 c1 p2 c2 check +permutation w3 r1 p3 r2 w2 c3 p2 p1 c1 c2 check +permutation w3 r1 p3 r2 w2 c3 p2 p1 c2 c1 check +permutation w3 r1 p3 r2 w2 c3 p2 c2 p1 c1 check +permutation w3 r1 p3 r2 p1 w2 p2 c3 c1 c2 check +permutation w3 r1 p3 r2 p1 w2 p2 c3 c2 c1 check +permutation w3 r1 p3 r2 p1 w2 c3 p2 c1 c2 check +permutation w3 r1 p3 r2 p1 w2 c3 p2 c2 c1 check +permutation w3 r1 p3 r2 p1 w2 c3 c1 p2 c2 check +permutation w3 r1 p3 r2 p1 c3 w2 p2 c1 c2 check +permutation w3 r1 p3 r2 p1 c3 w2 p2 c2 c1 check +permutation w3 r1 p3 r2 p1 c3 w2 c1 p2 c2 check +permutation w3 r1 p3 r2 p1 c3 c1 w2 p2 c2 check +permutation w3 r1 p3 r2 c3 w2 p1 p2 c1 c2 check +permutation w3 r1 p3 r2 c3 w2 p1 p2 c2 c1 check +permutation w3 r1 p3 r2 c3 w2 p1 c1 p2 c2 check +permutation w3 r1 p3 r2 c3 w2 p2 p1 c1 c2 check +permutation w3 r1 p3 r2 c3 w2 p2 p1 c2 c1 check +permutation w3 r1 p3 r2 c3 w2 p2 c2 p1 c1 check +permutation w3 r1 p3 r2 c3 p1 w2 p2 c1 c2 check +permutation w3 r1 p3 r2 c3 p1 w2 p2 c2 c1 check +permutation w3 r1 p3 r2 c3 p1 w2 c1 p2 c2 check +permutation w3 r1 p3 r2 c3 p1 c1 w2 p2 c2 check +permutation w3 r1 p3 w2 r2 p1 p2 c3 c1 c2 check +permutation w3 r1 p3 w2 r2 p1 p2 c3 c2 c1 check +permutation w3 r1 p3 w2 r2 p1 c3 p2 c1 c2 check +permutation w3 r1 p3 w2 r2 p1 c3 p2 c2 c1 check +permutation w3 r1 p3 w2 r2 p1 c3 c1 p2 c2 check +permutation w3 r1 p3 w2 r2 p2 p1 c3 c1 c2 check +permutation w3 r1 p3 w2 r2 p2 p1 c3 c2 c1 check +permutation w3 r1 p3 w2 r2 p2 c3 p1 c1 c2 check +permutation w3 r1 p3 w2 r2 p2 c3 p1 c2 c1 check +permutation w3 r1 p3 w2 r2 p2 c3 c2 p1 c1 check +permutation w3 r1 p3 w2 r2 c3 p1 p2 c1 c2 check +permutation w3 r1 p3 w2 r2 c3 p1 p2 c2 c1 check +permutation w3 r1 p3 w2 r2 c3 p1 c1 p2 c2 check +permutation w3 r1 p3 w2 r2 c3 p2 p1 c1 c2 check +permutation w3 r1 p3 w2 r2 c3 p2 p1 c2 c1 check +permutation w3 r1 p3 w2 r2 c3 p2 c2 p1 c1 check +permutation w3 r1 p3 w2 p1 r2 p2 c3 c1 c2 check +permutation w3 r1 p3 w2 p1 r2 p2 c3 c2 c1 check +permutation w3 r1 p3 w2 p1 r2 c3 p2 c1 c2 check +permutation w3 r1 p3 w2 p1 r2 c3 p2 c2 c1 check +permutation w3 r1 p3 w2 p1 r2 c3 c1 p2 c2 check +permutation w3 r1 p3 w2 p1 c3 r2 p2 c1 c2 check +permutation w3 r1 p3 w2 p1 c3 r2 p2 c2 c1 check +permutation w3 r1 p3 w2 p1 c3 r2 c1 p2 c2 check +permutation w3 r1 p3 w2 p1 c3 c1 r2 p2 c2 check +permutation w3 r1 p3 w2 c3 r2 p1 p2 c1 c2 check +permutation w3 r1 p3 w2 c3 r2 p1 p2 c2 c1 check +permutation w3 r1 p3 w2 c3 r2 p1 c1 p2 c2 check +permutation w3 r1 p3 w2 c3 r2 p2 p1 c1 c2 check +permutation w3 r1 p3 w2 c3 r2 p2 p1 c2 c1 check +permutation w3 r1 p3 w2 c3 r2 p2 c2 p1 c1 check +permutation w3 r1 p3 w2 c3 p1 r2 p2 c1 c2 check +permutation w3 r1 p3 w2 c3 p1 r2 p2 c2 c1 check +permutation w3 r1 p3 w2 c3 p1 r2 c1 p2 c2 check +permutation w3 r1 p3 w2 c3 p1 c1 r2 p2 c2 check +permutation w3 r1 p3 p1 r2 w2 p2 c3 c1 c2 check +permutation w3 r1 p3 p1 r2 w2 p2 c3 c2 c1 check +permutation w3 r1 p3 p1 r2 w2 c3 p2 c1 c2 check +permutation w3 r1 p3 p1 r2 w2 c3 p2 c2 c1 check +permutation w3 r1 p3 p1 r2 w2 c3 c1 p2 c2 check +permutation w3 r1 p3 p1 r2 c3 w2 p2 c1 c2 check +permutation w3 r1 p3 p1 r2 c3 w2 p2 c2 c1 check +permutation w3 r1 p3 p1 r2 c3 w2 c1 p2 c2 check +permutation w3 r1 p3 p1 r2 c3 c1 w2 p2 c2 check +permutation w3 r1 p3 p1 w2 r2 p2 c3 c1 c2 check +permutation w3 r1 p3 p1 w2 r2 p2 c3 c2 c1 check +permutation w3 r1 p3 p1 w2 r2 c3 p2 c1 c2 check +permutation w3 r1 p3 p1 w2 r2 c3 p2 c2 c1 check +permutation w3 r1 p3 p1 w2 r2 c3 c1 p2 c2 check +permutation w3 r1 p3 p1 w2 c3 r2 p2 c1 c2 check +permutation w3 r1 p3 p1 w2 c3 r2 p2 c2 c1 check +permutation w3 r1 p3 p1 w2 c3 r2 c1 p2 c2 check +permutation w3 r1 p3 p1 w2 c3 c1 r2 p2 c2 check +permutation w3 r1 p3 p1 c3 r2 w2 p2 c1 c2 check +permutation w3 r1 p3 p1 c3 r2 w2 p2 c2 c1 check +permutation w3 r1 p3 p1 c3 r2 w2 c1 p2 c2 check +permutation w3 r1 p3 p1 c3 r2 c1 w2 p2 c2 check +permutation w3 r1 p3 p1 c3 w2 r2 p2 c1 c2 check +permutation w3 r1 p3 p1 c3 w2 r2 p2 c2 c1 check +permutation w3 r1 p3 p1 c3 w2 r2 c1 p2 c2 check +permutation w3 r1 p3 p1 c3 w2 c1 r2 p2 c2 check +permutation w3 r1 p3 p1 c3 c1 r2 w2 p2 c2 check +permutation w3 r1 p3 p1 c3 c1 w2 r2 p2 c2 check +permutation w3 r1 p3 c3 r2 w2 p1 p2 c1 c2 check +permutation w3 r1 p3 c3 r2 w2 p1 p2 c2 c1 check +permutation w3 r1 p3 c3 r2 w2 p1 c1 p2 c2 check +permutation w3 r1 p3 c3 r2 w2 p2 p1 c1 c2 check +permutation w3 r1 p3 c3 r2 w2 p2 p1 c2 c1 check +permutation w3 r1 p3 c3 r2 w2 p2 c2 p1 c1 check +permutation w3 r1 p3 c3 r2 p1 w2 p2 c1 c2 check +permutation w3 r1 p3 c3 r2 p1 w2 p2 c2 c1 check +permutation w3 r1 p3 c3 r2 p1 w2 c1 p2 c2 check +permutation w3 r1 p3 c3 r2 p1 c1 w2 p2 c2 check +permutation w3 r1 p3 c3 w2 r2 p1 p2 c1 c2 check +permutation w3 r1 p3 c3 w2 r2 p1 p2 c2 c1 check +permutation w3 r1 p3 c3 w2 r2 p1 c1 p2 c2 check +permutation w3 r1 p3 c3 w2 r2 p2 p1 c1 c2 check +permutation w3 r1 p3 c3 w2 r2 p2 p1 c2 c1 check +permutation w3 r1 p3 c3 w2 r2 p2 c2 p1 c1 check +permutation w3 r1 p3 c3 w2 p1 r2 p2 c1 c2 check +permutation w3 r1 p3 c3 w2 p1 r2 p2 c2 c1 check +permutation w3 r1 p3 c3 w2 p1 r2 c1 p2 c2 check +permutation w3 r1 p3 c3 w2 p1 c1 r2 p2 c2 check +permutation w3 r1 p3 c3 p1 r2 w2 p2 c1 c2 check +permutation w3 r1 p3 c3 p1 r2 w2 p2 c2 c1 check +permutation w3 r1 p3 c3 p1 r2 w2 c1 p2 c2 check +permutation w3 r1 p3 c3 p1 r2 c1 w2 p2 c2 check +permutation w3 r1 p3 c3 p1 w2 r2 p2 c1 c2 check +permutation w3 r1 p3 c3 p1 w2 r2 p2 c2 c1 check +permutation w3 r1 p3 c3 p1 w2 r2 c1 p2 c2 check +permutation w3 r1 p3 c3 p1 w2 c1 r2 p2 c2 check +permutation w3 r1 p3 c3 p1 c1 r2 w2 p2 c2 check +permutation w3 r1 p3 c3 p1 c1 w2 r2 p2 c2 check +permutation w3 r2 r1 w2 p1 p2 p3 c3 c1 c2 check +permutation w3 r2 r1 w2 p1 p2 p3 c3 c2 c1 check +permutation w3 r2 r1 w2 p1 p3 p2 c3 c1 c2 check +permutation w3 r2 r1 w2 p1 p3 p2 c3 c2 c1 check +permutation w3 r2 r1 w2 p1 p3 c3 p2 c1 c2 check +permutation w3 r2 r1 w2 p1 p3 c3 p2 c2 c1 check +permutation w3 r2 r1 w2 p1 p3 c3 c1 p2 c2 check +permutation w3 r2 r1 w2 p2 p1 p3 c3 c1 c2 check +permutation w3 r2 r1 w2 p2 p1 p3 c3 c2 c1 check +permutation w3 r2 r1 w2 p2 p3 p1 c3 c1 c2 check +permutation w3 r2 r1 w2 p2 p3 p1 c3 c2 c1 check +permutation w3 r2 r1 w2 p2 p3 c3 p1 c1 c2 check +permutation w3 r2 r1 w2 p2 p3 c3 p1 c2 c1 check +permutation w3 r2 r1 w2 p2 p3 c3 c2 p1 c1 check +permutation w3 r2 r1 w2 p3 p1 p2 c3 c1 c2 check +permutation w3 r2 r1 w2 p3 p1 p2 c3 c2 c1 check +permutation w3 r2 r1 w2 p3 p1 c3 p2 c1 c2 check +permutation w3 r2 r1 w2 p3 p1 c3 p2 c2 c1 check +permutation w3 r2 r1 w2 p3 p1 c3 c1 p2 c2 check +permutation w3 r2 r1 w2 p3 p2 p1 c3 c1 c2 check +permutation w3 r2 r1 w2 p3 p2 p1 c3 c2 c1 check +permutation w3 r2 r1 w2 p3 p2 c3 p1 c1 c2 check +permutation w3 r2 r1 w2 p3 p2 c3 p1 c2 c1 check +permutation w3 r2 r1 w2 p3 p2 c3 c2 p1 c1 check +permutation w3 r2 r1 w2 p3 c3 p1 p2 c1 c2 check +permutation w3 r2 r1 w2 p3 c3 p1 p2 c2 c1 check +permutation w3 r2 r1 w2 p3 c3 p1 c1 p2 c2 check +permutation w3 r2 r1 w2 p3 c3 p2 p1 c1 c2 check +permutation w3 r2 r1 w2 p3 c3 p2 p1 c2 c1 check +permutation w3 r2 r1 w2 p3 c3 p2 c2 p1 c1 check +permutation w3 r2 r1 p1 w2 p2 p3 c3 c1 c2 check +permutation w3 r2 r1 p1 w2 p2 p3 c3 c2 c1 check +permutation w3 r2 r1 p1 w2 p3 p2 c3 c1 c2 check +permutation w3 r2 r1 p1 w2 p3 p2 c3 c2 c1 check +permutation w3 r2 r1 p1 w2 p3 c3 p2 c1 c2 check +permutation w3 r2 r1 p1 w2 p3 c3 p2 c2 c1 check +permutation w3 r2 r1 p1 w2 p3 c3 c1 p2 c2 check +permutation w3 r2 r1 p1 p3 w2 p2 c3 c1 c2 check +permutation w3 r2 r1 p1 p3 w2 p2 c3 c2 c1 check +permutation w3 r2 r1 p1 p3 w2 c3 p2 c1 c2 check +permutation w3 r2 r1 p1 p3 w2 c3 p2 c2 c1 check +permutation w3 r2 r1 p1 p3 w2 c3 c1 p2 c2 check +permutation w3 r2 r1 p1 p3 c3 w2 p2 c1 c2 check +permutation w3 r2 r1 p1 p3 c3 w2 p2 c2 c1 check +permutation w3 r2 r1 p1 p3 c3 w2 c1 p2 c2 check +permutation w3 r2 r1 p1 p3 c3 c1 w2 p2 c2 check +permutation w3 r2 r1 p3 w2 p1 p2 c3 c1 c2 check +permutation w3 r2 r1 p3 w2 p1 p2 c3 c2 c1 check +permutation w3 r2 r1 p3 w2 p1 c3 p2 c1 c2 check +permutation w3 r2 r1 p3 w2 p1 c3 p2 c2 c1 check +permutation w3 r2 r1 p3 w2 p1 c3 c1 p2 c2 check +permutation w3 r2 r1 p3 w2 p2 p1 c3 c1 c2 check +permutation w3 r2 r1 p3 w2 p2 p1 c3 c2 c1 check +permutation w3 r2 r1 p3 w2 p2 c3 p1 c1 c2 check +permutation w3 r2 r1 p3 w2 p2 c3 p1 c2 c1 check +permutation w3 r2 r1 p3 w2 p2 c3 c2 p1 c1 check +permutation w3 r2 r1 p3 w2 c3 p1 p2 c1 c2 check +permutation w3 r2 r1 p3 w2 c3 p1 p2 c2 c1 check +permutation w3 r2 r1 p3 w2 c3 p1 c1 p2 c2 check +permutation w3 r2 r1 p3 w2 c3 p2 p1 c1 c2 check +permutation w3 r2 r1 p3 w2 c3 p2 p1 c2 c1 check +permutation w3 r2 r1 p3 w2 c3 p2 c2 p1 c1 check +permutation w3 r2 r1 p3 p1 w2 p2 c3 c1 c2 check +permutation w3 r2 r1 p3 p1 w2 p2 c3 c2 c1 check +permutation w3 r2 r1 p3 p1 w2 c3 p2 c1 c2 check +permutation w3 r2 r1 p3 p1 w2 c3 p2 c2 c1 check +permutation w3 r2 r1 p3 p1 w2 c3 c1 p2 c2 check +permutation w3 r2 r1 p3 p1 c3 w2 p2 c1 c2 check +permutation w3 r2 r1 p3 p1 c3 w2 p2 c2 c1 check +permutation w3 r2 r1 p3 p1 c3 w2 c1 p2 c2 check +permutation w3 r2 r1 p3 p1 c3 c1 w2 p2 c2 check +permutation w3 r2 r1 p3 c3 w2 p1 p2 c1 c2 check +permutation w3 r2 r1 p3 c3 w2 p1 p2 c2 c1 check +permutation w3 r2 r1 p3 c3 w2 p1 c1 p2 c2 check +permutation w3 r2 r1 p3 c3 w2 p2 p1 c1 c2 check +permutation w3 r2 r1 p3 c3 w2 p2 p1 c2 c1 check +permutation w3 r2 r1 p3 c3 w2 p2 c2 p1 c1 check +permutation w3 r2 r1 p3 c3 p1 w2 p2 c1 c2 check +permutation w3 r2 r1 p3 c3 p1 w2 p2 c2 c1 check +permutation w3 r2 r1 p3 c3 p1 w2 c1 p2 c2 check +permutation w3 r2 r1 p3 c3 p1 c1 w2 p2 c2 check +permutation w3 r2 p3 r1 w2 p1 p2 c3 c1 c2 check +permutation w3 r2 p3 r1 w2 p1 p2 c3 c2 c1 check +permutation w3 r2 p3 r1 w2 p1 c3 p2 c1 c2 check +permutation w3 r2 p3 r1 w2 p1 c3 p2 c2 c1 check +permutation w3 r2 p3 r1 w2 p1 c3 c1 p2 c2 check +permutation w3 r2 p3 r1 w2 p2 p1 c3 c1 c2 check +permutation w3 r2 p3 r1 w2 p2 p1 c3 c2 c1 check +permutation w3 r2 p3 r1 w2 p2 c3 p1 c1 c2 check +permutation w3 r2 p3 r1 w2 p2 c3 p1 c2 c1 check +permutation w3 r2 p3 r1 w2 p2 c3 c2 p1 c1 check +permutation w3 r2 p3 r1 w2 c3 p1 p2 c1 c2 check +permutation w3 r2 p3 r1 w2 c3 p1 p2 c2 c1 check +permutation w3 r2 p3 r1 w2 c3 p1 c1 p2 c2 check +permutation w3 r2 p3 r1 w2 c3 p2 p1 c1 c2 check +permutation w3 r2 p3 r1 w2 c3 p2 p1 c2 c1 check +permutation w3 r2 p3 r1 w2 c3 p2 c2 p1 c1 check +permutation w3 r2 p3 r1 p1 w2 p2 c3 c1 c2 check +permutation w3 r2 p3 r1 p1 w2 p2 c3 c2 c1 check +permutation w3 r2 p3 r1 p1 w2 c3 p2 c1 c2 check +permutation w3 r2 p3 r1 p1 w2 c3 p2 c2 c1 check +permutation w3 r2 p3 r1 p1 w2 c3 c1 p2 c2 check +permutation w3 r2 p3 r1 p1 c3 w2 p2 c1 c2 check +permutation w3 r2 p3 r1 p1 c3 w2 p2 c2 c1 check +permutation w3 r2 p3 r1 p1 c3 w2 c1 p2 c2 check +permutation w3 r2 p3 r1 p1 c3 c1 w2 p2 c2 check +permutation w3 r2 p3 r1 c3 w2 p1 p2 c1 c2 check +permutation w3 r2 p3 r1 c3 w2 p1 p2 c2 c1 check +permutation w3 r2 p3 r1 c3 w2 p1 c1 p2 c2 check +permutation w3 r2 p3 r1 c3 w2 p2 p1 c1 c2 check +permutation w3 r2 p3 r1 c3 w2 p2 p1 c2 c1 check +permutation w3 r2 p3 r1 c3 w2 p2 c2 p1 c1 check +permutation w3 r2 p3 r1 c3 p1 w2 p2 c1 c2 check +permutation w3 r2 p3 r1 c3 p1 w2 p2 c2 c1 check +permutation w3 r2 p3 r1 c3 p1 w2 c1 p2 c2 check +permutation w3 r2 p3 r1 c3 p1 c1 w2 p2 c2 check +permutation w3 r2 p3 c3 r1 w2 p1 p2 c1 c2 check +permutation w3 r2 p3 c3 r1 w2 p1 p2 c2 c1 check +permutation w3 r2 p3 c3 r1 w2 p1 c1 p2 c2 check +permutation w3 r2 p3 c3 r1 w2 p2 p1 c1 c2 check +permutation w3 r2 p3 c3 r1 w2 p2 p1 c2 c1 check +permutation w3 r2 p3 c3 r1 w2 p2 c2 p1 c1 check +permutation w3 r2 p3 c3 r1 p1 w2 p2 c1 c2 check +permutation w3 r2 p3 c3 r1 p1 w2 p2 c2 c1 check +permutation w3 r2 p3 c3 r1 p1 w2 c1 p2 c2 check +permutation w3 r2 p3 c3 r1 p1 c1 w2 p2 c2 check +permutation w3 p3 r1 r2 w2 p1 p2 c3 c1 c2 check +permutation w3 p3 r1 r2 w2 p1 p2 c3 c2 c1 check +permutation w3 p3 r1 r2 w2 p1 c3 p2 c1 c2 check +permutation w3 p3 r1 r2 w2 p1 c3 p2 c2 c1 check +permutation w3 p3 r1 r2 w2 p1 c3 c1 p2 c2 check +permutation w3 p3 r1 r2 w2 p2 p1 c3 c1 c2 check +permutation w3 p3 r1 r2 w2 p2 p1 c3 c2 c1 check +permutation w3 p3 r1 r2 w2 p2 c3 p1 c1 c2 check +permutation w3 p3 r1 r2 w2 p2 c3 p1 c2 c1 check +permutation w3 p3 r1 r2 w2 p2 c3 c2 p1 c1 check +permutation w3 p3 r1 r2 w2 c3 p1 p2 c1 c2 check +permutation w3 p3 r1 r2 w2 c3 p1 p2 c2 c1 check +permutation w3 p3 r1 r2 w2 c3 p1 c1 p2 c2 check +permutation w3 p3 r1 r2 w2 c3 p2 p1 c1 c2 check +permutation w3 p3 r1 r2 w2 c3 p2 p1 c2 c1 check +permutation w3 p3 r1 r2 w2 c3 p2 c2 p1 c1 check +permutation w3 p3 r1 r2 p1 w2 p2 c3 c1 c2 check +permutation w3 p3 r1 r2 p1 w2 p2 c3 c2 c1 check +permutation w3 p3 r1 r2 p1 w2 c3 p2 c1 c2 check +permutation w3 p3 r1 r2 p1 w2 c3 p2 c2 c1 check +permutation w3 p3 r1 r2 p1 w2 c3 c1 p2 c2 check +permutation w3 p3 r1 r2 p1 c3 w2 p2 c1 c2 check +permutation w3 p3 r1 r2 p1 c3 w2 p2 c2 c1 check +permutation w3 p3 r1 r2 p1 c3 w2 c1 p2 c2 check +permutation w3 p3 r1 r2 p1 c3 c1 w2 p2 c2 check +permutation w3 p3 r1 r2 c3 w2 p1 p2 c1 c2 check +permutation w3 p3 r1 r2 c3 w2 p1 p2 c2 c1 check +permutation w3 p3 r1 r2 c3 w2 p1 c1 p2 c2 check +permutation w3 p3 r1 r2 c3 w2 p2 p1 c1 c2 check +permutation w3 p3 r1 r2 c3 w2 p2 p1 c2 c1 check +permutation w3 p3 r1 r2 c3 w2 p2 c2 p1 c1 check +permutation w3 p3 r1 r2 c3 p1 w2 p2 c1 c2 check +permutation w3 p3 r1 r2 c3 p1 w2 p2 c2 c1 check +permutation w3 p3 r1 r2 c3 p1 w2 c1 p2 c2 check +permutation w3 p3 r1 r2 c3 p1 c1 w2 p2 c2 check +permutation w3 p3 r1 w2 r2 p1 p2 c3 c1 c2 check +permutation w3 p3 r1 w2 r2 p1 p2 c3 c2 c1 check +permutation w3 p3 r1 w2 r2 p1 c3 p2 c1 c2 check +permutation w3 p3 r1 w2 r2 p1 c3 p2 c2 c1 check +permutation w3 p3 r1 w2 r2 p1 c3 c1 p2 c2 check +permutation w3 p3 r1 w2 r2 p2 p1 c3 c1 c2 check +permutation w3 p3 r1 w2 r2 p2 p1 c3 c2 c1 check +permutation w3 p3 r1 w2 r2 p2 c3 p1 c1 c2 check +permutation w3 p3 r1 w2 r2 p2 c3 p1 c2 c1 check +permutation w3 p3 r1 w2 r2 p2 c3 c2 p1 c1 check +permutation w3 p3 r1 w2 r2 c3 p1 p2 c1 c2 check +permutation w3 p3 r1 w2 r2 c3 p1 p2 c2 c1 check +permutation w3 p3 r1 w2 r2 c3 p1 c1 p2 c2 check +permutation w3 p3 r1 w2 r2 c3 p2 p1 c1 c2 check +permutation w3 p3 r1 w2 r2 c3 p2 p1 c2 c1 check +permutation w3 p3 r1 w2 r2 c3 p2 c2 p1 c1 check +permutation w3 p3 r1 w2 p1 r2 p2 c3 c1 c2 check +permutation w3 p3 r1 w2 p1 r2 p2 c3 c2 c1 check +permutation w3 p3 r1 w2 p1 r2 c3 p2 c1 c2 check +permutation w3 p3 r1 w2 p1 r2 c3 p2 c2 c1 check +permutation w3 p3 r1 w2 p1 r2 c3 c1 p2 c2 check +permutation w3 p3 r1 w2 p1 c3 r2 p2 c1 c2 check +permutation w3 p3 r1 w2 p1 c3 r2 p2 c2 c1 check +permutation w3 p3 r1 w2 p1 c3 r2 c1 p2 c2 check +permutation w3 p3 r1 w2 p1 c3 c1 r2 p2 c2 check +permutation w3 p3 r1 w2 c3 r2 p1 p2 c1 c2 check +permutation w3 p3 r1 w2 c3 r2 p1 p2 c2 c1 check +permutation w3 p3 r1 w2 c3 r2 p1 c1 p2 c2 check +permutation w3 p3 r1 w2 c3 r2 p2 p1 c1 c2 check +permutation w3 p3 r1 w2 c3 r2 p2 p1 c2 c1 check +permutation w3 p3 r1 w2 c3 r2 p2 c2 p1 c1 check +permutation w3 p3 r1 w2 c3 p1 r2 p2 c1 c2 check +permutation w3 p3 r1 w2 c3 p1 r2 p2 c2 c1 check +permutation w3 p3 r1 w2 c3 p1 r2 c1 p2 c2 check +permutation w3 p3 r1 w2 c3 p1 c1 r2 p2 c2 check +permutation w3 p3 r1 p1 r2 w2 p2 c3 c1 c2 check +permutation w3 p3 r1 p1 r2 w2 p2 c3 c2 c1 check +permutation w3 p3 r1 p1 r2 w2 c3 p2 c1 c2 check +permutation w3 p3 r1 p1 r2 w2 c3 p2 c2 c1 check +permutation w3 p3 r1 p1 r2 w2 c3 c1 p2 c2 check +permutation w3 p3 r1 p1 r2 c3 w2 p2 c1 c2 check +permutation w3 p3 r1 p1 r2 c3 w2 p2 c2 c1 check +permutation w3 p3 r1 p1 r2 c3 w2 c1 p2 c2 check +permutation w3 p3 r1 p1 r2 c3 c1 w2 p2 c2 check +permutation w3 p3 r1 p1 w2 r2 p2 c3 c1 c2 check +permutation w3 p3 r1 p1 w2 r2 p2 c3 c2 c1 check +permutation w3 p3 r1 p1 w2 r2 c3 p2 c1 c2 check +permutation w3 p3 r1 p1 w2 r2 c3 p2 c2 c1 check +permutation w3 p3 r1 p1 w2 r2 c3 c1 p2 c2 check +permutation w3 p3 r1 p1 w2 c3 r2 p2 c1 c2 check +permutation w3 p3 r1 p1 w2 c3 r2 p2 c2 c1 check +permutation w3 p3 r1 p1 w2 c3 r2 c1 p2 c2 check +permutation w3 p3 r1 p1 w2 c3 c1 r2 p2 c2 check +permutation w3 p3 r1 p1 c3 r2 w2 p2 c1 c2 check +permutation w3 p3 r1 p1 c3 r2 w2 p2 c2 c1 check +permutation w3 p3 r1 p1 c3 r2 w2 c1 p2 c2 check +permutation w3 p3 r1 p1 c3 r2 c1 w2 p2 c2 check +permutation w3 p3 r1 p1 c3 w2 r2 p2 c1 c2 check +permutation w3 p3 r1 p1 c3 w2 r2 p2 c2 c1 check +permutation w3 p3 r1 p1 c3 w2 r2 c1 p2 c2 check +permutation w3 p3 r1 p1 c3 w2 c1 r2 p2 c2 check +permutation w3 p3 r1 p1 c3 c1 r2 w2 p2 c2 check +permutation w3 p3 r1 p1 c3 c1 w2 r2 p2 c2 check +permutation w3 p3 r1 c3 r2 w2 p1 p2 c1 c2 check +permutation w3 p3 r1 c3 r2 w2 p1 p2 c2 c1 check +permutation w3 p3 r1 c3 r2 w2 p1 c1 p2 c2 check +permutation w3 p3 r1 c3 r2 w2 p2 p1 c1 c2 check +permutation w3 p3 r1 c3 r2 w2 p2 p1 c2 c1 check +permutation w3 p3 r1 c3 r2 w2 p2 c2 p1 c1 check +permutation w3 p3 r1 c3 r2 p1 w2 p2 c1 c2 check +permutation w3 p3 r1 c3 r2 p1 w2 p2 c2 c1 check +permutation w3 p3 r1 c3 r2 p1 w2 c1 p2 c2 check +permutation w3 p3 r1 c3 r2 p1 c1 w2 p2 c2 check +permutation w3 p3 r1 c3 w2 r2 p1 p2 c1 c2 check +permutation w3 p3 r1 c3 w2 r2 p1 p2 c2 c1 check +permutation w3 p3 r1 c3 w2 r2 p1 c1 p2 c2 check +permutation w3 p3 r1 c3 w2 r2 p2 p1 c1 c2 check +permutation w3 p3 r1 c3 w2 r2 p2 p1 c2 c1 check +permutation w3 p3 r1 c3 w2 r2 p2 c2 p1 c1 check +permutation w3 p3 r1 c3 w2 p1 r2 p2 c1 c2 check +permutation w3 p3 r1 c3 w2 p1 r2 p2 c2 c1 check +permutation w3 p3 r1 c3 w2 p1 r2 c1 p2 c2 check +permutation w3 p3 r1 c3 w2 p1 c1 r2 p2 c2 check +permutation w3 p3 r1 c3 p1 r2 w2 p2 c1 c2 check +permutation w3 p3 r1 c3 p1 r2 w2 p2 c2 c1 check +permutation w3 p3 r1 c3 p1 r2 w2 c1 p2 c2 check +permutation w3 p3 r1 c3 p1 r2 c1 w2 p2 c2 check +permutation w3 p3 r1 c3 p1 w2 r2 p2 c1 c2 check +permutation w3 p3 r1 c3 p1 w2 r2 p2 c2 c1 check +permutation w3 p3 r1 c3 p1 w2 r2 c1 p2 c2 check +permutation w3 p3 r1 c3 p1 w2 c1 r2 p2 c2 check +permutation w3 p3 r1 c3 p1 c1 r2 w2 p2 c2 check +permutation w3 p3 r1 c3 p1 c1 w2 r2 p2 c2 check +permutation w3 p3 r2 r1 w2 p1 p2 c3 c1 c2 check +permutation w3 p3 r2 r1 w2 p1 p2 c3 c2 c1 check +permutation w3 p3 r2 r1 w2 p1 c3 p2 c1 c2 check +permutation w3 p3 r2 r1 w2 p1 c3 p2 c2 c1 check +permutation w3 p3 r2 r1 w2 p1 c3 c1 p2 c2 check +permutation w3 p3 r2 r1 w2 p2 p1 c3 c1 c2 check +permutation w3 p3 r2 r1 w2 p2 p1 c3 c2 c1 check +permutation w3 p3 r2 r1 w2 p2 c3 p1 c1 c2 check +permutation w3 p3 r2 r1 w2 p2 c3 p1 c2 c1 check +permutation w3 p3 r2 r1 w2 p2 c3 c2 p1 c1 check +permutation w3 p3 r2 r1 w2 c3 p1 p2 c1 c2 check +permutation w3 p3 r2 r1 w2 c3 p1 p2 c2 c1 check +permutation w3 p3 r2 r1 w2 c3 p1 c1 p2 c2 check +permutation w3 p3 r2 r1 w2 c3 p2 p1 c1 c2 check +permutation w3 p3 r2 r1 w2 c3 p2 p1 c2 c1 check +permutation w3 p3 r2 r1 w2 c3 p2 c2 p1 c1 check +permutation w3 p3 r2 r1 p1 w2 p2 c3 c1 c2 check +permutation w3 p3 r2 r1 p1 w2 p2 c3 c2 c1 check +permutation w3 p3 r2 r1 p1 w2 c3 p2 c1 c2 check +permutation w3 p3 r2 r1 p1 w2 c3 p2 c2 c1 check +permutation w3 p3 r2 r1 p1 w2 c3 c1 p2 c2 check +permutation w3 p3 r2 r1 p1 c3 w2 p2 c1 c2 check +permutation w3 p3 r2 r1 p1 c3 w2 p2 c2 c1 check +permutation w3 p3 r2 r1 p1 c3 w2 c1 p2 c2 check +permutation w3 p3 r2 r1 p1 c3 c1 w2 p2 c2 check +permutation w3 p3 r2 r1 c3 w2 p1 p2 c1 c2 check +permutation w3 p3 r2 r1 c3 w2 p1 p2 c2 c1 check +permutation w3 p3 r2 r1 c3 w2 p1 c1 p2 c2 check +permutation w3 p3 r2 r1 c3 w2 p2 p1 c1 c2 check +permutation w3 p3 r2 r1 c3 w2 p2 p1 c2 c1 check +permutation w3 p3 r2 r1 c3 w2 p2 c2 p1 c1 check +permutation w3 p3 r2 r1 c3 p1 w2 p2 c1 c2 check +permutation w3 p3 r2 r1 c3 p1 w2 p2 c2 c1 check +permutation w3 p3 r2 r1 c3 p1 w2 c1 p2 c2 check +permutation w3 p3 r2 r1 c3 p1 c1 w2 p2 c2 check +permutation w3 p3 r2 c3 r1 w2 p1 p2 c1 c2 check +permutation w3 p3 r2 c3 r1 w2 p1 p2 c2 c1 check +permutation w3 p3 r2 c3 r1 w2 p1 c1 p2 c2 check +permutation w3 p3 r2 c3 r1 w2 p2 p1 c1 c2 check +permutation w3 p3 r2 c3 r1 w2 p2 p1 c2 c1 check +permutation w3 p3 r2 c3 r1 w2 p2 c2 p1 c1 check +permutation w3 p3 r2 c3 r1 p1 w2 p2 c1 c2 check +permutation w3 p3 r2 c3 r1 p1 w2 p2 c2 c1 check +permutation w3 p3 r2 c3 r1 p1 w2 c1 p2 c2 check +permutation w3 p3 r2 c3 r1 p1 c1 w2 p2 c2 check +permutation w3 p3 c3 r1 r2 w2 p1 p2 c1 c2 check +permutation w3 p3 c3 r1 r2 w2 p1 p2 c2 c1 check +permutation w3 p3 c3 r1 r2 w2 p1 c1 p2 c2 check +permutation w3 p3 c3 r1 r2 w2 p2 p1 c1 c2 check +permutation w3 p3 c3 r1 r2 w2 p2 p1 c2 c1 check +permutation w3 p3 c3 r1 r2 w2 p2 c2 p1 c1 check +permutation w3 p3 c3 r1 r2 p1 w2 p2 c1 c2 check +permutation w3 p3 c3 r1 r2 p1 w2 p2 c2 c1 check +permutation w3 p3 c3 r1 r2 p1 w2 c1 p2 c2 check +permutation w3 p3 c3 r1 r2 p1 c1 w2 p2 c2 check +permutation w3 p3 c3 r1 w2 r2 p1 p2 c1 c2 check +permutation w3 p3 c3 r1 w2 r2 p1 p2 c2 c1 check +permutation w3 p3 c3 r1 w2 r2 p1 c1 p2 c2 check +permutation w3 p3 c3 r1 w2 r2 p2 p1 c1 c2 check +permutation w3 p3 c3 r1 w2 r2 p2 p1 c2 c1 check +permutation w3 p3 c3 r1 w2 r2 p2 c2 p1 c1 check +permutation w3 p3 c3 r1 w2 p1 r2 p2 c1 c2 check +permutation w3 p3 c3 r1 w2 p1 r2 p2 c2 c1 check +permutation w3 p3 c3 r1 w2 p1 r2 c1 p2 c2 check +permutation w3 p3 c3 r1 w2 p1 c1 r2 p2 c2 check +permutation w3 p3 c3 r1 p1 r2 w2 p2 c1 c2 check +permutation w3 p3 c3 r1 p1 r2 w2 p2 c2 c1 check +permutation w3 p3 c3 r1 p1 r2 w2 c1 p2 c2 check +permutation w3 p3 c3 r1 p1 r2 c1 w2 p2 c2 check +permutation w3 p3 c3 r1 p1 w2 r2 p2 c1 c2 check +permutation w3 p3 c3 r1 p1 w2 r2 p2 c2 c1 check +permutation w3 p3 c3 r1 p1 w2 r2 c1 p2 c2 check +permutation w3 p3 c3 r1 p1 w2 c1 r2 p2 c2 check +permutation w3 p3 c3 r1 p1 c1 r2 w2 p2 c2 check +permutation w3 p3 c3 r1 p1 c1 w2 r2 p2 c2 check +permutation w3 p3 c3 r2 r1 w2 p1 p2 c1 c2 check +permutation w3 p3 c3 r2 r1 w2 p1 p2 c2 c1 check +permutation w3 p3 c3 r2 r1 w2 p1 c1 p2 c2 check +permutation w3 p3 c3 r2 r1 w2 p2 p1 c1 c2 check +permutation w3 p3 c3 r2 r1 w2 p2 p1 c2 c1 check +permutation w3 p3 c3 r2 r1 w2 p2 c2 p1 c1 check +permutation w3 p3 c3 r2 r1 p1 w2 p2 c1 c2 check +permutation w3 p3 c3 r2 r1 p1 w2 p2 c2 c1 check +permutation w3 p3 c3 r2 r1 p1 w2 c1 p2 c2 check +permutation w3 p3 c3 r2 r1 p1 c1 w2 p2 c2 check diff --git a/src/test/isolation/specs/project-manager.spec b/src/test/isolation/specs/project-manager.spec new file mode 100644 index 0000000..42e5fc5 --- /dev/null +++ b/src/test/isolation/specs/project-manager.spec @@ -0,0 +1,30 @@ +# Project Manager test +# +# Ensure that the person who is on the project as a manager +# is flagged as a project manager in the person table. +# +# Any overlap between the transactions must cause a serialization failure. + +setup +{ + CREATE TABLE person (person_id int NOT NULL PRIMARY KEY, name text NOT NULL, is_project_manager bool NOT NULL); + INSERT INTO person VALUES (1, 'Robert Haas', true); + CREATE TABLE project (project_no int NOT NULL PRIMARY KEY, description text NOT NULL, project_manager int NOT NULL); +} + +teardown +{ + DROP TABLE person, project; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rx1 { SELECT count(*) FROM person WHERE person_id = 1 AND is_project_manager; } +step wy1 { INSERT INTO project VALUES (101, 'Build Great Wall', 1); } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step ry2 { SELECT count(*) FROM project WHERE project_manager = 1; } +step wx2 { UPDATE person SET is_project_manager = false WHERE person_id = 1; } +step c2 { COMMIT; } diff --git a/src/test/isolation/specs/propagate-lock-delete.spec b/src/test/isolation/specs/propagate-lock-delete.spec new file mode 100644 index 0000000..641fb84 --- /dev/null +++ b/src/test/isolation/specs/propagate-lock-delete.spec @@ -0,0 +1,42 @@ +# When an update propagates a preexisting lock on the updated tuple, make sure +# we don't ignore the lock in subsequent operations of the new version. (The +# version with the aborted savepoint uses a slightly different code path). +setup +{ + create table parent (i int, c char(3)); + create unique index parent_idx on parent (i); + insert into parent values (1, 'AAA'); + create table child (i int references parent(i)); +} + +teardown +{ + drop table child, parent; +} + +session s1 +step s1b { BEGIN; } +step s1l { INSERT INTO child VALUES (1); } +step s1c { COMMIT; } + +session s2 +step s2b { BEGIN; } +step s2l { INSERT INTO child VALUES (1); } +step s2c { COMMIT; } + +session s3 +step s3b { BEGIN; } +step s3u { UPDATE parent SET c=lower(c); } # no key update +step s3u2 { UPDATE parent SET i = i; } # key update +step s3svu { SAVEPOINT f; UPDATE parent SET c = 'bbb'; ROLLBACK TO f; } +step s3d { DELETE FROM parent; } +step s3c { COMMIT; } + +permutation s1b s1l s2b s2l s3b s3u s3d s1c s2c s3c +permutation s1b s1l s2b s2l s3b s3u s3svu s3d s1c s2c s3c +permutation s1b s1l s2b s2l s3b s3u2 s3d s1c s2c s3c +permutation s1b s1l s2b s2l s3b s3u2 s3svu s3d s1c s2c s3c +permutation s1b s1l s3b s3u s3d s1c s3c +permutation s1b s1l s3b s3u s3svu s3d s1c s3c +permutation s1b s1l s3b s3u2 s3d s1c s3c +permutation s1b s1l s3b s3u2 s3svu s3d s1c s3c diff --git a/src/test/isolation/specs/read-only-anomaly-2.spec b/src/test/isolation/specs/read-only-anomaly-2.spec new file mode 100644 index 0000000..6b579a6 --- /dev/null +++ b/src/test/isolation/specs/read-only-anomaly-2.spec @@ -0,0 +1,42 @@ +# The example from the paper "A read-only transaction anomaly under snapshot +# isolation"[1]. +# +# Here we test that serializable snapshot isolation (SERIALIZABLE) doesn't +# suffer from the anomaly, because s2 is aborted upon detection of a cycle. +# +# [1] http://www.cs.umb.edu/~poneil/ROAnom.pdf + +setup +{ + CREATE TABLE bank_account (id TEXT PRIMARY KEY, balance DECIMAL NOT NULL); + INSERT INTO bank_account (id, balance) VALUES ('X', 0), ('Y', 0); +} + +teardown +{ + DROP TABLE bank_account; +} + +session s1 +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } +step s1ry { SELECT balance FROM bank_account WHERE id = 'Y'; } +step s1wy { UPDATE bank_account SET balance = 20 WHERE id = 'Y'; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } +step s2rx { SELECT balance FROM bank_account WHERE id = 'X'; } +step s2ry { SELECT balance FROM bank_account WHERE id = 'Y'; } +step s2wx { UPDATE bank_account SET balance = -11 WHERE id = 'X'; } +step s2c { COMMIT; } + +session s3 +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } +step s3r { SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id; } +step s3c { COMMIT; } + +# without s3, s1 and s2 commit +permutation s2rx s2ry s1ry s1wy s1c s2wx s2c s3c + +# once s3 observes the data committed by s1, a cycle is created and s2 aborts +permutation s2rx s2ry s1ry s1wy s1c s3r s3c s2wx diff --git a/src/test/isolation/specs/read-only-anomaly-3.spec b/src/test/isolation/specs/read-only-anomaly-3.spec new file mode 100644 index 0000000..61d9c0b --- /dev/null +++ b/src/test/isolation/specs/read-only-anomaly-3.spec @@ -0,0 +1,39 @@ +# The example from the paper "A read-only transaction anomaly under snapshot +# isolation"[1]. +# +# Here we test that serializable snapshot isolation can avoid the anomaly +# without aborting any transactions, by instead causing s3 to be deferred +# until a safe snapshot can be taken. +# +# [1] http://www.cs.umb.edu/~poneil/ROAnom.pdf + +setup +{ + CREATE TABLE bank_account (id TEXT PRIMARY KEY, balance DECIMAL NOT NULL); + INSERT INTO bank_account (id, balance) VALUES ('X', 0), ('Y', 0); +} + +teardown +{ + DROP TABLE bank_account; +} + +session s1 +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } +step s1ry { SELECT balance FROM bank_account WHERE id = 'Y'; } +step s1wy { UPDATE bank_account SET balance = 20 WHERE id = 'Y'; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } +step s2rx { SELECT balance FROM bank_account WHERE id = 'X'; } +step s2ry { SELECT balance FROM bank_account WHERE id = 'Y'; } +step s2wx { UPDATE bank_account SET balance = -11 WHERE id = 'X'; } +step s2c { COMMIT; } + +session s3 +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE; } +step s3r { SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id; } +step s3c { COMMIT; } + +permutation s2rx s2ry s1ry s1wy s1c s3r s2wx s2c s3c diff --git a/src/test/isolation/specs/read-only-anomaly.spec b/src/test/isolation/specs/read-only-anomaly.spec new file mode 100644 index 0000000..8ff1af5 --- /dev/null +++ b/src/test/isolation/specs/read-only-anomaly.spec @@ -0,0 +1,38 @@ +# The example from the paper "A read-only transaction anomaly under snapshot +# isolation"[1]. +# +# Here we use snapshot isolation (REPEATABLE READ), so that s3 sees a state of +# afairs that is not consistent with any serial ordering of s1 and s2. +# +# [1] http://www.cs.umb.edu/~poneil/ROAnom.pdf + +setup +{ + CREATE TABLE bank_account (id TEXT PRIMARY KEY, balance DECIMAL NOT NULL); + INSERT INTO bank_account (id, balance) VALUES ('X', 0), ('Y', 0); +} + +teardown +{ + DROP TABLE bank_account; +} + +session s1 +setup { BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; } +step s1ry { SELECT balance FROM bank_account WHERE id = 'Y'; } +step s1wy { UPDATE bank_account SET balance = 20 WHERE id = 'Y'; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; } +step s2rx { SELECT balance FROM bank_account WHERE id = 'X'; } +step s2ry { SELECT balance FROM bank_account WHERE id = 'Y'; } +step s2wx { UPDATE bank_account SET balance = -11 WHERE id = 'X'; } +step s2c { COMMIT; } + +session s3 +setup { BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; } +step s3r { SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id; } +step s3c { COMMIT; } + +permutation s2rx s2ry s1ry s1wy s1c s3r s2wx s2c s3c diff --git a/src/test/isolation/specs/read-write-unique-2.spec b/src/test/isolation/specs/read-write-unique-2.spec new file mode 100644 index 0000000..16c73e1 --- /dev/null +++ b/src/test/isolation/specs/read-write-unique-2.spec @@ -0,0 +1,36 @@ +# Read-write-unique test. + +setup +{ + CREATE TABLE test (i integer PRIMARY KEY); +} + +teardown +{ + DROP TABLE test; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step r1 { SELECT * FROM test WHERE i = 42; } +step w1 { INSERT INTO test VALUES (42); } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step r2 { SELECT * FROM test WHERE i = 42; } +step w2 { INSERT INTO test VALUES (42); } +step c2 { COMMIT; } + +# Two SSI transactions see that there is no row with value 42 +# in the table, then try to insert that value; T1 inserts, +# and then T2 blocks waiting for T1 to commit. Finally, +# T2 reports a serialization failure. + +permutation r1 r2 w1 w2 c1 c2 + +# If the value is already visible before T2 begins, then a +# regular unique constraint violation should still be raised +# by T2. + +permutation r1 w1 c1 r2 w2 c2 diff --git a/src/test/isolation/specs/read-write-unique-3.spec b/src/test/isolation/specs/read-write-unique-3.spec new file mode 100644 index 0000000..cba2c4c --- /dev/null +++ b/src/test/isolation/specs/read-write-unique-3.spec @@ -0,0 +1,33 @@ +# Read-write-unique test. +# From bug report 9301. + +setup +{ + CREATE TABLE test ( + key integer UNIQUE, + val text + ); + + CREATE OR REPLACE FUNCTION insert_unique(k integer, v text) RETURNS void + LANGUAGE SQL AS $$ + INSERT INTO test (key, val) SELECT k, v WHERE NOT EXISTS (SELECT key FROM test WHERE key = k); + $$; +} + +teardown +{ + DROP FUNCTION insert_unique(integer, text); + DROP TABLE test; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rw1 { SELECT insert_unique(1, '1'); } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rw2 { SELECT insert_unique(1, '2'); } +step c2 { COMMIT; } + +permutation rw1 rw2 c1 c2 diff --git a/src/test/isolation/specs/read-write-unique-4.spec b/src/test/isolation/specs/read-write-unique-4.spec new file mode 100644 index 0000000..9002248 --- /dev/null +++ b/src/test/isolation/specs/read-write-unique-4.spec @@ -0,0 +1,48 @@ +# Read-write-unique test. +# Implementing a gapless sequence of ID numbers for each year. + +setup +{ + CREATE TABLE invoice ( + year int, + invoice_number int, + PRIMARY KEY (year, invoice_number) + ); + + INSERT INTO invoice VALUES (2016, 1), (2016, 2); +} + +teardown +{ + DROP TABLE invoice; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step r1 { SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016; } +step w1 { INSERT INTO invoice VALUES (2016, 3); } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step r2 { SELECT COALESCE(MAX(invoice_number) + 1, 1) FROM invoice WHERE year = 2016; } +step w2 { INSERT INTO invoice VALUES (2016, 3); } +step c2 { COMMIT; } + +# if they both read first then there should be an SSI conflict +permutation r1 r2 w1 w2 c1 c2 + +# cases where one session doesn't explicitly read before writing: + +# if s2 doesn't explicitly read, then trying to insert the value +# generates a unique constraint violation after s1 commits, as if s2 +# ran after s1 +permutation r1 w1 w2 c1 c2 + +# if s1 doesn't explicitly read, but s2 does, then s1 inserts and +# commits first, should s2 experience an SSI failure instead of a +# unique constraint violation? there is no serial order of operations +# (s1, s2) or (s2, s1) where s1 succeeds, and s2 doesn't see the row +# in an explicit select but then fails to insert due to unique +# constraint violation +permutation r2 w1 w2 c1 c2 diff --git a/src/test/isolation/specs/read-write-unique.spec b/src/test/isolation/specs/read-write-unique.spec new file mode 100644 index 0000000..3ce059f --- /dev/null +++ b/src/test/isolation/specs/read-write-unique.spec @@ -0,0 +1,39 @@ +# Read-write-unique test. + +setup +{ + CREATE TABLE test (i integer PRIMARY KEY); +} + +teardown +{ + DROP TABLE test; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step r1 { SELECT * FROM test; } +step w1 { INSERT INTO test VALUES (42); } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step r2 { SELECT * FROM test; } +step w2 { INSERT INTO test VALUES (42); } +step c2 { COMMIT; } + +# Two SSI transactions see that there is no row with value 42 +# in the table, then try to insert that value; T1 inserts, +# and then T2 blocks waiting for T1 to commit. Finally, +# T2 reports a serialization failure. +# +# (In an earlier version of Postgres, T2 would report a unique +# constraint violation). + +permutation r1 r2 w1 w2 c1 c2 + +# If the value is already visible before T2 begins, then a +# regular unique constraint violation should still be raised +# by T2. + +permutation r1 w1 c1 r2 w2 c2 diff --git a/src/test/isolation/specs/receipt-report.spec b/src/test/isolation/specs/receipt-report.spec new file mode 100644 index 0000000..85ac60f --- /dev/null +++ b/src/test/isolation/specs/receipt-report.spec @@ -0,0 +1,47 @@ +# Daily Report of Receipts test. +# +# This test doesn't persist a bad state in the database; rather, it +# provides a view of the data which is not consistent with any +# order of execution of the serializable transactions. It +# demonstrates a situation where the deposit date for receipts could +# be changed and a report of the closed day's receipts subsequently +# run which will miss a receipt from the date which has been closed. +# +# There are only six permutations which must cause a serialization failure. +# Failure cases are where s1 overlaps both s2 and s3, but s2 commits before +# s3 executes its first SELECT. +# +# As long as s3 is declared READ ONLY there should be no false positives. +# If s3 were changed to READ WRITE, we would currently expect 42 false +# positives. Further work dealing with de facto READ ONLY transactions +# may be able to reduce or eliminate those false positives. + +setup +{ + CREATE TABLE ctl (k text NOT NULL PRIMARY KEY, deposit_date date NOT NULL); + INSERT INTO ctl VALUES ('receipt', DATE '2008-12-22'); + CREATE TABLE receipt (receipt_no int NOT NULL PRIMARY KEY, deposit_date date NOT NULL, amount numeric(13,2)); + INSERT INTO receipt VALUES (1, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 1.00); + INSERT INTO receipt VALUES (2, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 2.00); +} + +teardown +{ + DROP TABLE ctl, receipt; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rxwy1 { INSERT INTO receipt VALUES (3, (SELECT deposit_date FROM ctl WHERE k = 'receipt'), 4.00); } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step wx2 { UPDATE ctl SET deposit_date = DATE '2008-12-23' WHERE k = 'receipt'; } +step c2 { COMMIT; } + +session s3 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE, READ ONLY; } +step rx3 { SELECT * FROM ctl WHERE k = 'receipt'; } +step ry3 { SELECT * FROM receipt WHERE deposit_date = DATE '2008-12-22'; } +step c3 { COMMIT; } diff --git a/src/test/isolation/specs/referential-integrity.spec b/src/test/isolation/specs/referential-integrity.spec new file mode 100644 index 0000000..ecaa9bb --- /dev/null +++ b/src/test/isolation/specs/referential-integrity.spec @@ -0,0 +1,32 @@ +# Referential Integrity test +# +# The assumption here is that the application code issuing the SELECT +# to test for the presence or absence of a related record would do the +# right thing -- this script doesn't include that logic. +# +# Any overlap between the transactions must cause a serialization failure. + +setup +{ + CREATE TABLE a (i int PRIMARY KEY); + CREATE TABLE b (a_id int); + INSERT INTO a VALUES (1); +} + +teardown +{ + DROP TABLE a, b; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rx1 { SELECT i FROM a WHERE i = 1; } +step wy1 { INSERT INTO b VALUES (1); } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rx2 { SELECT i FROM a WHERE i = 1; } +step ry2 { SELECT a_id FROM b WHERE a_id = 1; } +step wx2 { DELETE FROM a WHERE i = 1; } +step c2 { COMMIT; } diff --git a/src/test/isolation/specs/reindex-concurrently-toast.spec b/src/test/isolation/specs/reindex-concurrently-toast.spec new file mode 100644 index 0000000..8188792 --- /dev/null +++ b/src/test/isolation/specs/reindex-concurrently-toast.spec @@ -0,0 +1,119 @@ +# REINDEX CONCURRENTLY with toast relations +# +# Ensure that concurrent operations work correctly when a REINDEX is performed +# concurrently on toast relations. Toast relation names are not deterministic, +# so this abuses of allow_system_table_mods to change the names of toast +# tables and its indexes so as they can be executed with REINDEX CONCURRENTLY, +# which cannot be launched in a transaction context. + +# Create a table, with deterministic names for its toast relation and indexes. +# Fortunately ALTER TABLE is transactional, making the renaming of toast +# relations possible with allow_system_table_mods. +setup +{ + CREATE TABLE reind_con_wide(id int primary key, data text); + INSERT INTO reind_con_wide + SELECT 1, repeat('1', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); + INSERT INTO reind_con_wide + SELECT 2, repeat('2', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); + SET allow_system_table_mods TO true; + DO $$DECLARE r record; + BEGIN + SELECT INTO r reltoastrelid::regclass::text AS table_name FROM pg_class + WHERE oid = 'reind_con_wide'::regclass; + EXECUTE 'ALTER TABLE ' || r.table_name || ' RENAME TO reind_con_toast;'; + SELECT INTO r indexrelid::regclass::text AS index_name FROM pg_index + WHERE indrelid = (SELECT oid FROM pg_class where relname = 'reind_con_toast'); + EXECUTE 'ALTER INDEX ' || r.index_name || ' RENAME TO reind_con_toast_idx;'; + END$$; +} + +teardown +{ + DROP TABLE IF EXISTS reind_con_wide; +} + +session s1 +setup { BEGIN; } +step lrex1 { lock TABLE reind_con_wide in ROW EXCLUSIVE MODE; } +step lsha1 { lock TABLE reind_con_wide in SHARE MODE; } +step lexc1 { lock TABLE reind_con_wide in EXCLUSIVE MODE; } +step ins1 { INSERT INTO reind_con_wide SELECT 3, repeat('3', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i); } +step upd1 { UPDATE reind_con_wide SET data = (SELECT repeat('4', 11) || string_agg(g.i::text || random()::text, '') FROM generate_series(1, 500) g(i)) WHERE id = 1; } +step del1 { DELETE FROM reind_con_wide WHERE id = 2; } +step dro1 { DROP TABLE reind_con_wide; } +step end1 { COMMIT; } +step rol1 { ROLLBACK; } + +session s2 +step retab2 { REINDEX TABLE CONCURRENTLY pg_toast.reind_con_toast; } +step reind2 { REINDEX INDEX CONCURRENTLY pg_toast.reind_con_toast_idx; } +step sel2 { SELECT id, substr(data, 1, 10) FROM reind_con_wide ORDER BY id; } + +# Transaction commit with ROW EXCLUSIVE MODE +permutation lrex1 ins1 retab2 end1 sel2 +permutation lrex1 ins1 reind2 end1 sel2 +permutation lrex1 upd1 retab2 end1 sel2 +permutation lrex1 upd1 reind2 end1 sel2 +permutation lrex1 del1 retab2 end1 sel2 +permutation lrex1 del1 reind2 end1 sel2 +permutation lrex1 dro1 retab2 end1 sel2 +permutation lrex1 dro1 reind2 end1 sel2 +permutation lrex1 retab2 dro1 end1 sel2 +permutation lrex1 reind2 dro1 end1 sel2 +# Transaction commit with SHARE MODE +permutation lsha1 ins1 retab2 end1 sel2 +permutation lsha1 ins1 reind2 end1 sel2 +permutation lsha1 upd1 retab2 end1 sel2 +permutation lsha1 upd1 reind2 end1 sel2 +permutation lsha1 del1 retab2 end1 sel2 +permutation lsha1 del1 reind2 end1 sel2 +permutation lsha1 dro1 retab2 end1 sel2 +permutation lsha1 dro1 reind2 end1 sel2 +permutation lsha1 retab2 dro1 end1 sel2 +permutation lsha1 reind2 dro1 end1 sel2 +# Transaction commit with EXCLUSIVE MODE +permutation lexc1 ins1 retab2 end1 sel2 +permutation lexc1 ins1 reind2 end1 sel2 +permutation lexc1 upd1 retab2 end1 sel2 +permutation lexc1 upd1 reind2 end1 sel2 +permutation lexc1 del1 retab2 end1 sel2 +permutation lexc1 del1 reind2 end1 sel2 +permutation lexc1 dro1 retab2 end1 sel2 +permutation lexc1 dro1 reind2 end1 sel2 +permutation lexc1 retab2 dro1 end1 sel2 +permutation lexc1 reind2 dro1 end1 sel2 + +# Transaction rollback with ROW EXCLUSIVE MODE +permutation lrex1 ins1 retab2 rol1 sel2 +permutation lrex1 ins1 reind2 rol1 sel2 +permutation lrex1 upd1 retab2 rol1 sel2 +permutation lrex1 upd1 reind2 rol1 sel2 +permutation lrex1 del1 retab2 rol1 sel2 +permutation lrex1 del1 reind2 rol1 sel2 +permutation lrex1 dro1 retab2 rol1 sel2 +permutation lrex1 dro1 reind2 rol1 sel2 +permutation lrex1 retab2 dro1 rol1 sel2 +permutation lrex1 reind2 dro1 rol1 sel2 +# Transaction rollback with SHARE MODE +permutation lsha1 ins1 retab2 rol1 sel2 +permutation lsha1 ins1 reind2 rol1 sel2 +permutation lsha1 upd1 retab2 rol1 sel2 +permutation lsha1 upd1 reind2 rol1 sel2 +permutation lsha1 del1 retab2 rol1 sel2 +permutation lsha1 del1 reind2 rol1 sel2 +permutation lsha1 dro1 retab2 rol1 sel2 +permutation lsha1 dro1 reind2 rol1 sel2 +permutation lsha1 retab2 dro1 rol1 sel2 +permutation lsha1 reind2 dro1 rol1 sel2 +# Transaction rollback with EXCLUSIVE MODE +permutation lexc1 ins1 retab2 rol1 sel2 +permutation lexc1 ins1 reind2 rol1 sel2 +permutation lexc1 upd1 retab2 rol1 sel2 +permutation lexc1 upd1 reind2 rol1 sel2 +permutation lexc1 del1 retab2 rol1 sel2 +permutation lexc1 del1 reind2 rol1 sel2 +permutation lexc1 dro1 retab2 rol1 sel2 +permutation lexc1 dro1 reind2 rol1 sel2 +permutation lexc1 retab2 dro1 rol1 sel2 +permutation lexc1 reind2 dro1 rol1 sel2 diff --git a/src/test/isolation/specs/reindex-concurrently.spec b/src/test/isolation/specs/reindex-concurrently.spec new file mode 100644 index 0000000..31844bd --- /dev/null +++ b/src/test/isolation/specs/reindex-concurrently.spec @@ -0,0 +1,40 @@ +# REINDEX CONCURRENTLY +# +# Ensure that concurrent operations work correctly when a REINDEX is performed +# concurrently. + +setup +{ + CREATE TABLE reind_con_tab(id serial primary key, data text); + INSERT INTO reind_con_tab(data) VALUES ('aa'); + INSERT INTO reind_con_tab(data) VALUES ('aaa'); + INSERT INTO reind_con_tab(data) VALUES ('aaaa'); + INSERT INTO reind_con_tab(data) VALUES ('aaaaa'); +} + +teardown +{ + DROP TABLE reind_con_tab; +} + +session s1 +setup { BEGIN; } +step sel1 { SELECT data FROM reind_con_tab WHERE id = 3; } +step end1 { COMMIT; } + +session s2 +setup { BEGIN; } +step upd2 { UPDATE reind_con_tab SET data = 'bbbb' WHERE id = 3; } +step ins2 { INSERT INTO reind_con_tab(data) VALUES ('cccc'); } +step del2 { DELETE FROM reind_con_tab WHERE data = 'cccc'; } +step end2 { COMMIT; } + +session s3 +step reindex { REINDEX TABLE CONCURRENTLY reind_con_tab; } + +permutation reindex sel1 upd2 ins2 del2 end1 end2 +permutation sel1 reindex upd2 ins2 del2 end1 end2 +permutation sel1 upd2 reindex ins2 del2 end1 end2 +permutation sel1 upd2 ins2 reindex del2 end1 end2 +permutation sel1 upd2 ins2 del2 reindex end1 end2 +permutation sel1 upd2 ins2 del2 end1 reindex end2 diff --git a/src/test/isolation/specs/reindex-schema.spec b/src/test/isolation/specs/reindex-schema.spec new file mode 100644 index 0000000..dee4ad7 --- /dev/null +++ b/src/test/isolation/specs/reindex-schema.spec @@ -0,0 +1,32 @@ +# REINDEX with schemas +# +# Check that concurrent drop of relations while doing a REINDEX +# SCHEMA allows the command to work. + +setup +{ + CREATE SCHEMA reindex_schema; + CREATE TABLE reindex_schema.tab_locked (a int PRIMARY KEY); + CREATE TABLE reindex_schema.tab_dropped (a int PRIMARY KEY); +} + +teardown +{ + DROP SCHEMA reindex_schema CASCADE; +} + +session s1 +step begin1 { BEGIN; } +step lock1 { LOCK reindex_schema.tab_locked IN SHARE UPDATE EXCLUSIVE MODE; } +step end1 { COMMIT; } + +session s2 +step reindex2 { REINDEX SCHEMA reindex_schema; } +step reindex_conc2 { REINDEX SCHEMA CONCURRENTLY reindex_schema; } + +session s3 +step drop3 { DROP TABLE reindex_schema.tab_dropped; } + +# The table can be dropped while reindex is waiting. +permutation begin1 lock1 reindex2 drop3 end1 +permutation begin1 lock1 reindex_conc2 drop3 end1 diff --git a/src/test/isolation/specs/ri-trigger.spec b/src/test/isolation/specs/ri-trigger.spec new file mode 100644 index 0000000..00fcdff --- /dev/null +++ b/src/test/isolation/specs/ri-trigger.spec @@ -0,0 +1,53 @@ +# RI Trigger test +# +# Test trigger-based referential integrity enforcement. +# +# Any overlap between the transactions must cause a serialization failure. + +setup +{ + CREATE TABLE parent (parent_id SERIAL NOT NULL PRIMARY KEY); + CREATE TABLE child (child_id SERIAL NOT NULL PRIMARY KEY, parent_id INTEGER NOT NULL); + CREATE FUNCTION ri_parent() RETURNS TRIGGER LANGUAGE PLPGSQL AS $body$ + BEGIN + PERFORM TRUE FROM child WHERE parent_id = OLD.parent_id; + IF FOUND THEN + RAISE SQLSTATE '23503' USING MESSAGE = 'child row exists'; + END IF; + IF TG_OP = 'DELETE' THEN + RETURN OLD; + END IF; + RETURN NEW; + END; + $body$; + CREATE TRIGGER ri_parent BEFORE UPDATE OR DELETE ON parent FOR EACH ROW EXECUTE PROCEDURE ri_parent(); + CREATE FUNCTION ri_child() RETURNS TRIGGER LANGUAGE PLPGSQL AS $body$ + BEGIN + PERFORM TRUE FROM parent WHERE parent_id = NEW.parent_id; + IF NOT FOUND THEN + RAISE SQLSTATE '23503' USING MESSAGE = 'parent row missing'; + END IF; + RETURN NEW; + END; + $body$; + CREATE TRIGGER ri_child BEFORE INSERT OR UPDATE ON child FOR EACH ROW EXECUTE PROCEDURE ri_child(); + INSERT INTO parent VALUES(0); +} + +teardown +{ + DROP TABLE parent, child; + DROP FUNCTION ri_parent(); + DROP FUNCTION ri_child(); +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step wxry1 { INSERT INTO child (parent_id) VALUES (0); } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step r2 { SELECT TRUE; } +step wyrx2 { DELETE FROM parent WHERE parent_id = 0; } +step c2 { COMMIT; } diff --git a/src/test/isolation/specs/sequence-ddl.spec b/src/test/isolation/specs/sequence-ddl.spec new file mode 100644 index 0000000..7ead8af --- /dev/null +++ b/src/test/isolation/specs/sequence-ddl.spec @@ -0,0 +1,41 @@ +# Test sequence usage and concurrent sequence DDL + +setup +{ + CREATE SEQUENCE seq1; +} + +teardown +{ + DROP SEQUENCE seq1; +} + +session s1 +setup { BEGIN; } +step s1alter { ALTER SEQUENCE seq1 MAXVALUE 10; } +step s1alter2 { ALTER SEQUENCE seq1 MAXVALUE 20; } +step s1restart { ALTER SEQUENCE seq1 RESTART WITH 5; } +step s1commit { COMMIT; } + +session s2 +step s2begin { BEGIN; } +step s2nv { SELECT nextval('seq1') FROM generate_series(1, 15); } +step s2commit { COMMIT; } + +permutation s1alter s1commit s2nv + +# Prior to PG10, the s2nv step would see the uncommitted s1alter +# change, but now it waits. +permutation s1alter s2nv s1commit + +# Prior to PG10, the s2nv step would see the uncommitted s1restart +# change, but now it waits. +permutation s1restart s2nv s1commit + +# In contrast to ALTER setval() is non-transactional, so it doesn't +# have to wait. +permutation s1restart s2nv s1commit + +# nextval doesn't release lock until transaction end, so s1alter2 has +# to wait for s2commit. +permutation s2begin s2nv s1alter2 s2commit s1commit diff --git a/src/test/isolation/specs/serializable-parallel-2.spec b/src/test/isolation/specs/serializable-parallel-2.spec new file mode 100644 index 0000000..f3941f7 --- /dev/null +++ b/src/test/isolation/specs/serializable-parallel-2.spec @@ -0,0 +1,30 @@ +# Exercise the case where a read-only serializable transaction has +# SXACT_FLAG_RO_SAFE set in a parallel query. + +setup +{ + CREATE TABLE foo AS SELECT generate_series(1, 10)::int a; + ALTER TABLE foo SET (parallel_workers = 2); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } +step s1r { SELECT * FROM foo; } +step s1c { COMMIT; } + +session s2 +setup { + BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY; + SET parallel_setup_cost = 0; + SET parallel_tuple_cost = 0; + } +step s2r1 { SELECT * FROM foo; } +step s2r2 { SELECT * FROM foo; } +step s2c { COMMIT; } + +permutation s1r s2r1 s1c s2r2 s2c diff --git a/src/test/isolation/specs/serializable-parallel.spec b/src/test/isolation/specs/serializable-parallel.spec new file mode 100644 index 0000000..508648e --- /dev/null +++ b/src/test/isolation/specs/serializable-parallel.spec @@ -0,0 +1,47 @@ +# The example from the paper "A read-only transaction anomaly under snapshot +# isolation"[1]. +# +# Here we test that serializable snapshot isolation (SERIALIZABLE) doesn't +# suffer from the anomaly, because s2 is aborted upon detection of a cycle. +# In this case the read only query s3 happens to be running in a parallel +# worker. +# +# [1] http://www.cs.umb.edu/~poneil/ROAnom.pdf + +setup +{ + CREATE TABLE bank_account (id TEXT PRIMARY KEY, balance DECIMAL NOT NULL); + INSERT INTO bank_account (id, balance) VALUES ('X', 0), ('Y', 0); +} + +teardown +{ + DROP TABLE bank_account; +} + +session s1 +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } +step s1ry { SELECT balance FROM bank_account WHERE id = 'Y'; } +step s1wy { UPDATE bank_account SET balance = 20 WHERE id = 'Y'; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } +step s2rx { SELECT balance FROM bank_account WHERE id = 'X'; } +step s2ry { SELECT balance FROM bank_account WHERE id = 'Y'; } +step s2wx { UPDATE bank_account SET balance = -11 WHERE id = 'X'; } +step s2c { COMMIT; } + +session s3 +setup { + BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; + SET force_parallel_mode = on; + } +step s3r { SELECT id, balance FROM bank_account WHERE id IN ('X', 'Y') ORDER BY id; } +step s3c { COMMIT; } + +# without s3, s1 and s2 commit +permutation s2rx s2ry s1ry s1wy s1c s2wx s2c s3c + +# once s3 observes the data committed by s1, a cycle is created and s2 aborts +permutation s2rx s2ry s1ry s1wy s1c s3r s3c s2wx diff --git a/src/test/isolation/specs/simple-write-skew.spec b/src/test/isolation/specs/simple-write-skew.spec new file mode 100644 index 0000000..ecabbf1 --- /dev/null +++ b/src/test/isolation/specs/simple-write-skew.spec @@ -0,0 +1,30 @@ +# Write skew test. +# +# This test has two serializable transactions: one which updates all +# 'apple' rows to 'pear' and one which updates all 'pear' rows to +# 'apple'. If these were serialized (run one at a time) either +# value could be present, but not both. One must be rolled back to +# prevent the write skew anomaly. +# +# Any overlap between the transactions must cause a serialization failure. + +setup +{ + CREATE TABLE test (i int PRIMARY KEY, t text); + INSERT INTO test VALUES (5, 'apple'), (7, 'pear'), (11, 'banana'); +} + +teardown +{ + DROP TABLE test; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rwx1 { UPDATE test SET t = 'apple' WHERE t = 'pear'; } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rwx2 { UPDATE test SET t = 'pear' WHERE t = 'apple'} +step c2 { COMMIT; } diff --git a/src/test/isolation/specs/skip-locked-2.spec b/src/test/isolation/specs/skip-locked-2.spec new file mode 100644 index 0000000..cfdaa93 --- /dev/null +++ b/src/test/isolation/specs/skip-locked-2.spec @@ -0,0 +1,41 @@ +# Test SKIP LOCKED with multixact locks. + +setup +{ + CREATE TABLE queue ( + id int PRIMARY KEY, + data text NOT NULL, + status text NOT NULL + ); + INSERT INTO queue VALUES (1, 'foo', 'NEW'), (2, 'bar', 'NEW'); +} + +teardown +{ + DROP TABLE queue; +} + +session s1 +setup { BEGIN; } +step s1a { SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1; } +step s1b { COMMIT; } + +session s2 +setup { BEGIN; } +step s2a { SELECT * FROM queue ORDER BY id FOR SHARE SKIP LOCKED LIMIT 1; } +step s2b { SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; } +step s2c { COMMIT; } + +# s1 and s2 both get SHARE lock, creating a multixact lock, then s2 +# tries to update to UPDATE but skips the record because it can't +# acquire a multixact lock +permutation s1a s2a s2b s1b s2c + +# the same but with the SHARE locks acquired in a different order, so +# s2 again skips because it can't acquired a multixact lock +permutation s2a s1a s2b s1b s2c + +# s2 acquires SHARE then UPDATE, then s1 tries to acquire SHARE but +# can't so skips the first record because it can't acquire a regular +# lock +permutation s2a s2b s1a s1b s2c diff --git a/src/test/isolation/specs/skip-locked-3.spec b/src/test/isolation/specs/skip-locked-3.spec new file mode 100644 index 0000000..7921425 --- /dev/null +++ b/src/test/isolation/specs/skip-locked-3.spec @@ -0,0 +1,36 @@ +# Test SKIP LOCKED with tuple locks. + +setup +{ + CREATE TABLE queue ( + id int PRIMARY KEY, + data text NOT NULL, + status text NOT NULL + ); + INSERT INTO queue VALUES (1, 'foo', 'NEW'), (2, 'bar', 'NEW'); +} + +teardown +{ + DROP TABLE queue; +} + +session s1 +setup { BEGIN; } +step s1a { SELECT * FROM queue ORDER BY id FOR UPDATE LIMIT 1; } +step s1b { COMMIT; } + +session s2 +setup { BEGIN; } +step s2a { SELECT * FROM queue ORDER BY id FOR UPDATE LIMIT 1; } +step s2b { COMMIT; } + +session s3 +setup { BEGIN; } +step s3a { SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; } +step s3b { COMMIT; } + +# s3 skips to the second record because it can't obtain the tuple lock +# (s2 holds the tuple lock because it is next in line to obtain the +# row lock, and s1 holds the row lock) +permutation s1a s2a s3a s1b s2b s3b diff --git a/src/test/isolation/specs/skip-locked-4.spec b/src/test/isolation/specs/skip-locked-4.spec new file mode 100644 index 0000000..02994a3 --- /dev/null +++ b/src/test/isolation/specs/skip-locked-4.spec @@ -0,0 +1,36 @@ +# Test SKIP LOCKED with an updated tuple chain. + +setup +{ + CREATE TABLE foo ( + id int PRIMARY KEY, + data text NOT NULL + ); + INSERT INTO foo VALUES (1, 'x'), (2, 'x'); +} + +teardown +{ + DROP TABLE foo; +} + +session s1 +setup { BEGIN; } +step s1a { SELECT * FROM foo WHERE pg_advisory_lock(0) IS NOT NULL ORDER BY id LIMIT 1 FOR UPDATE SKIP LOCKED; } +step s1b { COMMIT; } + +session s2 +step s2a { SELECT pg_advisory_lock(0); } +step s2b { UPDATE foo SET data = data WHERE id = 1; } +step s2c { BEGIN; } +step s2d { UPDATE foo SET data = data WHERE id = 1; } +step s2e { SELECT pg_advisory_unlock(0); } +step s2f { COMMIT; } + +# s1 takes a snapshot but then waits on an advisory lock, then s2 +# updates the row in one transaction, then again in another without +# committing, before allowing s1 to proceed to try to lock a row; +# because it has a snapshot that sees the older version, we reach the +# waiting code in EvalPlanQualFetch which skips rows when in SKIP +# LOCKED mode, so s1 sees the second row +permutation s2a s1a s2b s2c s2d s2e s1b s2f diff --git a/src/test/isolation/specs/skip-locked.spec b/src/test/isolation/specs/skip-locked.spec new file mode 100644 index 0000000..12168f8 --- /dev/null +++ b/src/test/isolation/specs/skip-locked.spec @@ -0,0 +1,28 @@ +# Test SKIP LOCKED when regular row locks can't be acquired. + +setup +{ + CREATE TABLE queue ( + id int PRIMARY KEY, + data text NOT NULL, + status text NOT NULL + ); + INSERT INTO queue VALUES (1, 'foo', 'NEW'), (2, 'bar', 'NEW'); +} + +teardown +{ + DROP TABLE queue; +} + +session s1 +setup { BEGIN; } +step s1a { SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; } +step s1b { SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; } +step s1c { COMMIT; } + +session s2 +setup { BEGIN; } +step s2a { SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; } +step s2b { SELECT * FROM queue ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1; } +step s2c { COMMIT; } diff --git a/src/test/isolation/specs/temp-schema-cleanup.spec b/src/test/isolation/specs/temp-schema-cleanup.spec new file mode 100644 index 0000000..a9417b7 --- /dev/null +++ b/src/test/isolation/specs/temp-schema-cleanup.spec @@ -0,0 +1,85 @@ +# Test cleanup of objects in temporary schema. + +setup { + CREATE TABLE s1_temp_schema(oid oid); + -- to help create a long function + CREATE FUNCTION exec(p_foo text) RETURNS void LANGUAGE plpgsql AS $$BEGIN EXECUTE p_foo; END;$$; +} + +teardown { + DROP TABLE s1_temp_schema; + DROP FUNCTION exec(text); +} + +session "s1" +setup { + CREATE TEMPORARY TABLE just_to_create_temp_schema(); + DROP TABLE just_to_create_temp_schema; + INSERT INTO s1_temp_schema SELECT pg_my_temp_schema(); +} + +step s1_advisory { + SELECT pg_advisory_lock('pg_namespace'::regclass::int8); +} + +step s1_create_temp_objects { + + -- create function large enough to be toasted, to ensure we correctly clean those up, a prior bug + -- https://postgr.es/m/CAOFAq3BU5Mf2TTvu8D9n_ZOoFAeQswuzk7yziAb7xuw_qyw5gw%40mail.gmail.com + SELECT exec(format($outer$ + CREATE OR REPLACE FUNCTION pg_temp.long() RETURNS text LANGUAGE sql AS $body$ SELECT %L; $body$$outer$, + (SELECT string_agg(g.i::text||':'||random()::text, '|') FROM generate_series(1, 100) g(i)))); + + -- The above bug requirs function removal to happen after a catalog + -- invalidation. dependency.c sorts objects in descending oid order so + -- that newer objects are deleted before older objects, so create a + -- table after. + CREATE TEMPORARY TABLE invalidate_catalog_cache(); + + -- test non-temp function is dropped when depending on temp table + CREATE TEMPORARY TABLE just_give_me_a_type(id serial primary key); + + CREATE FUNCTION uses_a_temp_type(just_give_me_a_type) RETURNS int LANGUAGE sql AS $$SELECT 1;$$; +} + +step s1_discard_temp { + DISCARD TEMP; +} + +step s1_exit { + SELECT pg_terminate_backend(pg_backend_pid()); +} + + +session "s2" + +step s2_advisory { + SELECT pg_advisory_lock('pg_namespace'::regclass::int8); +} + +step s2_check_schema { + SELECT oid::regclass FROM pg_class WHERE relnamespace = (SELECT oid FROM s1_temp_schema); + SELECT oid::regproc FROM pg_proc WHERE pronamespace = (SELECT oid FROM s1_temp_schema); + SELECT oid::regproc FROM pg_type WHERE typnamespace = (SELECT oid FROM s1_temp_schema); +} + + +# Test temporary object cleanup during DISCARD. +permutation + s1_create_temp_objects + s1_discard_temp + s2_check_schema + +# Test temporary object cleanup during process exit. +# +# To check (in s2) if temporary objects (in s1) have properly been removed we +# need to wait for s1 to finish cleaning up. Luckily session level advisory +# locks are released only after temp table cleanup. +permutation + s1_advisory + s2_advisory + s1_create_temp_objects + s1_exit + s2_check_schema + +# Can't run further tests here, because s1's connection is dead diff --git a/src/test/isolation/specs/temporal-range-integrity.spec b/src/test/isolation/specs/temporal-range-integrity.spec new file mode 100644 index 0000000..2d4c59c --- /dev/null +++ b/src/test/isolation/specs/temporal-range-integrity.spec @@ -0,0 +1,38 @@ +# Temporal Range Integrity test +# +# Snapshot integrity fails with simple referential integrity tests, +# but those don't make for good demonstrations because people just +# say that foreign key definitions should be used instead. There +# are many integrity tests which are conceptually very similar but +# don't have built-in support which will fail when used in triggers. +# This is intended to illustrate such cases. It is obviously very +# hard to exercise all these permutations when the code is actually +# in a trigger; this test pulls what would normally be inside of +# triggers out to the top level to control the permutations. +# +# Any overlap between the transactions must cause a serialization failure. + + +setup +{ + CREATE TABLE statute (statute_cite text NOT NULL, eff_date date NOT NULL, exp_date date, CONSTRAINT statute_pkey PRIMARY KEY (statute_cite, eff_date)); + INSERT INTO statute VALUES ('123.45(1)a', DATE '2008-01-01', NULL); + CREATE TABLE offense (offense_no int NOT NULL, statute_cite text NOT NULL, offense_date date NOT NULL, CONSTRAINT offense_pkey PRIMARY KEY (offense_no)); +} + +teardown +{ + DROP TABLE statute, offense; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rx1 { SELECT count(*) FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date <= DATE '2009-05-15' AND (exp_date IS NULL OR exp_date > DATE '2009-05-15'); } +step wy1 { INSERT INTO offense VALUES (1, '123.45(1)a', DATE '2009-05-15'); } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step ry2 { SELECT count(*) FROM offense WHERE statute_cite = '123.45(1)a' AND offense_date >= DATE '2008-01-01'; } +step wx2 { DELETE FROM statute WHERE statute_cite = '123.45(1)a' AND eff_date = DATE '2008-01-01'; } +step c2 { COMMIT; } diff --git a/src/test/isolation/specs/timeouts.spec b/src/test/isolation/specs/timeouts.spec new file mode 100644 index 0000000..c747b4a --- /dev/null +++ b/src/test/isolation/specs/timeouts.spec @@ -0,0 +1,49 @@ +# Simple tests for statement_timeout and lock_timeout features + +setup +{ + CREATE TABLE accounts (accountid text PRIMARY KEY, balance numeric not null); + INSERT INTO accounts VALUES ('checking', 600), ('savings', 600); +} + +teardown +{ + DROP TABLE accounts; +} + +session s1 +setup { BEGIN ISOLATION LEVEL READ COMMITTED; } +step rdtbl { SELECT * FROM accounts; } +step wrtbl { UPDATE accounts SET balance = balance + 100; } +teardown { ABORT; } + +session s2 +setup { BEGIN ISOLATION LEVEL READ COMMITTED; } +step sto { SET statement_timeout = '10ms'; } +step lto { SET lock_timeout = '10ms'; } +step lsto { SET lock_timeout = '10ms'; SET statement_timeout = '10s'; } +step slto { SET lock_timeout = '10s'; SET statement_timeout = '10ms'; } +step locktbl { LOCK TABLE accounts; } +step update { DELETE FROM accounts WHERE accountid = 'checking'; } +teardown { ABORT; } + +# It's possible that the isolation tester will not observe the final +# steps as "waiting", thanks to the relatively short timeouts we use. +# We can ensure consistent test output by marking those steps with (*). + +# statement timeout, table-level lock +permutation rdtbl sto locktbl(*) +# lock timeout, table-level lock +permutation rdtbl lto locktbl(*) +# lock timeout expires first, table-level lock +permutation rdtbl lsto locktbl(*) +# statement timeout expires first, table-level lock +permutation rdtbl slto locktbl(*) +# statement timeout, row-level lock +permutation wrtbl sto update(*) +# lock timeout, row-level lock +permutation wrtbl lto update(*) +# lock timeout expires first, row-level lock +permutation wrtbl lsto update(*) +# statement timeout expires first, row-level lock +permutation wrtbl slto update(*) diff --git a/src/test/isolation/specs/total-cash.spec b/src/test/isolation/specs/total-cash.spec new file mode 100644 index 0000000..d98121a --- /dev/null +++ b/src/test/isolation/specs/total-cash.spec @@ -0,0 +1,28 @@ +# Total Cash test +# +# Another famous test of snapshot isolation anomaly. +# +# Any overlap between the transactions must cause a serialization failure. + +setup +{ + CREATE TABLE accounts (accountid text NOT NULL PRIMARY KEY, balance numeric not null); + INSERT INTO accounts VALUES ('checking', 600),('savings',600); +} + +teardown +{ + DROP TABLE accounts; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step wx1 { UPDATE accounts SET balance = balance - 200 WHERE accountid = 'checking'; } +step rxy1 { SELECT SUM(balance) FROM accounts; } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step wy2 { UPDATE accounts SET balance = balance - 200 WHERE accountid = 'savings'; } +step rxy2 { SELECT SUM(balance) FROM accounts; } +step c2 { COMMIT; } diff --git a/src/test/isolation/specs/truncate-conflict.spec b/src/test/isolation/specs/truncate-conflict.spec new file mode 100644 index 0000000..0f77ff0 --- /dev/null +++ b/src/test/isolation/specs/truncate-conflict.spec @@ -0,0 +1,38 @@ +# Tests for locking conflicts with TRUNCATE commands. + +setup +{ + CREATE ROLE regress_truncate_conflict; + CREATE TABLE truncate_tab (a int); +} + +teardown +{ + DROP TABLE truncate_tab; + DROP ROLE regress_truncate_conflict; +} + +session s1 +step s1_begin { BEGIN; } +step s1_tab_lookup { SELECT count(*) >= 0 FROM truncate_tab; } +step s1_commit { COMMIT; } + +session s2 +step s2_grant { GRANT TRUNCATE ON truncate_tab TO regress_truncate_conflict; } +step s2_auth { SET ROLE regress_truncate_conflict; } +step s2_truncate { TRUNCATE truncate_tab; } +step s2_reset { RESET ROLE; } + +# The role doesn't have privileges to truncate the table, so TRUNCATE should +# immediately fail without waiting for a lock. +permutation s1_begin s1_tab_lookup s2_auth s2_truncate s1_commit s2_reset +permutation s1_begin s2_auth s2_truncate s1_tab_lookup s1_commit s2_reset +permutation s1_begin s2_auth s1_tab_lookup s2_truncate s1_commit s2_reset +permutation s2_auth s2_truncate s1_begin s1_tab_lookup s1_commit s2_reset + +# The role has privileges to truncate the table, TRUNCATE will block if +# another session holds a lock on the table and succeed in all cases. +permutation s1_begin s1_tab_lookup s2_grant s2_auth s2_truncate s1_commit s2_reset +permutation s1_begin s2_grant s2_auth s2_truncate s1_tab_lookup s1_commit s2_reset +permutation s1_begin s2_grant s2_auth s1_tab_lookup s2_truncate s1_commit s2_reset +permutation s2_grant s2_auth s2_truncate s1_begin s1_tab_lookup s1_commit s2_reset diff --git a/src/test/isolation/specs/tuplelock-conflict.spec b/src/test/isolation/specs/tuplelock-conflict.spec new file mode 100644 index 0000000..8558230 --- /dev/null +++ b/src/test/isolation/specs/tuplelock-conflict.spec @@ -0,0 +1,63 @@ +# Here we verify that tuple lock levels conform to their documented +# conflict tables. + +setup { + DROP TABLE IF EXISTS multixact_conflict; + CREATE TABLE multixact_conflict (a int primary key); + INSERT INTO multixact_conflict VALUES (1); +} + +teardown { + DROP TABLE multixact_conflict; +} + +session s1 +step s1_begin { BEGIN; } +step s1_lcksvpt { SELECT * FROM multixact_conflict FOR KEY SHARE; SAVEPOINT foo; } +step s1_tuplock1 { SELECT * FROM multixact_conflict FOR KEY SHARE; } +step s1_tuplock2 { SELECT * FROM multixact_conflict FOR SHARE; } +step s1_tuplock3 { SELECT * FROM multixact_conflict FOR NO KEY UPDATE; } +step s1_tuplock4 { SELECT * FROM multixact_conflict FOR UPDATE; } +step s1_commit { COMMIT; } + +session s2 +step s2_tuplock1 { SELECT * FROM multixact_conflict FOR KEY SHARE; } +step s2_tuplock2 { SELECT * FROM multixact_conflict FOR SHARE; } +step s2_tuplock3 { SELECT * FROM multixact_conflict FOR NO KEY UPDATE; } +step s2_tuplock4 { SELECT * FROM multixact_conflict FOR UPDATE; } + +# The version with savepoints test the multixact cases +permutation s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock1 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock2 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock3 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock1 s2_tuplock4 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock1 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock2 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock3 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock2 s2_tuplock4 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock1 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock2 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock3 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock3 s2_tuplock4 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock1 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock2 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock3 s1_commit +permutation s1_begin s1_lcksvpt s1_tuplock4 s2_tuplock4 s1_commit + +# no multixacts here +permutation s1_begin s1_tuplock1 s2_tuplock1 s1_commit +permutation s1_begin s1_tuplock1 s2_tuplock2 s1_commit +permutation s1_begin s1_tuplock1 s2_tuplock3 s1_commit +permutation s1_begin s1_tuplock1 s2_tuplock4 s1_commit +permutation s1_begin s1_tuplock2 s2_tuplock1 s1_commit +permutation s1_begin s1_tuplock2 s2_tuplock2 s1_commit +permutation s1_begin s1_tuplock2 s2_tuplock3 s1_commit +permutation s1_begin s1_tuplock2 s2_tuplock4 s1_commit +permutation s1_begin s1_tuplock3 s2_tuplock1 s1_commit +permutation s1_begin s1_tuplock3 s2_tuplock2 s1_commit +permutation s1_begin s1_tuplock3 s2_tuplock3 s1_commit +permutation s1_begin s1_tuplock3 s2_tuplock4 s1_commit +permutation s1_begin s1_tuplock4 s2_tuplock1 s1_commit +permutation s1_begin s1_tuplock4 s2_tuplock2 s1_commit +permutation s1_begin s1_tuplock4 s2_tuplock3 s1_commit +permutation s1_begin s1_tuplock4 s2_tuplock4 s1_commit diff --git a/src/test/isolation/specs/tuplelock-partition.spec b/src/test/isolation/specs/tuplelock-partition.spec new file mode 100644 index 0000000..c267b28 --- /dev/null +++ b/src/test/isolation/specs/tuplelock-partition.spec @@ -0,0 +1,32 @@ +# Test tuple locking on INSERT ON CONFLICT UPDATE on a partitioned table. + +setup +{ + DROP TABLE IF EXISTS parttab; + CREATE TABLE parttab (col1 text, key INTEGER PRIMARY KEY, col2 text) PARTITION BY LIST (key); + CREATE TABLE parttab1 (key INTEGER PRIMARY KEY, col1 text, col2 text); + CREATE TABLE parttab2 (key INTEGER PRIMARY KEY, col1 text, col2 text); + ALTER TABLE parttab ATTACH PARTITION parttab1 FOR VALUES IN (1); + ALTER TABLE parttab ATTACH PARTITION parttab2 FOR VALUES IN (2); + INSERT INTO parttab (key, col1, col2) VALUES (1, 'a', 'b'); +} + +teardown +{ + DROP TABLE parttab; +} + +session s1 +step s1b { BEGIN; } +step s1update_nokey { INSERT INTO parttab (key, col1, col2) VALUES (1, 'a', 'b') ON CONFLICT (key) DO UPDATE SET col1 = 'x', col2 = 'y'; } +step s1update_key { INSERT INTO parttab (key, col1, col2) VALUES (1, 'a', 'b') ON CONFLICT (key) DO UPDATE SET key=1; } +step s1c { COMMIT; } + +session s2 +step s2locktuple { SELECT * FROM parttab FOR KEY SHARE; } + +# INSERT ON CONFLICT UPDATE, performs an UPDATE on non-key columns +permutation s1b s1update_nokey s2locktuple s1c + +# INSERT ON CONFLICT UPDATE, performs an UPDATE on key column +permutation s1b s1update_key s2locktuple s1c diff --git a/src/test/isolation/specs/tuplelock-update.spec b/src/test/isolation/specs/tuplelock-update.spec new file mode 100644 index 0000000..4b940bc --- /dev/null +++ b/src/test/isolation/specs/tuplelock-update.spec @@ -0,0 +1,37 @@ +setup { + DROP TABLE IF EXISTS pktab; + CREATE TABLE pktab (id int PRIMARY KEY, data SERIAL NOT NULL); + INSERT INTO pktab VALUES (1, DEFAULT); +} + +teardown { + DROP TABLE pktab; +} + +session s1 +step s1_advlock { + SELECT pg_advisory_lock(142857), + pg_advisory_lock(285714), + pg_advisory_lock(571428); + } +step s1_chain { UPDATE pktab SET data = DEFAULT; } +step s1_begin { BEGIN; } +step s1_grablock { SELECT * FROM pktab FOR KEY SHARE; } +step s1_advunlock1 { SELECT pg_advisory_unlock(142857); } +step s1_advunlock2 { SELECT pg_advisory_unlock(285714); } +step s1_advunlock3 { SELECT pg_advisory_unlock(571428); } +step s1_commit { COMMIT; } + +session s2 +step s2_update { UPDATE pktab SET data = DEFAULT WHERE pg_advisory_lock_shared(142857) IS NOT NULL; } + +session s3 +step s3_update { UPDATE pktab SET data = DEFAULT WHERE pg_advisory_lock_shared(285714) IS NOT NULL; } + +session s4 +step s4_update { UPDATE pktab SET data = DEFAULT WHERE pg_advisory_lock_shared(571428) IS NOT NULL; } + +# We use blocker annotations on the s1_advunlockN steps so that we will not +# move on to the next step until the other session's released step finishes. +# This ensures stable ordering of the test output. +permutation s1_advlock s2_update s3_update s4_update s1_chain s1_begin s1_grablock s1_advunlock1(s2_update) s1_advunlock2(s3_update) s1_advunlock3(s4_update) s1_commit diff --git a/src/test/isolation/specs/tuplelock-upgrade-no-deadlock.spec b/src/test/isolation/specs/tuplelock-upgrade-no-deadlock.spec new file mode 100644 index 0000000..6221a27 --- /dev/null +++ b/src/test/isolation/specs/tuplelock-upgrade-no-deadlock.spec @@ -0,0 +1,69 @@ +# This test checks that multiple sessions locking a single row in a table +# do not deadlock each other when one of them upgrades its existing lock +# while the others are waiting for it. + +setup +{ + drop table if exists tlu_job; + create table tlu_job (id integer primary key, name text); + + insert into tlu_job values(1, 'a'); +} + + +teardown +{ + drop table tlu_job; +} + +session s0 +step s0_begin { begin; } +step s0_keyshare { select id from tlu_job where id = 1 for key share;} +step s0_rollback { rollback; } + +session s1 +setup { begin; } +step s1_keyshare { select id from tlu_job where id = 1 for key share;} +step s1_share { select id from tlu_job where id = 1 for share; } +step s1_fornokeyupd { select id from tlu_job where id = 1 for no key update; } +step s1_update { update tlu_job set name = 'b' where id = 1; } +step s1_savept_e { savepoint s1_e; } +step s1_savept_f { savepoint s1_f; } +step s1_rollback_e { rollback to s1_e; } +step s1_rollback_f { rollback to s1_f; } +step s1_rollback { rollback; } +step s1_commit { commit; } + +session s2 +setup { begin; } +step s2_for_keyshare { select id from tlu_job where id = 1 for key share; } +step s2_fornokeyupd { select id from tlu_job where id = 1 for no key update; } +step s2_for_update { select id from tlu_job where id = 1 for update; } +step s2_update { update tlu_job set name = 'b' where id = 1; } +step s2_delete { delete from tlu_job where id = 1; } +step s2_rollback { rollback; } + +session s3 +setup { begin; } +step s3_keyshare { select id from tlu_job where id = 1 for key share; } +step s3_share { select id from tlu_job where id = 1 for share; } +step s3_for_update { select id from tlu_job where id = 1 for update; } +step s3_update { update tlu_job set name = 'c' where id = 1; } +step s3_delete { delete from tlu_job where id = 1; } +step s3_rollback { rollback; } +step s3_commit { commit; } + +# test that s2 will not deadlock with s3 when s1 is rolled back +permutation s1_share s2_for_update s3_share s3_for_update s1_rollback s3_rollback s2_rollback +# test that update does not cause deadlocks if it can proceed +permutation s1_keyshare s2_for_update s3_keyshare s1_update s3_update s1_rollback s3_rollback s2_rollback +permutation s1_keyshare s2_for_update s3_keyshare s1_update s3_update s1_commit s3_rollback s2_rollback +# test that delete does not cause deadlocks if it can proceed +permutation s1_keyshare s2_for_update s3_keyshare s3_delete s1_rollback s3_rollback s2_rollback +permutation s1_keyshare s2_for_update s3_keyshare s3_delete s1_rollback s3_commit s2_rollback +# test that sessions that don't upgrade locks acquire them in order +permutation s1_share s2_for_update s3_for_update s1_rollback s2_rollback s3_rollback +permutation s1_share s2_update s3_update s1_rollback s2_rollback s3_rollback +permutation s1_share s2_delete s3_delete s1_rollback s2_rollback s3_rollback +# test s2 retrying the overall tuple lock algorithm after initially avoiding deadlock +permutation s1_keyshare s3_for_update s2_for_keyshare s1_savept_e s1_share s1_savept_f s1_fornokeyupd s2_fornokeyupd s0_begin s0_keyshare s1_rollback_f s0_keyshare s1_rollback_e s1_rollback s2_rollback s0_rollback s3_rollback diff --git a/src/test/isolation/specs/two-ids.spec b/src/test/isolation/specs/two-ids.spec new file mode 100644 index 0000000..fc0289f --- /dev/null +++ b/src/test/isolation/specs/two-ids.spec @@ -0,0 +1,40 @@ +# Two IDs test +# +# Small, simple test showing read-only anomalies. +# +# There are only four permutations which must cause a serialization failure. +# Required failure cases are where s2 overlaps both s1 and s3, but s1 +# commits before s3 executes its first SELECT. +# +# If s3 were declared READ ONLY there would be no false positives. +# With s3 defaulting to READ WRITE, we currently expect 12 false +# positives. Further work dealing with de facto READ ONLY transactions +# may be able to reduce or eliminate those false positives. + +setup +{ + create table D1 (id int not null); + create table D2 (id int not null); + insert into D1 values (1); + insert into D2 values (1); +} + +teardown +{ + DROP TABLE D1, D2; +} + +session s1 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step wx1 { update D1 set id = id + 1; } +step c1 { COMMIT; } + +session s2 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step rxwy2 { update D2 set id = (select id+1 from D1); } +step c2 { COMMIT; } + +session s3 +setup { BEGIN ISOLATION LEVEL SERIALIZABLE; } +step ry3 { select id from D2; } +step c3 { COMMIT; } diff --git a/src/test/isolation/specs/update-conflict-out.spec b/src/test/isolation/specs/update-conflict-out.spec new file mode 100644 index 0000000..8aad6aa --- /dev/null +++ b/src/test/isolation/specs/update-conflict-out.spec @@ -0,0 +1,54 @@ +# Test for interactions between SSI's "conflict out" handling for heapam and +# concurrently updated tuple +# +# See bug report: +# https://postgr.es/m/db7b729d-0226-d162-a126-8a8ab2dc4443%40jepsen.io + +setup +{ + CREATE TABLE txn0(id int4 PRIMARY KEY, val TEXT); + CREATE TABLE txn1(id int4 PRIMARY KEY, val TEXT); +} + +teardown +{ + DROP TABLE txn0; + DROP TABLE txn1; +} + +session foo +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } +step foo_select { SELECT * FROM txn0 WHERE id = 42; } +step foo_insert { INSERT INTO txn1 SELECT 7, 'foo_insert'; } +step foo_commit { COMMIT; } + +session bar +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } +step bar_select { SELECT * FROM txn1 WHERE id = 7; } +step bar_insert { INSERT INTO txn0 SELECT 42, 'bar_insert'; } +step bar_commit { COMMIT; } + +# This session creates the conditions that confused bar's "conflict out" +# handling in old releases affected by bug: +session trouble +setup { BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; } +step trouble_update { UPDATE txn1 SET val = 'add physical version for "bar_select"' WHERE id = 7; } +step trouble_delete { DELETE FROM txn1 WHERE id = 7; } +step trouble_abort { ABORT; } + +permutation foo_select + bar_insert + foo_insert foo_commit + trouble_update # Updates tuple... + bar_select # Should observe one distinct XID per version + bar_commit # "bar" should fail here at the latest + trouble_abort + +# Same as above, but "trouble" session DELETEs this time around +permutation foo_select + bar_insert + foo_insert foo_commit + trouble_delete # Deletes tuple... + bar_select # Should observe foo's XID + bar_commit # "bar" should fail here at the latest + trouble_abort diff --git a/src/test/isolation/specs/update-locked-tuple.spec b/src/test/isolation/specs/update-locked-tuple.spec new file mode 100644 index 0000000..0dad792 --- /dev/null +++ b/src/test/isolation/specs/update-locked-tuple.spec @@ -0,0 +1,38 @@ +# Test updating a locked tuple. When the lock doesn't conflict with the +# update, no blocking nor serializability problems should occur. + +setup +{ + DROP TABLE IF EXISTS users, orders; + CREATE TABLE users (id INTEGER PRIMARY KEY, + name varchar, + sometime timestamp); + CREATE TABLE orders (id INTEGER PRIMARY KEY, + name varchar, + user_id INTEGER REFERENCES users (id)); + INSERT INTO users (id, name) VALUES (1, 'olivier'); + INSERT INTO orders (id, name) VALUES (1, 'order of olivier (1)'); +} + +teardown +{ + DROP TABLE users, orders; +} + +session s1 +step s1b { BEGIN ISOLATION LEVEL REPEATABLE READ; } +step s1u1 { UPDATE orders SET name = 'order of olivier (2)', user_id = 1 WHERE id = 1; } +step s1u2 { UPDATE orders SET name = 'order of olivier (3)', user_id = 1 WHERE id = 1; } +step s1c { COMMIT; } + +session s2 +step s2b { BEGIN ISOLATION LEVEL REPEATABLE READ; } +step s2u { UPDATE users SET sometime = '1830-10-04' WHERE id = 1; } +step s2c { COMMIT; } + +permutation s1b s2b s2u s2c s1u1 s1u2 s1c +permutation s1b s2b s2u s1u1 s2c s1u2 s1c +permutation s1b s2b s1u1 s2u s2c s1u2 s1c +permutation s1b s1u1 s2b s2u s2c s1u2 s1c +permutation s1b s1u1 s2b s1u2 s2u s2c s1c +permutation s1b s1u1 s1u2 s2b s2u s2c s1c diff --git a/src/test/isolation/specs/vacuum-concurrent-drop.spec b/src/test/isolation/specs/vacuum-concurrent-drop.spec new file mode 100644 index 0000000..148a2d5 --- /dev/null +++ b/src/test/isolation/specs/vacuum-concurrent-drop.spec @@ -0,0 +1,45 @@ +# Test for log messages emitted by VACUUM and ANALYZE when a specified +# relation is concurrently dropped. +# +# This also verifies that log messages are not emitted for concurrently +# dropped relations that were not specified in the VACUUM or ANALYZE +# command. + +setup +{ + CREATE TABLE parted (a INT) PARTITION BY LIST (a); + CREATE TABLE part1 PARTITION OF parted FOR VALUES IN (1); + CREATE TABLE part2 PARTITION OF parted FOR VALUES IN (2); +} + +teardown +{ + DROP TABLE IF EXISTS parted; +} + +session s1 +step lock +{ + BEGIN; + LOCK part1 IN SHARE MODE; +} +step drop_and_commit +{ + DROP TABLE part2; + COMMIT; +} + +session s2 +step vac_specified { VACUUM part1, part2; } +step vac_all_parts { VACUUM parted; } +step analyze_specified { ANALYZE part1, part2; } +step analyze_all_parts { ANALYZE parted; } +step vac_analyze_specified { VACUUM ANALYZE part1, part2; } +step vac_analyze_all_parts { VACUUM ANALYZE parted; } + +permutation lock vac_specified drop_and_commit +permutation lock vac_all_parts drop_and_commit +permutation lock analyze_specified drop_and_commit +permutation lock analyze_all_parts drop_and_commit +permutation lock vac_analyze_specified drop_and_commit +permutation lock vac_analyze_all_parts drop_and_commit diff --git a/src/test/isolation/specs/vacuum-conflict.spec b/src/test/isolation/specs/vacuum-conflict.spec new file mode 100644 index 0000000..3cb8926 --- /dev/null +++ b/src/test/isolation/specs/vacuum-conflict.spec @@ -0,0 +1,51 @@ +# Tests for locking conflicts with VACUUM and ANALYZE commands. + +setup +{ + CREATE ROLE regress_vacuum_conflict; + CREATE TABLE vacuum_tab (a int); +} + +teardown +{ + DROP TABLE vacuum_tab; + DROP ROLE regress_vacuum_conflict; +} + +session s1 +step s1_begin { BEGIN; } +step s1_lock { LOCK vacuum_tab IN SHARE UPDATE EXCLUSIVE MODE; } +step s1_commit { COMMIT; } + +session s2 +step s2_grant { ALTER TABLE vacuum_tab OWNER TO regress_vacuum_conflict; } +step s2_auth { SET ROLE regress_vacuum_conflict; } +step s2_vacuum { VACUUM vacuum_tab; } +step s2_analyze { ANALYZE vacuum_tab; } +step s2_reset { RESET ROLE; } + +# The role doesn't have privileges to vacuum the table, so VACUUM should +# immediately skip the table without waiting for a lock. +permutation s1_begin s1_lock s2_auth s2_vacuum s1_commit s2_reset +permutation s1_begin s2_auth s2_vacuum s1_lock s1_commit s2_reset +permutation s1_begin s2_auth s1_lock s2_vacuum s1_commit s2_reset +permutation s2_auth s2_vacuum s1_begin s1_lock s1_commit s2_reset + +# Same as previously for ANALYZE +permutation s1_begin s1_lock s2_auth s2_analyze s1_commit s2_reset +permutation s1_begin s2_auth s2_analyze s1_lock s1_commit s2_reset +permutation s1_begin s2_auth s1_lock s2_analyze s1_commit s2_reset +permutation s2_auth s2_analyze s1_begin s1_lock s1_commit s2_reset + +# The role has privileges to vacuum the table, VACUUM will block if +# another session holds a lock on the table and succeed in all cases. +permutation s1_begin s2_grant s1_lock s2_auth s2_vacuum s1_commit s2_reset +permutation s1_begin s2_grant s2_auth s2_vacuum s1_lock s1_commit s2_reset +permutation s1_begin s2_grant s2_auth s1_lock s2_vacuum s1_commit s2_reset +permutation s2_grant s2_auth s2_vacuum s1_begin s1_lock s1_commit s2_reset + +# Same as previously for ANALYZE +permutation s1_begin s2_grant s1_lock s2_auth s2_analyze s1_commit s2_reset +permutation s1_begin s2_grant s2_auth s2_analyze s1_lock s1_commit s2_reset +permutation s1_begin s2_grant s2_auth s1_lock s2_analyze s1_commit s2_reset +permutation s2_grant s2_auth s2_analyze s1_begin s1_lock s1_commit s2_reset diff --git a/src/test/isolation/specs/vacuum-reltuples.spec b/src/test/isolation/specs/vacuum-reltuples.spec new file mode 100644 index 0000000..ae2f79b --- /dev/null +++ b/src/test/isolation/specs/vacuum-reltuples.spec @@ -0,0 +1,48 @@ +# Test for vacuum's handling of reltuples when pages are skipped due +# to page pins. We absolutely need to avoid setting reltuples=0 in +# such cases, since that interferes badly with planning. +# +# Expected result in second permutation is 20 tuples rather than 21 as +# for the others, because vacuum should leave the previous result +# (from before the insert) in place. + +setup { + create table smalltbl + as select i as id from generate_series(1,20) i; + alter table smalltbl set (autovacuum_enabled = off); +} +setup { + vacuum analyze smalltbl; +} + +teardown { + drop table smalltbl; +} + +session worker +step open { + begin; + declare c1 cursor for select 1 as dummy from smalltbl; +} +step fetch1 { + fetch next from c1; +} +step close { + commit; +} +step stats { + select relpages, reltuples from pg_class + where oid='smalltbl'::regclass; +} + +session vacuumer +step vac { + vacuum smalltbl; +} +step modify { + insert into smalltbl select max(id)+1 from smalltbl; +} + +permutation modify vac stats +permutation modify open fetch1 vac close stats +permutation modify vac stats diff --git a/src/test/isolation/specs/vacuum-skip-locked.spec b/src/test/isolation/specs/vacuum-skip-locked.spec new file mode 100644 index 0000000..3fad6e1 --- /dev/null +++ b/src/test/isolation/specs/vacuum-skip-locked.spec @@ -0,0 +1,61 @@ +# Test for SKIP_LOCKED option of VACUUM and ANALYZE commands. +# +# This also verifies that log messages are not emitted for skipped relations +# that were not specified in the VACUUM or ANALYZE command. + +setup +{ + CREATE TABLE parted (a INT) PARTITION BY LIST (a); + CREATE TABLE part1 PARTITION OF parted FOR VALUES IN (1); + ALTER TABLE part1 SET (autovacuum_enabled = false); + CREATE TABLE part2 PARTITION OF parted FOR VALUES IN (2); + ALTER TABLE part2 SET (autovacuum_enabled = false); +} + +teardown +{ + DROP TABLE IF EXISTS parted; +} + +session s1 +step lock_share +{ + BEGIN; + LOCK part1 IN SHARE MODE; +} +step lock_access_exclusive +{ + BEGIN; + LOCK part1 IN ACCESS EXCLUSIVE MODE; +} +step commit +{ + COMMIT; +} + +session s2 +step vac_specified { VACUUM (SKIP_LOCKED) part1, part2; } +step vac_all_parts { VACUUM (SKIP_LOCKED) parted; } +step analyze_specified { ANALYZE (SKIP_LOCKED) part1, part2; } +step analyze_all_parts { ANALYZE (SKIP_LOCKED) parted; } +step vac_analyze_specified { VACUUM (ANALYZE, SKIP_LOCKED) part1, part2; } +step vac_analyze_all_parts { VACUUM (ANALYZE, SKIP_LOCKED) parted; } +step vac_full_specified { VACUUM (SKIP_LOCKED, FULL) part1, part2; } +step vac_full_all_parts { VACUUM (SKIP_LOCKED, FULL) parted; } + +permutation lock_share vac_specified commit +permutation lock_share vac_all_parts commit +permutation lock_share analyze_specified commit +permutation lock_share analyze_all_parts commit +permutation lock_share vac_analyze_specified commit +permutation lock_share vac_analyze_all_parts commit +permutation lock_share vac_full_specified commit +permutation lock_share vac_full_all_parts commit +permutation lock_access_exclusive vac_specified commit +permutation lock_access_exclusive vac_all_parts commit +permutation lock_access_exclusive analyze_specified commit +permutation lock_access_exclusive analyze_all_parts commit +permutation lock_access_exclusive vac_analyze_specified commit +permutation lock_access_exclusive vac_analyze_all_parts commit +permutation lock_access_exclusive vac_full_specified commit +permutation lock_access_exclusive vac_full_all_parts commit diff --git a/src/test/isolation/specscanner.c b/src/test/isolation/specscanner.c new file mode 100644 index 0000000..be0d369 --- /dev/null +++ b/src/test/isolation/specscanner.c @@ -0,0 +1,2220 @@ +#line 2 "specscanner.c" + +#line 4 "specscanner.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer spec_yy_create_buffer +#define yy_delete_buffer spec_yy_delete_buffer +#define yy_scan_buffer spec_yy_scan_buffer +#define yy_scan_string spec_yy_scan_string +#define yy_scan_bytes spec_yy_scan_bytes +#define yy_init_buffer spec_yy_init_buffer +#define yy_flush_buffer spec_yy_flush_buffer +#define yy_load_buffer_state spec_yy_load_buffer_state +#define yy_switch_to_buffer spec_yy_switch_to_buffer +#define yypush_buffer_state spec_yypush_buffer_state +#define yypop_buffer_state spec_yypop_buffer_state +#define yyensure_buffer_stack spec_yyensure_buffer_stack +#define yy_flex_debug spec_yy_flex_debug +#define yyin spec_yyin +#define yyleng spec_yyleng +#define yylex spec_yylex +#define yylineno spec_yylineno +#define yyout spec_yyout +#define yyrestart spec_yyrestart +#define yytext spec_yytext +#define yywrap spec_yywrap +#define yyalloc spec_yyalloc +#define yyrealloc spec_yyrealloc +#define yyfree spec_yyfree + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +#ifdef yy_create_buffer +#define spec_yy_create_buffer_ALREADY_DEFINED +#else +#define yy_create_buffer spec_yy_create_buffer +#endif + +#ifdef yy_delete_buffer +#define spec_yy_delete_buffer_ALREADY_DEFINED +#else +#define yy_delete_buffer spec_yy_delete_buffer +#endif + +#ifdef yy_scan_buffer +#define spec_yy_scan_buffer_ALREADY_DEFINED +#else +#define yy_scan_buffer spec_yy_scan_buffer +#endif + +#ifdef yy_scan_string +#define spec_yy_scan_string_ALREADY_DEFINED +#else +#define yy_scan_string spec_yy_scan_string +#endif + +#ifdef yy_scan_bytes +#define spec_yy_scan_bytes_ALREADY_DEFINED +#else +#define yy_scan_bytes spec_yy_scan_bytes +#endif + +#ifdef yy_init_buffer +#define spec_yy_init_buffer_ALREADY_DEFINED +#else +#define yy_init_buffer spec_yy_init_buffer +#endif + +#ifdef yy_flush_buffer +#define spec_yy_flush_buffer_ALREADY_DEFINED +#else +#define yy_flush_buffer spec_yy_flush_buffer +#endif + +#ifdef yy_load_buffer_state +#define spec_yy_load_buffer_state_ALREADY_DEFINED +#else +#define yy_load_buffer_state spec_yy_load_buffer_state +#endif + +#ifdef yy_switch_to_buffer +#define spec_yy_switch_to_buffer_ALREADY_DEFINED +#else +#define yy_switch_to_buffer spec_yy_switch_to_buffer +#endif + +#ifdef yypush_buffer_state +#define spec_yypush_buffer_state_ALREADY_DEFINED +#else +#define yypush_buffer_state spec_yypush_buffer_state +#endif + +#ifdef yypop_buffer_state +#define spec_yypop_buffer_state_ALREADY_DEFINED +#else +#define yypop_buffer_state spec_yypop_buffer_state +#endif + +#ifdef yyensure_buffer_stack +#define spec_yyensure_buffer_stack_ALREADY_DEFINED +#else +#define yyensure_buffer_stack spec_yyensure_buffer_stack +#endif + +#ifdef yylex +#define spec_yylex_ALREADY_DEFINED +#else +#define yylex spec_yylex +#endif + +#ifdef yyrestart +#define spec_yyrestart_ALREADY_DEFINED +#else +#define yyrestart spec_yyrestart +#endif + +#ifdef yylex_init +#define spec_yylex_init_ALREADY_DEFINED +#else +#define yylex_init spec_yylex_init +#endif + +#ifdef yylex_init_extra +#define spec_yylex_init_extra_ALREADY_DEFINED +#else +#define yylex_init_extra spec_yylex_init_extra +#endif + +#ifdef yylex_destroy +#define spec_yylex_destroy_ALREADY_DEFINED +#else +#define yylex_destroy spec_yylex_destroy +#endif + +#ifdef yyget_debug +#define spec_yyget_debug_ALREADY_DEFINED +#else +#define yyget_debug spec_yyget_debug +#endif + +#ifdef yyset_debug +#define spec_yyset_debug_ALREADY_DEFINED +#else +#define yyset_debug spec_yyset_debug +#endif + +#ifdef yyget_extra +#define spec_yyget_extra_ALREADY_DEFINED +#else +#define yyget_extra spec_yyget_extra +#endif + +#ifdef yyset_extra +#define spec_yyset_extra_ALREADY_DEFINED +#else +#define yyset_extra spec_yyset_extra +#endif + +#ifdef yyget_in +#define spec_yyget_in_ALREADY_DEFINED +#else +#define yyget_in spec_yyget_in +#endif + +#ifdef yyset_in +#define spec_yyset_in_ALREADY_DEFINED +#else +#define yyset_in spec_yyset_in +#endif + +#ifdef yyget_out +#define spec_yyget_out_ALREADY_DEFINED +#else +#define yyget_out spec_yyget_out +#endif + +#ifdef yyset_out +#define spec_yyset_out_ALREADY_DEFINED +#else +#define yyset_out spec_yyset_out +#endif + +#ifdef yyget_leng +#define spec_yyget_leng_ALREADY_DEFINED +#else +#define yyget_leng spec_yyget_leng +#endif + +#ifdef yyget_text +#define spec_yyget_text_ALREADY_DEFINED +#else +#define yyget_text spec_yyget_text +#endif + +#ifdef yyget_lineno +#define spec_yyget_lineno_ALREADY_DEFINED +#else +#define yyget_lineno spec_yyget_lineno +#endif + +#ifdef yyset_lineno +#define spec_yyset_lineno_ALREADY_DEFINED +#else +#define yyset_lineno spec_yyset_lineno +#endif + +#ifdef yywrap +#define spec_yywrap_ALREADY_DEFINED +#else +#define yywrap spec_yywrap +#endif + +#ifdef yyalloc +#define spec_yyalloc_ALREADY_DEFINED +#else +#define yyalloc spec_yyalloc +#endif + +#ifdef yyrealloc +#define spec_yyrealloc_ALREADY_DEFINED +#else +#define yyrealloc spec_yyrealloc +#endif + +#ifdef yyfree +#define spec_yyfree_ALREADY_DEFINED +#else +#define yyfree spec_yyfree +#endif + +#ifdef yytext +#define spec_yytext_ALREADY_DEFINED +#else +#define yytext spec_yytext +#endif + +#ifdef yyleng +#define spec_yyleng_ALREADY_DEFINED +#else +#define yyleng spec_yyleng +#endif + +#ifdef yyin +#define spec_yyin_ALREADY_DEFINED +#else +#define yyin spec_yyin +#endif + +#ifdef yyout +#define spec_yyout_ALREADY_DEFINED +#else +#define yyout spec_yyout +#endif + +#ifdef yy_flex_debug +#define spec_yy_flex_debug_ALREADY_DEFINED +#else +#define yy_flex_debug spec_yy_flex_debug +#endif + +#ifdef yylineno +#define spec_yylineno_ALREADY_DEFINED +#else +#define yylineno spec_yylineno +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <stdlib.h> + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include <inttypes.h> +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* begin standard C++ headers. */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. + */ +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern int yyleng; + +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = NULL; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); + +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); + +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); + +#define yy_new_buffer yy_create_buffer +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define spec_yywrap() (/*CONSTCOND*/1) +#define YY_SKIP_YYWRAP +typedef flex_uint8_t YY_CHAR; + +FILE *yyin = NULL, *yyout = NULL; + +typedef int yy_state_type; + +extern int yylineno; +int yylineno = 1; + +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state ( void ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); +static int yy_get_next_buffer ( void ); +static void yynoreturn yy_fatal_error ( const char* msg ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; +#define YY_NUM_RULES 23 +#define YY_END_OF_BUFFER 24 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[71] = + { 0, + 0, 0, 0, 0, 0, 0, 24, 22, 9, 7, + 11, 8, 21, 20, 10, 10, 10, 10, 10, 16, + 18, 18, 19, 17, 14, 15, 13, 8, 20, 10, + 10, 10, 10, 10, 10, 16, 0, 17, 12, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 5, + 10, 10, 10, 10, 4, 10, 10, 10, 10, 10, + 1, 10, 3, 10, 10, 6, 10, 10, 2, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 2, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 5, 6, 7, 1, 1, 1, 8, + 8, 8, 1, 8, 1, 1, 1, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 1, 1, 1, + 1, 1, 1, 1, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 1, 1, 1, 1, 10, 1, 11, 10, 12, 13, + + 14, 10, 10, 10, 15, 10, 10, 10, 16, 17, + 18, 19, 10, 20, 21, 22, 23, 10, 24, 10, + 10, 10, 25, 1, 26, 1, 1, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10 + } ; + +static const YY_CHAR yy_meta[27] = + { 0, + 1, 1, 2, 2, 1, 1, 3, 1, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 1, 1 + } ; + +static const flex_int16_t yy_base[75] = + { 0, + 0, 0, 25, 50, 27, 28, 96, 97, 97, 97, + 97, 0, 97, 86, 0, 76, 79, 20, 78, 33, + 97, 34, 97, 97, 97, 97, 86, 0, 81, 0, + 67, 68, 18, 73, 75, 39, 42, 97, 97, 69, + 59, 53, 50, 53, 51, 58, 46, 52, 47, 0, + 52, 50, 41, 44, 0, 43, 38, 47, 40, 32, + 0, 33, 0, 33, 34, 0, 30, 30, 0, 97, + 76, 79, 82, 42 + } ; + +static const flex_int16_t yy_def[75] = + { 0, + 70, 1, 71, 71, 72, 72, 70, 70, 70, 70, + 70, 73, 70, 70, 74, 74, 74, 74, 74, 70, + 70, 70, 70, 70, 70, 70, 70, 73, 70, 74, + 74, 74, 74, 74, 74, 70, 70, 70, 70, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 0, + 70, 70, 70, 70 + } ; + +static const flex_int16_t yy_nxt[124] = + { 0, + 8, 9, 10, 9, 11, 12, 8, 13, 14, 15, + 15, 15, 15, 15, 15, 15, 16, 15, 17, 15, + 18, 19, 15, 15, 20, 8, 22, 23, 22, 26, + 26, 27, 27, 33, 36, 37, 36, 37, 42, 43, + 36, 34, 36, 37, 30, 37, 69, 68, 67, 66, + 24, 22, 23, 22, 65, 64, 63, 62, 61, 38, + 60, 59, 58, 57, 56, 55, 54, 38, 53, 52, + 51, 50, 49, 48, 47, 24, 21, 21, 21, 25, + 25, 25, 28, 46, 28, 45, 44, 41, 40, 29, + 39, 35, 32, 31, 29, 70, 7, 70, 70, 70, + + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70 + } ; + +static const flex_int16_t yy_chk[124] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, + 6, 5, 6, 18, 20, 22, 20, 22, 33, 33, + 36, 18, 36, 37, 74, 37, 68, 67, 65, 64, + 3, 4, 4, 4, 62, 60, 59, 58, 57, 22, + 56, 54, 53, 52, 51, 49, 48, 37, 47, 46, + 45, 44, 43, 42, 41, 4, 71, 71, 71, 72, + 72, 72, 73, 40, 73, 35, 34, 32, 31, 29, + 27, 19, 17, 16, 14, 7, 70, 70, 70, 70, + + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int yy_flex_debug; +int yy_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "specscanner.l" +#line 2 "specscanner.l" +/*------------------------------------------------------------------------- + * + * specscanner.l + * a lexical scanner for an isolation test specification + * + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + *------------------------------------------------------------------------- + */ + +static int yyline = 1; /* line number for error reporting */ + +#define LITBUF_INIT 1024 /* initial size of litbuf */ +static char *litbuf = NULL; +static size_t litbufsize = 0; +static size_t litbufpos = 0; + +static void addlitchar(char c); + +/* LCOV_EXCL_START */ + +#line 775 "specscanner.c" +#define YY_NO_INPUT 1 + +#line 778 "specscanner.c" + +#define INITIAL 0 +#define sql 1 +#define qident 2 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include <unistd.h> +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals ( void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy ( void ); + +int yyget_debug ( void ); + +void yyset_debug ( int debug_flag ); + +YY_EXTRA_TYPE yyget_extra ( void ); + +void yyset_extra ( YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in ( void ); + +void yyset_in ( FILE * _in_str ); + +FILE *yyget_out ( void ); + +void yyset_out ( FILE * _out_str ); + + int yyget_leng ( void ); + +char *yyget_text ( void ); + +int yyget_lineno ( void ); + +void yyset_lineno ( int _line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap ( void ); +#else +extern int yywrap ( void ); +#endif +#endif + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy ( char *, const char *, int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen ( const char * ); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput ( void ); +#else +static int input ( void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { +#line 52 "specscanner.l" + + + +#line 56 "specscanner.l" + /* Allocate litbuf in first call of yylex() */ + if (litbuf == NULL) + { + litbuf = pg_malloc(LITBUF_INIT); + litbufsize = LITBUF_INIT; + } + + + /* Keywords (must appear before the {identifier} rule!) */ +#line 1009 "specscanner.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 71 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_current_state != 70 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 65 "specscanner.l" +{ return NOTICES; } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 66 "specscanner.l" +{ return PERMUTATION; } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 67 "specscanner.l" +{ return SESSION; } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 68 "specscanner.l" +{ return SETUP; } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 69 "specscanner.l" +{ return STEP; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 70 "specscanner.l" +{ return TEARDOWN; } + YY_BREAK +/* Whitespace and comments */ +case 7: +/* rule 7 can match eol */ +YY_RULE_SETUP +#line 73 "specscanner.l" +{ yyline++; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 74 "specscanner.l" +{ /* ignore */ } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 75 "specscanner.l" +{ /* ignore */ } + YY_BREAK +/* Plain identifiers */ +case 10: +YY_RULE_SETUP +#line 78 "specscanner.l" +{ + yylval.str = pg_strdup(yytext); + return(identifier); + } + YY_BREAK +/* Quoted identifiers: "foo" */ +case 11: +YY_RULE_SETUP +#line 84 "specscanner.l" +{ + litbufpos = 0; + BEGIN(qident); + } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 88 "specscanner.l" +{ addlitchar(yytext[0]); } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 89 "specscanner.l" +{ + litbuf[litbufpos] = '\0'; + yylval.str = pg_strdup(litbuf); + BEGIN(INITIAL); + return(identifier); + } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 95 "specscanner.l" +{ addlitchar(yytext[0]); } + YY_BREAK +case 15: +/* rule 15 can match eol */ +YY_RULE_SETUP +#line 96 "specscanner.l" +{ yyerror("unexpected newline in quoted identifier"); } + YY_BREAK +case YY_STATE_EOF(qident): +#line 97 "specscanner.l" +{ yyerror("unterminated quoted identifier"); } + YY_BREAK +/* SQL blocks: { UPDATE ... } */ +/* We trim leading/trailing whitespace, otherwise they're unprocessed */ +case 16: +YY_RULE_SETUP +#line 101 "specscanner.l" +{ + + litbufpos = 0; + BEGIN(sql); + } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 106 "specscanner.l" +{ + litbuf[litbufpos] = '\0'; + yylval.str = pg_strdup(litbuf); + BEGIN(INITIAL); + return(sqlblock); + } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 112 "specscanner.l" +{ + addlitchar(yytext[0]); + } + YY_BREAK +case 19: +/* rule 19 can match eol */ +YY_RULE_SETUP +#line 115 "specscanner.l" +{ + yyline++; + addlitchar(yytext[0]); + } + YY_BREAK +case YY_STATE_EOF(sql): +#line 119 "specscanner.l" +{ + yyerror("unterminated sql block"); + } + YY_BREAK +/* Numbers and punctuation */ +case 20: +YY_RULE_SETUP +#line 124 "specscanner.l" +{ + yylval.integer = atoi(yytext); + return INTEGER; + } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 129 "specscanner.l" +{ return yytext[0]; } + YY_BREAK +/* Anything else is an error */ +case 22: +YY_RULE_SETUP +#line 132 "specscanner.l" +{ + fprintf(stderr, "syntax error at line %d: unexpected character \"%s\"\n", yyline, yytext); + exit(1); + } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 136 "specscanner.l" +YY_FATAL_ERROR( "flex scanner jammed" ); + YY_BREAK +#line 1228 "specscanner.c" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 71 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 71 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 70); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); + + yyfree( (void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return NULL; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = NULL; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (const char * yystr ) +{ + + return yy_scan_bytes( yystr, (int) strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yynoreturn yy_fatal_error (const char* msg ) +{ + fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** Set the current line number. + * @param _line_number line number + * + */ +void yyset_lineno (int _line_number ) +{ + + yylineno = _line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param _in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * _in_str ) +{ + yyin = _in_str ; +} + +void yyset_out (FILE * _out_str ) +{ + yyout = _out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int _bdebug ) +{ + yy_flex_debug = _bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = NULL; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = NULL; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = NULL; + yyout = NULL; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer( YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 136 "specscanner.l" + + +/* LCOV_EXCL_STOP */ + +static void +addlitchar(char c) +{ + /* We must always leave room to add a trailing \0 */ + if (litbufpos >= litbufsize - 1) + { + /* Double the size of litbuf if it gets full */ + litbufsize += litbufsize; + litbuf = pg_realloc(litbuf, litbufsize); + } + litbuf[litbufpos++] = c; +} + +void +yyerror(const char *message) +{ + fprintf(stderr, "%s at line %d\n", message, yyline); + exit(1); +} + diff --git a/src/test/isolation/specscanner.l b/src/test/isolation/specscanner.l new file mode 100644 index 0000000..d9fa6a5 --- /dev/null +++ b/src/test/isolation/specscanner.l @@ -0,0 +1,157 @@ +%{ +/*------------------------------------------------------------------------- + * + * specscanner.l + * a lexical scanner for an isolation test specification + * + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + *------------------------------------------------------------------------- + */ + +static int yyline = 1; /* line number for error reporting */ + +#define LITBUF_INIT 1024 /* initial size of litbuf */ +static char *litbuf = NULL; +static size_t litbufsize = 0; +static size_t litbufpos = 0; + +static void addlitchar(char c); + +/* LCOV_EXCL_START */ + +%} + +%option 8bit +%option never-interactive +%option nodefault +%option noinput +%option nounput +%option noyywrap +%option warn +%option prefix="spec_yy" + + +%x sql +%x qident + +non_newline [^\n\r] +space [ \t\r\f] + +comment ("#"{non_newline}*) + +digit [0-9] +ident_start [A-Za-z\200-\377_] +ident_cont [A-Za-z\200-\377_0-9\$] + +identifier {ident_start}{ident_cont}* + +self [,()*] + +%% + +%{ + /* Allocate litbuf in first call of yylex() */ + if (litbuf == NULL) + { + litbuf = pg_malloc(LITBUF_INIT); + litbufsize = LITBUF_INIT; + } +%} + + /* Keywords (must appear before the {identifier} rule!) */ +notices { return NOTICES; } +permutation { return PERMUTATION; } +session { return SESSION; } +setup { return SETUP; } +step { return STEP; } +teardown { return TEARDOWN; } + + /* Whitespace and comments */ +[\n] { yyline++; } +{comment} { /* ignore */ } +{space} { /* ignore */ } + + /* Plain identifiers */ +{identifier} { + yylval.str = pg_strdup(yytext); + return(identifier); + } + + /* Quoted identifiers: "foo" */ +\" { + litbufpos = 0; + BEGIN(qident); + } +<qident>\"\" { addlitchar(yytext[0]); } +<qident>\" { + litbuf[litbufpos] = '\0'; + yylval.str = pg_strdup(litbuf); + BEGIN(INITIAL); + return(identifier); + } +<qident>. { addlitchar(yytext[0]); } +<qident>\n { yyerror("unexpected newline in quoted identifier"); } +<qident><<EOF>> { yyerror("unterminated quoted identifier"); } + + /* SQL blocks: { UPDATE ... } */ + /* We trim leading/trailing whitespace, otherwise they're unprocessed */ +"{"{space}* { + + litbufpos = 0; + BEGIN(sql); + } +<sql>{space}*"}" { + litbuf[litbufpos] = '\0'; + yylval.str = pg_strdup(litbuf); + BEGIN(INITIAL); + return(sqlblock); + } +<sql>. { + addlitchar(yytext[0]); + } +<sql>\n { + yyline++; + addlitchar(yytext[0]); + } +<sql><<EOF>> { + yyerror("unterminated sql block"); + } + + /* Numbers and punctuation */ +{digit}+ { + yylval.integer = atoi(yytext); + return INTEGER; + } + +{self} { return yytext[0]; } + + /* Anything else is an error */ +. { + fprintf(stderr, "syntax error at line %d: unexpected character \"%s\"\n", yyline, yytext); + exit(1); + } +%% + +/* LCOV_EXCL_STOP */ + +static void +addlitchar(char c) +{ + /* We must always leave room to add a trailing \0 */ + if (litbufpos >= litbufsize - 1) + { + /* Double the size of litbuf if it gets full */ + litbufsize += litbufsize; + litbuf = pg_realloc(litbuf, litbufsize); + } + litbuf[litbufpos++] = c; +} + +void +yyerror(const char *message) +{ + fprintf(stderr, "%s at line %d\n", message, yyline); + exit(1); +} |