postgresql/contrib/test_decoding
Tomas Vondra b779d7d8fd Fix skip-empty-xacts with sequences in test_decoding
Regression tests need to use skip-empty-xacts = false, because there
might be accidental concurrent activity (like autovacuum), particularly
on slow machines. The tests added by 80901b3291 failed to do that in a
couple places, triggering occasional failures on buildfarm.

Fixing the tests however uncovered a bug in the code, because sequence
callbacks did not handle skip-empty-xacts properly. For trasactional
increments we need to check/update the xact_wrote_changes flag, and emit
the BEGIN if it's the first change in the transaction.

Reported-by: Andres Freund
Discussion: https://postgr.es/m/20220212220413.b25amklo7t4xb7ni%40alap3.anarazel.de
2022-02-12 23:50:42 +01:00
..
expected Fix skip-empty-xacts with sequences in test_decoding 2022-02-12 23:50:42 +01:00
specs Add decoding of sequences to test_decoding 2022-02-12 00:51:46 +01:00
sql Fix skip-empty-xacts with sequences in test_decoding 2022-02-12 23:50:42 +01:00
t Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
.gitignore Improve isolation tests infrastructure. 2017-03-14 15:56:17 -07:00
Makefile Add decoding of sequences to test_decoding 2022-02-12 00:51:46 +01:00
logical.conf Add logical_decoding_work_mem to limit ReorderBuffer memory usage. 2019-11-19 07:32:36 +05:30
test_decoding.c Fix skip-empty-xacts with sequences in test_decoding 2022-02-12 23:50:42 +01:00