pgsql: Modify error context callback functions to not assume that they

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Modify error context callback functions to not assume that they
Дата
Msg-id 20100319225449.DB5E07541D0@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Modify error context callback functions to not assume that they can fetch
catalog entries via SearchSysCache and related operations.  Although, at the
time that these callbacks are called by elog.c, we have not officially aborted
the current transaction, it still seems rather risky to initiate any new
catalog fetches.  In all these cases the needed information is readily
available in the caller and so it's just a matter of a bit of extra notation
to pass it to the callback.

Per crash report from Dennis Koegel.  I've concluded that the real fix for
his problem is to clear the error context stack at entry to proc_exit, but
it still seems like a good idea to make the callbacks a bit less fragile
for other cases.

Backpatch to 8.4.  We could go further back, but the patch doesn't apply
cleanly.  In the absence of proof that this fixes something and isn't just
paranoia, I'm not going to expend the effort.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/catalog:
        pg_proc.c (r1.164.2.2 -> r1.164.2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_proc.c?r1=1.164.2.2&r2=1.164.2.3)
    pgsql/src/backend/executor:
        functions.c (r1.135.2.2 -> r1.135.2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/functions.c?r1=1.135.2.2&r2=1.135.2.3)
    pgsql/src/backend/optimizer/util:
        clauses.c (r1.277.2.1 -> r1.277.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/clauses.c?r1=1.277.2.1&r2=1.277.2.2)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Modify error context callback functions to not assume that they
Следующее
От: rhaas@postgresql.org (Robert Haas)
Дата:
Сообщение: pgsql: Forbid renaming columns of objects whose column names are