]> granicus.if.org Git - postgresql/commit
Change the default value of max_prepared_transactions to zero, and add
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 23 Apr 2009 00:23:46 +0000 (00:23 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 23 Apr 2009 00:23:46 +0000 (00:23 +0000)
commit8d4f2ecd41312e57422901952cbad234d293060b
treef3345b5dcf1c8980bfe59da77186b332500ff064
parentbae8102f52863bdb29b5c5e1ee7e27a8b0f5b9c7
Change the default value of max_prepared_transactions to zero, and add
documentation warnings against setting it nonzero unless active use of
prepared transactions is intended and a suitable transaction manager has been
installed.  This should help to prevent the type of scenario we've seen
several times now where a prepared transaction is forgotten and eventually
causes severe maintenance problems (or even anti-wraparound shutdown).

The only real reason we had the default be nonzero in the first place was to
support regression testing of the feature.  To still be able to do that,
tweak pg_regress to force a nonzero value during "make check".  Since we
cannot force a nonzero value in "make installcheck", add a variant regression
test "expected" file that shows the results that will be obtained when
max_prepared_transactions is zero.

Also, extend the HINT messages for transaction wraparound warnings to mention
the possibility that old prepared transactions are causing the problem.

All per today's discussion.
doc/src/sgml/config.sgml
doc/src/sgml/ref/prepare_transaction.sgml
src/backend/access/transam/twophase.c
src/backend/access/transam/varsup.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/test/regress/expected/prepared_xacts.out
src/test/regress/expected/prepared_xacts_1.out [new file with mode: 0644]
src/test/regress/pg_regress.c
src/test/regress/sql/prepared_xacts.sql