pgsql: Prevent show_session_authorization from crashing when session_au

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Prevent show_session_authorization from crashing when session_au
Дата
Msg-id E1Oysoe-0006hi-Os@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Prevent show_session_authorization from crashing when session_authorization
hasn't been set.

The only known case where this can happen is when show_session_authorization
is invoked in an autovacuum process, which is possible if an index function
calls it, as for example in bug #5669 from Andrew Geery.  We could perhaps
try to return a sensible value, such as the name of the cluster-owning
superuser; but that seems like much more trouble than the case is worth,
and in any case it could create new possible failure modes.  Simply
returning an empty string seems like the most appropriate fix.

Back-patch to all supported versions, even those before autovacuum, just
in case there's another way to provoke this crash.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=f73ccedcf857e1855b44a9b2545ff7b8ee498ee5

Modified Files
--------------
src/backend/commands/variable.c |    4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Prevent show_session_authorization from crashing when session_au
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Prevent show_session_authorization from crashing when session_au