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

Commitc360594

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 parent896012b commitc360594

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
@@ -7899,7 +7899,11 @@ StartupXLOG(void)
78997899
TrimCLOG();
79007900
TrimMultiXact();
79017901

7902-
/* Reload shared-memory state for prepared transactions */
7902+
/*
7903+
* Reload shared-memory state for prepared transactions. This needs to
7904+
* happen before renaming the last partial segment of the old timeline as
7905+
* it may be possible that we have to recovery some transactions from it.
7906+
*/
79037907
RecoverPreparedTransactions();
79047908

79057909
/* Shut down xlogreader */

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

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

3030
# Setup london node
3131
my$node_london = get_new_node("london");
32-
$node_london->init(allows_streaming=> 1);
32+
# Archiving is used to provide coverage with the creation of .partial segments
33+
# done at the end of recovery and the recovery of two-phase transactions.
34+
$node_london->init(allows_streaming=> 1,has_archiving=> 1);
3335
$node_london->append_conf(
3436
'postgresql.conf',qq(
3537
max_prepared_transactions = 10

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp