Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit68cb5af

Browse files
committed
Enable archiving in recovery TAP test 009_twophase.pl
This is a follow-up off663b00, that has been committed to v13 and v14,tweaking the TAP test for two-phase transactions so as it providescoverage for the bug that has been fixed. This change is done in itsown commit for clarity, as v15 and HEAD did not show the problematicbehavior, still missed coverage for it.While on it, this adds a comment about the dependency of the lastpartial segment rename and RecoverPreparedTransactions() at the end ofrecovery, as that can be easy to miss.Author: Michael PaquierReviewed-by: Kyotaro HoriguchiDiscussion:https://postgr.es/m/743b9b45a2d4013bd90b6a5cba8d6faeb717ee34.camel@cybertec.atBackpatch-through: 13
1 parent0d369ac commit68cb5af

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5689,7 +5689,11 @@ StartupXLOG(void)
56895689
TrimCLOG();
56905690
TrimMultiXact();
56915691

5692-
/* Reload shared-memory state for prepared transactions */
5692+
/*
5693+
* Reload shared-memory state for prepared transactions. This needs to
5694+
* happen before renaming the last partial segment of the old timeline as
5695+
* it may be possible that we have to recovery some transactions from it.
5696+
*/
56935697
RecoverPreparedTransactions();
56945698

56955699
/* Shut down xlogreader */

‎src/test/recovery/t/009_twophase.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ sub configure_and_reload
3232

3333
# Setup london node
3434
my$node_london = PostgreSQL::Test::Cluster->new("london");
35-
$node_london->init(allows_streaming=> 1);
35+
# Archiving is used to provide coverage with the creation of .partial segments
36+
# done at the end of recovery and the recovery of two-phase transactions.
37+
$node_london->init(allows_streaming=> 1,has_archiving=> 1);
3638
$node_london->append_conf(
3739
'postgresql.conf',qq(
3840
max_prepared_transactions = 10

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp