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
..
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-01-07 19:04:57 -05:00
2022-02-03 14:05:02 -05:00

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.