Re: issue with reading hostname

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: issue with reading hostname
Дата
Msg-id CAKFQuwYbhNnepQgWX_fnB-BhFp-+ujLwhYoWs_p9wdVYSsO5eg@mail.gmail.com
обсуждение исходный текст
Ответ на issue with reading hostname  (Atul Kumar <akumar14871@gmail.com>)
Список pgsql-general
On Mon, Apr 22, 2024 at 1:14 PM Atul Kumar <akumar14871@gmail.com> wrote:


so below are my questions:

1. Is the psql client reading the socket file that resides in the /tmp directory to fetch the hostname ?

2. I saw the socket file in /tmp and it is empty. Then how is the psql client still reading the socket file successfully for hostname ?



Unix sockets are not a PostgreSQL-specific thing, they are an OS thing.  You should be able to find information on them if you search but it isn't something our documentation is on the hook to teach.

But, in many ways, it is just a file name (Unix philosophy, everything is a file) that programs can hook their standard input and standard output up to such that the standard output sent by one process is directed to the standard input of the other process.  All on the fly, nothing gets persisted into the physical file.  It's a tin-can-and-string solution to interprocess communication.

David J.

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

Предыдущее
От: Atul Kumar
Дата:
Сообщение: Re: issue with reading hostname
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: CLUSTER vs. VACUUM FULL