Re: Adding a pg_servername() function

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

> In the past I needed such a pg_servername() function because in a project I
> was engaged on they needed to distribute "requests" directed to a in-house
> management service running on network servers, and each one had a DB, so we
> went with pglogical to be used as a (transactional) messaging middleware.

That sounds like an "if all you have is a hammer" kind of architecture.
Or "solutioning by fandom". Short of using an actual addressable
message bus, you could set up the node name as a configuration
parameter, or use cluster_name, or if you really must do some
COPY FROM PROGRAM magic (there's your access control) and just store
the value somewhere.
The more examples of use cases I see, the more I think that actually
beneficial use cases are really rare.

And now that I checked it: I do have systems with gethostname()
returning an FQDN, and other systems return the (short) hostname
only. And it gets worse when you're talking "container" and
"automatic image deployment". So I believe it's a good thing when
a database does not expose too much of the OS below it...

Regards,
Christoph

-- 
Spare Space



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

Предыдущее
От: Melanie Plageman
Дата:
Сообщение: Re: Show WAL write and fsync stats in pg_stat_io
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: PG 16 draft release notes ready