mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 13:51:21 +02:00
Enable archiving in recovery TAP test 009_twophase.pl
This is a follow-up of f663b00
, that has been committed to v13 and v14,
tweaking the TAP test for two-phase transactions so as it provides
coverage for the bug that has been fixed. This change is done in its
own commit for clarity, as v15 and HEAD did not show the problematic
behavior, still missed coverage for it.
While on it, this adds a comment about the dependency of the last
partial segment rename and RecoverPreparedTransactions() at the end of
recovery, as that can be easy to miss.
Author: Michael Paquier
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/743b9b45a2d4013bd90b6a5cba8d6faeb717ee34.camel@cybertec.at
Backpatch-through: 13
This commit is contained in:
parent
0d369ac650
commit
68cb5af46c
@ -5689,7 +5689,11 @@ StartupXLOG(void)
|
|||||||
TrimCLOG();
|
TrimCLOG();
|
||||||
TrimMultiXact();
|
TrimMultiXact();
|
||||||
|
|
||||||
/* Reload shared-memory state for prepared transactions */
|
/*
|
||||||
|
* Reload shared-memory state for prepared transactions. This needs to
|
||||||
|
* happen before renaming the last partial segment of the old timeline as
|
||||||
|
* it may be possible that we have to recovery some transactions from it.
|
||||||
|
*/
|
||||||
RecoverPreparedTransactions();
|
RecoverPreparedTransactions();
|
||||||
|
|
||||||
/* Shut down xlogreader */
|
/* Shut down xlogreader */
|
||||||
|
@ -32,7 +32,9 @@ sub configure_and_reload
|
|||||||
|
|
||||||
# Setup london node
|
# Setup london node
|
||||||
my $node_london = PostgreSQL::Test::Cluster->new("london");
|
my $node_london = PostgreSQL::Test::Cluster->new("london");
|
||||||
$node_london->init(allows_streaming => 1);
|
# Archiving is used to provide coverage with the creation of .partial segments
|
||||||
|
# done at the end of recovery and the recovery of two-phase transactions.
|
||||||
|
$node_london->init(allows_streaming => 1, has_archiving => 1);
|
||||||
$node_london->append_conf(
|
$node_london->append_conf(
|
||||||
'postgresql.conf', qq(
|
'postgresql.conf', qq(
|
||||||
max_prepared_transactions = 10
|
max_prepared_transactions = 10
|
||||||
|
Loading…
Reference in New Issue
Block a user