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

Commitc6f2f01

Browse files
committed
Fix pg_basebackup with in-place tablespaces.
Previously, pg_basebackup from a cluster that contained an 'in-place'tablespace, as introduced by commit7170f21, would produce a harmlesswarning on Unix and fail completely on Windows.Reported-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Reviewed-by: Michael Paquier <michael@paquier.xyz>Discussion:https://postgr.es/m/20220304.165449.1200020258723305904.horikyota.ntt%40gmail.com
1 parent9dde828 commitc6f2f01

File tree

1 file changed

+14
-0
lines changed
  • src/backend/access/transam

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
#include"catalog/pg_control.h"
6767
#include"catalog/pg_database.h"
6868
#include"common/controldata_utils.h"
69+
#include"common/file_utils.h"
6970
#include"executor/instrument.h"
7071
#include"miscadmin.h"
7172
#include"pg_trace.h"
@@ -8292,6 +8293,19 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
82928293

82938294
snprintf(fullpath,sizeof(fullpath),"pg_tblspc/%s",de->d_name);
82948295

8296+
/*
8297+
* Skip anything that isn't a symlink/junction. For testing only,
8298+
* we sometimes use allow_in_place_tablespaces to create
8299+
* directories directly under pg_tblspc, which would fail below.
8300+
*/
8301+
#ifdefWIN32
8302+
if (!pgwin32_is_junction(fullpath))
8303+
continue;
8304+
#else
8305+
if (get_dirent_type(fullpath,de, false,ERROR)!=PGFILETYPE_LNK)
8306+
continue;
8307+
#endif
8308+
82958309
#if defined(HAVE_READLINK)|| defined(WIN32)
82968310
rllen=readlink(fullpath,linkpath,sizeof(linkpath));
82978311
if (rllen<0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp