Re: postgresql and process titles

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: postgresql and process titles
Дата
Msg-id 18995.1150252587@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: postgresql and process titles  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: postgresql and process titles  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Right.  What if the postmaster signals the backend once a second to do
> their reporting.  I am not sure what the final solution will be, but we
> _need_ one based on the performance numbers I and others have seen. 
> Could we have PGPROC have a reporting boolean that is set every second
> and somehow checked by each backend?

I don't see any point in involving the postmaster in it.  What might be
interesting is to replace the current backend timer-interrupt handling
by a free-running cyclic interrupt every N milliseconds (the resolution
of the statement_timeout and deadlock_check delays would then be no
better than N milliseconds, since those actions would occur at the next
cyclic interrupt after the desired time expires).  We could possibly
drive stats reports and ps_status updates from this, as well as sampling
EXPLAIN ANALYZE if anyone cares to pursue that.

Complaints I can foresee:

* lots of cycles wasted in idle backends.  Possibly a backend that's not
received any command for a second or two could shut down its interrupt
until it next gets a command.

* not clear whether the interrupt happens when waiting for I/O.  I
already mentioned that this would be a problem for EXPLAIN ANALYZE,
but it might be no big deal for the other uses.
        regards, tom lane


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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: postgresql and process titles
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: postgresql and process titles