Re: Adding a pg_servername() function

From: Laetitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>
To: 066ce286(at)free(dot)fr
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adding a pg_servername() function
Date: 2023-08-03 12:25:07
Message-ID: CAB_COdi3eATKUo+-FBzwpe8TV_RpUsx_Xy6yxkJawU6wHT5dag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le jeu. 3 août 2023 à 14:20, <066ce286(at)free(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2023-08-03 12:31:34 Re: Extract numeric filed in JSONB more effectively
Previous Message Tomas Vondra 2023-08-03 11:57:10 Re: Use of additional index columns in rows filtering