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

Commite6317d9

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 parentf663b00 commite6317d9

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
@@ -8049,7 +8049,11 @@ StartupXLOG(void)
80498049
TrimCLOG();
80508050
TrimMultiXact();
80518051

8052-
/* Reload shared-memory state for prepared transactions */
8052+
/*
8053+
* Reload shared-memory state for prepared transactions. This needs to
8054+
* happen before renaming the last partial segment of the old timeline as
8055+
* it may be possible that we have to recovery some transactions from it.
8056+
*/
80538057
RecoverPreparedTransactions();
80548058

80558059
/* 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 = get_new_node("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