From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Mike Lissner <mlissner@michaeljaylissner.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: CREATE SUBSCRIPTION fails with long passwords
Date: Wed, 24 Apr 2019 23:17:50 +0200
Message-ID: <20190424211750.o7nzdykqrlnnikac@development> (raw)
In-Reply-To: <CAMp9=EyTcrRk1QPzmfNkt2OY8HOh-5DVW_CuXa-p2c8JoJOSMg@mail.gmail.com>
References: <CAMp9=EyTcrRk1QPzmfNkt2OY8HOh-5DVW_CuXa-p2c8JoJOSMg@mail.gmail.com>
On Wed, Apr 24, 2019 at 10:07:45AM -0700, Mike Lissner wrote:
> This made me a bit crazy tonight. Steps to reproduce:
> 1. Create a new role and give it a really long password. Ours was 108
> chars.
> 2. Set up all the necessary replication permissions/roles.
> 3. From another computer, try to connect as that user using psql — it
> works!
> 4. Now try a CREATE SUBSCRIPTION command like:
> create subscription my_sub connection 'host=192.168.0.111 port=5432
> user=the_new_user password=long_password dbname=my_db sslmode=require'
> publication new_server;
> You'll get the following error:
> ERROR: could not connect to the publisher: FATAL: password
> authentication failed for user "the_new_user"
> Now, go back and shorten that password, and try again. You'll get:
> create subscription my_sub connection 'host=192.168.0.111 port=5432
> user=the_new_user password=long_password dbname=my_db sslmode=require'
> publication new_server;
> NOTICE: created replication slot "my_sub" on publisher
> CREATE SUBSCRIPTION
>
> And it'll be off to the races. I watched the logs on both servers during
> these experiments. Nothing much in there, aside from the logs above.
> Is this known functionality? Seems like a nasty bug and it took me a while
> to figure it out.
I've tried to reproduce this on a master, and it works for me (with 200
char passwords). Which version have you used? Can you share an actual
example of commands creating the role/subscription that triggers the
failure, including the password value?
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, mlissner@michaeljaylissner.com
Subject: Re: CREATE SUBSCRIPTION fails with long passwords
In-Reply-To: <20190424211750.o7nzdykqrlnnikac@development>
References: <CAMp9=EyTcrRk1QPzmfNkt2OY8HOh-5DVW_CuXa-p2c8JoJOSMg@mail.gmail.com> <20190424211750.o7nzdykqrlnnikac@development>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox