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

Commita3b8823

Browse files
committed
[Issue#212] Fix logging into file for local archive-push and archive-get
1 parent79d26cd commita3b8823

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

‎src/pg_probackup.c‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,18 @@ main(int argc, char *argv[])
561561
setMyLocation();
562562
}
563563

564-
/* disable logging into file for archive-push and archive-get */
565-
if (backup_subcmd==ARCHIVE_GET_CMD||
566-
backup_subcmd==ARCHIVE_PUSH_CMD)
564+
/*
565+
* Disable logging into file for archive-push and archive-get.
566+
* Note, that we should NOT use fio_is_remote() here,
567+
* because it will launch ssh connection and we do not
568+
* want it, because it will kill archive-get prefetch
569+
* performance.
570+
*
571+
* TODO: make logging into file possible via ssh
572+
*/
573+
if (fio_is_remote_simple(FIO_BACKUP_HOST)&&
574+
(backup_subcmd==ARCHIVE_GET_CMD||
575+
backup_subcmd==ARCHIVE_PUSH_CMD))
567576
{
568577
instance_config.logger.log_level_file=LOG_OFF;
569578
}

‎src/pg_probackup.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,7 @@ extern int fio_send_file(const char *from_fullpath, const char *to_fullpath, FIL
10361036

10371037
/* Check if specified location is local for current node */
10381038
externboolfio_is_remote(fio_locationlocation);
1039+
externboolfio_is_remote_simple(fio_locationlocation);
10391040

10401041
externvoidget_header_errormsg(Pagepage,char**errormsg);
10411042
externvoidget_checksum_errormsg(Pagepage,char**errormsg,

‎src/utils/file.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,15 @@ bool fio_is_remote(fio_location location)
147147
returnis_remote;
148148
}
149149

150+
/* Check if specified location is local for current node */
151+
boolfio_is_remote_simple(fio_locationlocation)
152+
{
153+
boolis_remote=MyLocation!=FIO_LOCAL_HOST
154+
&&location!=FIO_LOCAL_HOST
155+
&&location!=MyLocation;
156+
returnis_remote;
157+
}
158+
150159
/* Try to read specified amount of bytes unless error or EOF are encountered */
151160
staticssize_tfio_read_all(intfd,void*buf,size_tsize)
152161
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp