Re: Have pg_basebackup write "dbname" in "primary_conninfo"?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Have pg_basebackup write "dbname" in "primary_conninfo"?
Date: 2024-02-20 14:26:10
Message-ID: CA+TgmoaLRCcCeY3_n7h0rw-r-UfJt_GiFZiJQ1pFZ-iQNUozug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 20, 2024 at 5:58 PM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
> > Seems weird to me. You don't use dbname=replication to ask for a
> > replication connection, so why would we ever end up with that
> > anywhere? And especially in only one of two such closely related
> > cases?
>
> Just FYI - here is an extreme case. And note that I have applied proposed patch.
>
> When `pg_basebackup -D data_N2 -R` is used:
> ```
> primary_conninfo = 'user=hayato ... dbname=hayato ...
> ```
>
> But when `pg_basebackup -d "" -D data_N2 -R` is used:
> ```
> primary_conninfo = 'user=hayato ... dbname=replication
> ```

It seems like maybe somebody should look into why this is happening,
and perhaps fix it.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey M. Borodin 2024-02-20 14:32:38 Re: Injection points: some tools to wait and wake
Previous Message Jelte Fennema-Nio 2024-02-20 14:04:07 Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs