create subscription, connection string, password in log not hide

From: "ferraresso(at)tin(dot)it" <ferraresso(at)tin(dot)it>
To: pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: create subscription, connection string, password in log not hide
Date: 2018-01-22 08:45:44
Message-ID: 1611d0b727b.ferraresso@tin.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello,
I am tring the use of Logical Replication with Postgres 10.1.
I installed two Postgres 10.1 on two different system Windows 64 bit.
I follow the chapter 31.9. Quick Setup
Everything function, that's good. I want to use in production.
But I found this problem:
I went to see in the log file of the two system what is going on.
I found in the log (C:\Program Files\PostgreSQL\10\data\log) of the subscriber the line of the command:
"CREATE SUBSCRIPTION mysub CONNECTION 'dbname=foo host=bar user=repuser password=secret' PUBLICATION mypub;"
Where I can see the connection string exactly as written with the password in clear.
I try to use the password with md5 hash ('md5'+md5(user+password)) and othe combination of encrypted password, in a similar way I can do with "CREATE USER WITH ENCRYPTED ...".
But it seemed to me that the only way is to use the password in clear.
There is any way to avoid to log the password in clear manner?
Thanks
Loris

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Laurenz Albe 2018-01-22 11:56:01 Re: create subscription, connection string, password in log not hide
Previous Message Stephen Froehlich 2018-01-21 15:47:35 RE: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?