Re: Allow specifying a dbname in pg_basebackup connection string

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Jelte Fennema <me(at)jeltef(dot)nl>
Cc: Tristen Raab <tristen(dot)raab(at)highgo(dot)ca>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Jelte Fennema <github-tech(at)jeltef(dot)nl>
Subject: Re: Allow specifying a dbname in pg_basebackup connection string
Date: 2023-08-30 19:08:33
Message-ID: a0fa5269-be91-25bd-329e-379f211b500e@uni-muenster.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 30.08.23 14:11, Jelte Fennema wrote:
> Oops it indeed seemed like I made an unintended change when handling
> database names that did not exist in pgbouncer.conf when you used
> auth_type=hba. I pushed a fix for that now to the replication-support
> branch. Feel free to try again. But as you said it's unrelated to the
> postgres patch.

Nice! Now it seems to work as expected :)

$ /usr/local/postgres-dev/bin/pg_basebackup --dbname "host=127.0.0.1
port=6432 user=jim  dbname=foo" -X fetch -v -l testlabel -D /tmp/dump
pg_basebackup: initiating base backup, waiting for checkpoint to complete
pg_basebackup: checkpoint completed
pg_basebackup: write-ahead log start point: 0/12000028 on timeline 1
pg_basebackup: write-ahead log end point: 0/12000100
pg_basebackup: syncing data to disk ...
pg_basebackup: renaming backup_manifest.tmp to backup_manifest
pg_basebackup: base backup completed

pgbouncer log:

2023-08-30 21:04:30.225 CEST [785989] LOG C-0x55fbee0f50b0:
foo/jim(at)127(dot)0(dot)0(dot)1:49764 login attempt: db=foo user=jim tls=no
replication=yes
2023-08-30 21:04:30.225 CEST [785989] LOG S-0x55fbee0fc560:
foo/jim(at)127(dot)0(dot)0(dot)1:5432 new connection to server (from 127.0.0.1:34400)
2023-08-30 21:04:30.226 CEST [785989] LOG S-0x55fbee0fc560:
foo/jim(at)127(dot)0(dot)0(dot)1:5432 closing because: replication client was closed
(age=0s)
2023-08-30 21:04:30.226 CEST [785989] LOG S-0x55fbee0fc560:
foo/jim(at)127(dot)0(dot)0(dot)1:5432 new connection to server (from 127.0.0.1:34408)
2023-08-30 21:04:30.227 CEST [785989] LOG S-0x55fbee0fc560:
foo/jim(at)127(dot)0(dot)0(dot)1:5432 closing because: replication client was closed
(age=0s)
2023-08-30 21:04:30.227 CEST [785989] LOG S-0x55fbee0fc560:
foo/jim(at)127(dot)0(dot)0(dot)1:5432 new connection to server (from 127.0.0.1:34410)
2023-08-30 21:04:30.228 CEST [785989] LOG S-0x55fbee0fc560:
foo/jim(at)127(dot)0(dot)0(dot)1:5432 closing because: replication client was closed
(age=0s)
2023-08-30 21:04:30.228 CEST [785989] LOG S-0x55fbee0fc560:
foo/jim(at)127(dot)0(dot)0(dot)1:5432 new connection to server (from 127.0.0.1:34418)
2023-08-30 21:04:30.309 CEST [785989] LOG S-0x55fbee0fc560:
foo/jim(at)127(dot)0(dot)0(dot)1:5432 closing because: replication client was closed
(age=0s)
2023-08-30 21:04:30.309 CEST [785989] LOG C-0x55fbee0f50b0:
foo/jim(at)127(dot)0(dot)0(dot)1:49764 closing because: client close request (age=0s)

Jim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2023-08-30 19:50:28 Re: Improving btree performance through specializing by key shape, take 2
Previous Message Andrey M. Borodin 2023-08-30 19:04:46 Re: UUID v7