Re: Can we have a new SQL callable function to get Postmaster PID?

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: Can we have a new SQL callable function to get Postmaster PID?
Дата
Msg-id 589d67f1-4a19-4b6d-84bf-da7cf89cf498@www.fastmail.com
обсуждение исходный текст
Ответ на Can we have a new SQL callable function to get Postmaster PID?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Wed, Feb 3, 2021, at 3:12 AM, Bharath Rupireddy wrote:
Can we have a new function, say pg_postgres_pid(), to return
postmaster PID similar to pg_backend_pid()?
It is not that difficult to read the postmaster PID using existing functions.

postgres=# SELECT (regexp_match(pg_read_file('postmaster.pid'), '\d+'))[1];
regexp_match
--------------
13496
(1 row)

While investigating an issue, you are probably interested in a backend PID or
one of the auxiliary processes. In both cases, it is easier to obtain the PIDs.


--
Euler Taveira

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: a curious case of force_parallel_mode = on with jit'ing
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Improve new hash partition bound check error messages