Re: Unexpected "shared memory block is still in use"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Unexpected "shared memory block is still in use"
Дата
Msg-id 2079.1567609165@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Unexpected "shared memory block is still in use"  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: Unexpected "shared memory block is still in use"  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> I agree with this patch and the reasons for it.

OK, thanks for reviewing.

> A related point, perhaps we should change the key printed into
> postmaster.pid to be in hexadecimal format ("0x08x") so that it matches
> what ipcs prints.

Hmm, that depends on whose ipcs you use :-(.  A quick survey
of my machines says it's

                key     shmid

Linux:          hex     decimal
FreeBSD:        decimal decimal
NetBSD:         decimal decimal
OpenBSD:        decimal decimal
macOS:          hex     decimal
HPUX:           hex     (not printed)

There's certainly room to argue that hex+decimal is most popular,
but I'm not sure that that outweighs possible compatibility issues
from changing postmaster.pid contents.  (Admittedly, it's not real
clear that anything would be paying attention to the shmem key,
so maybe there's no compatibility issue.)

If we did want to assume that we could change postmaster.pid,
it might be best to print the key both ways?

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Default JIT setting in V12
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [PATCH] Connection time for \conninfo