Hackers,

I stumbled upon an assertion while testing master for possible
bugs.  I am reporting it here in the hope that this report will
be useful.  The attached small regression test patch consistently
triggers an assert in predicate.c:

TRAP: FailedAssertion("!isCommit || SxactIsPrepared(MySerializableXact)", File: "predicate.c", Line: 3372)

I originally hit this from sources with less than recent
code checked out, but the error is the same in a recent,
fresh `git clone` (4a0aab14dcb35550b55e623a3c194442c5666084)
The problem does not reproduce for me in REL_12_STABLE, though the
same assertion does exist in that branch.

I built on my laptop:

Linux 4.19.0-5-amd64 #1 SMP Debian 4.19.37-3 (2019-05-15) x86_64 GNU/Linux

I built using

`./configure --enable-cassert --enable-tap-tests --with-perl --with-python --with-tcl`

The perl, python, and tcl options don't appear to matter, as nothing
changes using

  `./configure --enable-cassert && make -j4 && make check-world`

--
Mark Dilger
diff --git a/src/test/regress/expected/nonsense.out 
b/src/test/regress/expected/nonsense.out
new file mode 100644
index 0000000000..5537473a0b
--- /dev/null
+++ b/src/test/regress/expected/nonsense.out
@@ -0,0 +1,4 @@
+SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE NOT DEFERRABLE , 
DEFERRABLE , DEFERRABLE READ WRITE , READ ONLY , ISOLATION LEVEL SERIALIZABLE;
+SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE READ WRITE , NOT 
DEFERRABLE , DEFERRABLE READ WRITE , DEFERRABLE;
+NOTIFY pig ;
+LISTEN mouse;
diff --git a/src/test/regress/parallel_schedule 
b/src/test/regress/parallel_schedule
index d33a4e143d..0a47f299bf 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -121,3 +121,5 @@ test: fast_default
 
 # run stats by itself because its delay may be insufficient under heavy load
 test: stats
+
+test: nonsense
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index f86f5c5682..3cfebd7842 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -196,3 +196,4 @@ test: tuplesort
 test: event_trigger
 test: fast_default
 test: stats
+test: nonsense
diff --git a/src/test/regress/sql/nonsense.sql 
b/src/test/regress/sql/nonsense.sql
new file mode 100644
index 0000000000..5537473a0b
--- /dev/null
+++ b/src/test/regress/sql/nonsense.sql
@@ -0,0 +1,4 @@
+SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE NOT DEFERRABLE , 
DEFERRABLE , DEFERRABLE READ WRITE , READ ONLY , ISOLATION LEVEL SERIALIZABLE;
+SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE READ WRITE , NOT 
DEFERRABLE , DEFERRABLE READ WRITE , DEFERRABLE;
+NOTIFY pig ;
+LISTEN mouse;

Reply via email to