Re: Can I use .pgpass in logical replication?

From: "CONVERS Yann - DREAL Auvergne-Rhône-Alpes/CIDDAE/SIG" <yann(dot)convers(at)developpement-durable(dot)gouv(dot)fr>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Can I use .pgpass in logical replication?
Date: 2018-05-09 14:48:34
Message-ID: d4049793-18f1-2fa4-4872-9ebe552594c1@developpement-durable.gouv.fr
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
Have you apply  ACL for .pgpass file? if not it's aborted?<br>
<br>
<br>
<div class="moz-signature">
<pre><b>Yann Convers</b>
Gestionnaire de l'infrastructure, des référentiels et des outils<p>
<font color="#000000"><b>DREAL Auvergne-Rhône-Alpes</b></font></p>
<pre>Service Connaissance, Information, Développement Durable, Autorité Environnementale - Pole Système d Information Géographique
Tél : 04 26 28 67 89
courriel : <a href="mailto:yann(dot)convers(at)developpement-durable(dot)gouv(dot)fr">yann(dot)convers(at)developpement-durable(dot)gouv(dot)fr</a></pre>adresse de la boite d’unité : <a href="mailto:sig(dot)dreal-ara(at)developpement-durable(dot)gouv(dot)fr">boite unité</a>

<p>Pour toute commande interne de prestations, merci d utilisez le formulaire suivant : <a href="http://postgis-aura.projets.appli.i2/projects/demandes-de-prestations/issues/new">http://postgis-aura.projets.appli.i2/projects/demandes-de-prestations/issues/new</a></p>
<b>Adresse postale :</b> DREAL Auvergne-Rhône-Alpes, CIDDAE - SIG
69453 LYON CEDEX 06
<b>Adresse physique :</b> 5
place Jules Ferry (immeuble Lugdunum - métro Brotteaux) -
69006 Lyon
<b>Standard :</b> 04 26 28 60 00
<b>Liens :</b><a href="http://intra.dreal-rhone-alpes.i2/">Site
Intranet</a>  <a href="http://www.auvergne-rhone-alpes.developpement-durable.gouv.fr/">Site
Internet</a>
<p style="margin-bottom: 0cm">

</p>

</pre>
</div>
<div class="moz-cite-prefix">Le 09/05/2018 à 16:28, "&gt; JaeWon Lee
(par Internet, dépôt
<a class="moz-txt-link-abbreviated" href="mailto:pgsql-admin-owner+m63745-56088(at)lists(dot)postgresql(dot)org">pgsql-admin-owner+m63745-56088(at)lists(dot)postgresql(dot)org</a>)" a écrit :<br>
</div>
<blockquote
cite="mid:CAC+TV7EG_z6FKZOBPUUrXX1ZsJwt+HBkz9+Uh-OM3D37UCS+7w(at)mail(dot)gmail(dot)com"
type="cite">
<div dir="ltr">Hi ^^ I'm using Logical replication. I made
subscription like below.<br>
<br>
=# CREATE SUBSCRIPTION mysub CONNECTION 'host=xxx.xxx.xxx.xxx
port=5432 <br>
     user=postgres dbname=mydb password=&lt;password&gt;'
PUBLICATION mypub;<br>
NOTICE:  created replication slot "mysub" on publisher<br>
CREATE SUBSCRIPTION<br>
<br>
But I wonder if I can use .pgpass file to provide password. Of
course, I tried it. But it failed like below.<br>
<br>
=# CREATE SUBSCRIPTION mysub CONNECTION 'host=xxx.xxx.xxx.xxx
port=5432 <br>
    user=postgres dbname=mydb' PUBLICATION mypub;<br>
ERROR:  could not connect to the publisher: fe_sendauth: no
password supplied<br>
<br>
[My .pgpass]<br>
<br>
localhost:5432:postgres:postgres:&lt;password&gt;<br>
localhost:5432:mydb:postgres:&lt;password&gt;<br>
xxx.xxx.xxx.xxx:5432:mydb:postgres:&lt;password&gt;<br>
<br>
This .pgpass file works well for pgAgent.<br>
<br>
Can I use .pgpass file for logical replication? or Should I
write my password in CREATE statement? If writing password in
CREATE command is the only answer, is it secure?</div>
</blockquote>
<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 3.3 KB

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Wells Oliver 2018-05-09 18:19:29 Re: How do I execute SQL in pgAdmin!?
Previous Message JaeWon Lee 2018-05-09 14:28:20 Can I use .pgpass in logical replication?