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

Commit1ff9059

Browse files
committed
Replaced the function strftime with pg_strftime for logs in Windows
1 parentdf0cd65 commit1ff9059

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

‎gen_probackup_project.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ sub build_pgprobackup
182182
$probackup->AddFile("$pgsrc/src/bin/pg_rewind/datapagemap.c");
183183

184184
$probackup->AddFile("$pgsrc/src/interfaces/libpq/pthread-win32.c");
185+
$probackup->AddFile("$pgsrc/src/timezone/strftime.c");
185186

186187
$probackup->AddIncludeDir("$pgsrc/src/bin/pg_basebackup");
187188
$probackup->AddIncludeDir("$pgsrc/src/bin/pg_rewind");

‎src/utils/logger.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,11 @@ logfile_getname(const char *format, time_t timestamp)
470470
len=strlen(filename);
471471

472472
/* Treat log_filename as a strftime pattern */
473+
#ifdefWIN32
474+
if (pg_strftime(filename+len,MAXPGPATH-len,format,tm) <=0)
475+
#else
473476
if (strftime(filename+len,MAXPGPATH-len,format,tm) <=0)
477+
#endif
474478
elog_stderr(ERROR,"strftime(%s) failed: %s",format,strerror(errno));
475479

476480
returnfilename;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp