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

Commitc717525

Browse files
committed
pg_basebackup: Fix check for MINIMUM_VERSION_FOR_WAL_SUMMARIES
MINIMUM_VERSION_FOR_WAL_SUMMARIES is used to check if the directorypg_wal/summaries/ should be created in a base backup, but its conditionwas reversed: pg_wal/summaries/ would be created when taking basebackups from backends of v16 and older versions, but it should becreated in base backups taken from backends of v17 and newer versions.Author: Artur ZakirovReviewed-by: Yugo Nagata, Nazir Bilal YavuzDiscussion:https://postgr.es/m/CAKNkYnzkkQ0gb_ZmLTY0r2-qV1q6imXgcCWxdA6UoA6yJkujGg@mail.gmail.com
1 parent40bbc8c commitc717525

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

‎src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,14 +700,12 @@ StartLogStreamer(char *startpos, uint32 timeline, char *sysidentifier,
700700
/*
701701
* For newer server versions, likewise create pg_wal/summaries
702702
*/
703-
if (PQserverVersion(conn)<MINIMUM_VERSION_FOR_WAL_SUMMARIES)
703+
if (PQserverVersion(conn)>=MINIMUM_VERSION_FOR_WAL_SUMMARIES)
704704
{
705705
charsummarydir[MAXPGPATH];
706706

707707
snprintf(summarydir,sizeof(summarydir),"%s/%s/summaries",
708-
basedir,
709-
PQserverVersion(conn)<MINIMUM_VERSION_FOR_PG_WAL ?
710-
"pg_xlog" :"pg_wal");
708+
basedir,"pg_wal");
711709

712710
if (pg_mkdir_p(summarydir,pg_dir_create_mode)!=0&&
713711
errno!=EEXIST)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp