From 95825afcfe3675626ab7a6c43bf855079e2aa382 Mon Sep 17 00:00:00 2001 From: Grigory Smolkin Date: Sun, 26 Apr 2020 02:05:46 +0300 Subject: [PATCH] [Issue #197] setting session parameters via PGOPTIONS envvar breaks parsing of backup.control --- src/utils/pgut.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/pgut.c b/src/utils/pgut.c index a050a512..b7599816 100644 --- a/src/utils/pgut.c +++ b/src/utils/pgut.c @@ -187,8 +187,10 @@ pgut_get_conninfo_string(PGconn *conn) (option->val != NULL && option->val[0] == '\0')) continue; - /* do not print password into the file */ - if (strcmp(option->keyword, "password") == 0) + /* do not print password, passfile and options into the file */ + if (strcmp(option->keyword, "password") == 0 || + strcmp(option->keyword, "passfile") == 0 || + strcmp(option->keyword, "options") == 0) continue; if (!firstkeyword)