Re: Allow specifying a dbname in pg_basebackup connection string

Jim Jones <jim.jones@uni-muenster.de>

From: Jim Jones <jim.jones@uni-muenster.de>
To: Jelte Fennema <me@jeltef.nl>, Tristen Raab <tristen.raab@highgo.ca>
Cc: pgsql-hackers@lists.postgresql.org, Jelte Fennema <github-tech@jeltef.nl>
Date: 2023-08-29T23:01:39Z
Lists: pgsql-hackers
Hi Jelte

On 29.08.23 15:55, Jelte Fennema wrote:
> Thanks for the review. I've updated the documentation to make it
> clearer (using some of your suggestions but also some others)

This patch applies and builds cleanly, and the documentation is very clear.

I tested it using the 'replication-support' branch from your github fork:

/pg_basebackup --dbname "port=6432 user=postgres dbname=foo" -D /tmp/dump1/

pgbouncer log:

/2023-08-30 00:50:52.866 CEST [811770] LOG C-0x555fbd65bf40: 
(nodb)/postgres@unix(811776):6432 login attempt: db=foo user=postgres 
tls=no replication=yes/

However, pgbouncer closes with a segmentation fault, so I couldn't test 
the result of pg_basebackup itself - but I guess it isn't the issue here.

Other than that, everything looks good to me.

Jim

Commits

  1. pg_basebackup, pg_receivewal: fix failure to find password in ~/.pgpass.

  2. Allow dbname in pg_basebackup/pg_receivewal connstring