From 250930db01315e9f0cb94b6a4797f89eb169c5ec Mon Sep 17 00:00:00 2001 From: mikecaat Date: Fri, 14 May 2021 13:17:59 +0900 Subject: [PATCH] Fix default "log_directory" value 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. --- init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.c b/init.c index fb148ce3..f0b027be 100644 --- a/init.c +++ b/init.c @@ -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)