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

Commit2941cb1

Browse files
committed
Merge remote-tracking branch 'origin/pgpro_2605'
2 parents8df3a8c +01fedaf commit2941cb1

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

‎src/pg_probackup.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
constchar*PROGRAM_VERSION="2.0.27";
2323
constchar*PROGRAM_URL="https://github.com/postgrespro/pg_probackup";
2424
constchar*PROGRAM_EMAIL="https://github.com/postgrespro/pg_probackup/issues";
25+
constchar*PROGRAM_FULL_PATH=NULL;
2526

2627
typedefenumProbackupSubcmd
2728
{
@@ -201,6 +202,14 @@ main(int argc, char *argv[])
201202
init_config(&instance_config);
202203

203204
PROGRAM_NAME=get_progname(argv[0]);
205+
PROGRAM_FULL_PATH=palloc0(MAXPGPATH);
206+
207+
if (find_my_exec(argv[0],(char*)PROGRAM_FULL_PATH)<0)
208+
{
209+
fprintf(stderr,_("%s: could not find own program executable\n"),PROGRAM_NAME);
210+
exit(1);
211+
}
212+
204213
set_pglocale_pgservice(argv[0],"pgscripts");
205214

206215
#ifPG_VERSION_NUM >=110000

‎src/restore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ create_recovery_conf(time_t backup_id,
796796

797797
fprintf(fp,"restore_command = '%s archive-get -B %s --instance %s "
798798
"--wal-file-path %%p --wal-file-name %%f'\n",
799-
PROGRAM_NAME,backup_path,instance_name);
799+
PROGRAM_FULL_PATH,backup_path,instance_name);
800800

801801
/*
802802
* We've already checked that only one of the four following mutually

‎src/utils/pgut.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ typedef void (*pgut_atexit_callback)(bool fatal, void *userdata);
2020
* pgut client variables and functions
2121
*/
2222
externconstchar*PROGRAM_NAME;
23+
externconstchar*PROGRAM_FULL_PATH;
2324
externconstchar*PROGRAM_VERSION;
2425
externconstchar*PROGRAM_URL;
2526
externconstchar*PROGRAM_EMAIL;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp