Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.
Дата
Msg-id 6989.1483637871@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <rhaas@postgresql.org> writes:
> With the old code, a backend that read pg_stat_activity without ever
> having executed a parallel query might see a backend in the midst of
> executing one waiting on a DSA LWLock, resulting in a crash.  The
> solution is for backends to register the tranche at startup time, not
> the first time a parallel query is executed.

While I have no objection to the patch as committed, I have to wonder
if this isn't papering over the underlying problem rather than solving it.
It seems like this direction means that there's no such thing as dynamic
registration of LWLock tranches and we should just give up on that concept
entirely.  If we do want to preserve the concept, don't we need to fix the
pg_stat_activity code so it doesn't fail on tranches that aren't known
locally?
        regards, tom lane



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] use strict in all Perl programs
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.