GF <phab...@gmail.com> writes: > On Wed, 9 Aug 2023 at 16:05, Tom Lane <t...@sss.pgh.pa.us> wrote: >> I actually do object to this, because I think the concept of "server >> name" is extremely ill-defined
> But the gethostname() function is well defined, both in Linux and in > Windows. Sure, its call convention is standardized. But I see nothing in POSIX saying whether it returns a FQDN or just some random name. In any case, the bigger issue is that I don't really want us to expose a function defined as "whatever gethostname() says". I think there will be portability issues on some platforms, and I am dubious that that definition is what people would want. One concrete reason why I am doubtful about this is the case of multiple PG servers running on the same machine. gethostname() will be unable to distinguish them. regards, tom lane