Re: Adding a pg_servername() function

Поиск
Список
Период
Сортировка
От Christoph Moench-Tegeder
Тема Re: Adding a pg_servername() function
Дата
Msg-id ZNAW93Kr3j_AZghd@elch.exwg.net
обсуждение исходный текст
Ответ на Re: Adding a pg_servername() function  (Laetitia Avrot <laetitia.avrot@gmail.com>)
Ответы Re: Adding a pg_servername() function
Список pgsql-hackers
Hi,

## Laetitia Avrot (laetitia.avrot@gmail.com):

> I understand your point and sure enough, my customer could set and use the
> cluster_name for that purpose. I totally disagree with using
> inet_server_addr() for that purpose as there are so many different network
> settings with VIPs and so on that it won't help.

That depends a bit on what the exact question is: "where did I connect
to" vs "where is the thing I conencted to running".

> Also, a socket connection
> will give a NULL value, not that it's *that* bad because if it's a socket,
> you're running locally and could still use `\! ifconfig`, but it does not
> work on some configurations (docker for example).

But with a local socket, you already know where you are.

> Also, most humans will
> find it easier to memorize a name than a number and that's one of the
> reasons why we remember websites' URLs instead of their IP.

That's why we have DNS, and it works both ways (especially when
working programatically).

> I still disagree with the monitoring part. A good monitoring tool will have
> to reconcile data from the OS with data from the Postgres cluster. So that,
> we kind of need a way for the monitoring tool to know on which host this
> particular cluster is running and I think it's smarter to get this
> information from the Postgres cluster.

But that's again at least two questions in here: "what is the
instance on this host doing" and "what is the primary/read standby/...
of service X doing", and depending on that ask the base host's
primary address or the service's address. Yes, that's easy to say
when you can define the whole environment, and many setups discover
this only later in the life cycle.

Regards,
Christoph

-- 
Spare Space



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: POC, WIP: OR-clause support for indexes
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: A failure in 031_recovery_conflict.pl on Debian/s390x