Re: [HACKERS] Making server name part of the startup message

Поиск
Список
Период
Сортировка
От Satyanarayana Narlapuram
Тема Re: [HACKERS] Making server name part of the startup message
Дата
Msg-id DM2PR03MB416323EBDB6ED9BD015198691DA0@DM2PR03MB416.namprd03.prod.outlook.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Making server name part of the startup message  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers

PgBouncer for example assumes that the database names are unique across the database clusters it is serving. Our front-end Gateways can serve tens of thousands of Postgres servers spanning multiple customers, and organizations, and enforcing the database names being unique is not possible for the users of the service. 

 

> For the original idea in this thread, using something like dbname@server seems a more logical choice than username@server.

 

We considered this option but connecting to the database from the GUI tools is not very intuitive / possible. Also /c switch in Psql requires including full cluster_name every time user connect to a different database. 

 

 

Thanks,

Satya

From: Magnus Hagander [mailto:magnus@hagander.net]
Sent: Thursday, June 15, 2017 9:24 AM
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; Satyanarayana Narlapuram <Satyanarayana.Narlapuram@microsoft.com>; pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Making server name part of the startup message

 

On Thu, Jun 15, 2017 at 5:57 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Tom Lane wrote:
>> This makes no sense at all.  The client is telling the server what the
>> server's name is?

> I think for instance you could have one pgbouncer instance (or whatever
> pooler) pointing to several different servers.  So the client connects
> to the pooler and indicates which of the servers to connect to.

I should think that in such cases, the end client is exactly not what
you want to be choosing which server it gets redirected to.  You'd
be wanting to base that on policies defined at the pooler.  There are
already plenty of client-supplied attributes you could use as inputs
for such policies (user name and application name, for instance).
Why do we need to incur a protocol break to add another one?

 

The normal one to use for pgbonucer today is, well, "database name". You can then have pgbouncer map different databases to different backend servers. It's fairly common in my experience to have things like "dbname" and "dbname-ro" (for example) as different database names with one mapping to the master and one mapping to a load-balanced set of standbys, and things like that. ISTM that using the database name is a good choice for that.

 

For the original idea in this thread, using something like dbname@server seems a more logical choice than username@server.

 

TBH, so maybe I'm misunderstanding the original issue?

 

--

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Logical replication launcher never been restarted whenterminated
Следующее
От: Satyanarayana Narlapuram
Дата:
Сообщение: Re: [HACKERS] Making server name part of the startup message