Re: Adding a pg_servername() function

Поиск
Список
Период
Сортировка
От Laetitia Avrot
Тема Re: Adding a pg_servername() function
Дата
Msg-id CAB_COdi3eATKUo+-FBzwpe8TV_RpUsx_Xy6yxkJawU6wHT5dag@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Adding a pg_servername() function  (066ce286@free.fr)
Список pgsql-hackers


Le jeu. 3 août 2023 à 14:20, <066ce286@free.fr> a écrit :


> Agreed, depending on how hosts and dns are set, it can be useless.
> But normally, companies have host making standards to avoid that.


BTW you already have it :

select setting from pg_settings where name = 'listen_addresses'

No ?


Hello,

No, this is not the same thing. Most of the time, we will find either the wildcard '*' or an Ip address or a list of IP addresses, which is not what we want in this particular use case. But I agree that there are some use cases where we will find the hostname there, but from my experience, that's not the majority of the use cases.

For example, you could use a VIP in listen_addresses, so that you ensure that distant connection will go through that VIP and you'll always end up on the right server even though it might be another physical instance (after switch or failover).

Lætitia
 

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Use of additional index columns in rows filtering
Следующее
От: Andy Fan
Дата:
Сообщение: Re: Extract numeric filed in JSONB more effectively