Skip to content

Commit

Permalink
Fix default "log_directory" value
Browse files Browse the repository at this point in the history
Although "log_directory" parameter's default value is changed in
PostgreSQL version 10, pg_rman didn't change it.

It leads following main issues if the "log_directory" is not specified.

1. Server logs are always backuped even if "--with-serverlog" is not
specified because pg_rman fails to exclude the "PGDATA/log" directory
from backup target lists.

2. pg_rman's "--keep-srvlog-files" and "--keep-srvlog-days" options are
invalid because SRVLOG_PATH is wrong.
  • Loading branch information
mikecaat authored and MoonInsung committed May 25, 2021
1 parent c755d25 commit 250930d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ do_init(void)
}
else if (pgdata)
{
/* default: log_directory = 'pg_log' */
/* default: log_directory = 'log' if PostgreSQL version is 10 or above */
srvlog_path = pgut_malloc(MAXPGPATH);
join_path_components(srvlog_path, pgdata, "pg_log");
join_path_components(srvlog_path, pgdata, "log");
}
}
if (srvlog_path)
Expand Down

0 comments on commit 250930d

Please sign in to comment.