pgsql: Fix failure to ensure that a snapshot is available to datatype

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix failure to ensure that a snapshot is available to datatype
Дата
Msg-id 20081213020053.2587E7545A4@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix failure to ensure that a snapshot is available to datatype input functions
when they are invoked by the parser.  We had been setting up a snapshot at
plan time but really it needs to be done earlier, before parse analysis.
Per report from Dmitry Koterov.

Also fix two related problems discovered while poking at this one:
exec_bind_message called datatype input functions without establishing a
snapshot, and SET CONSTRAINTS IMMEDIATE could call trigger functions without
establishing a snapshot.

Backpatch to 8.2.  The underlying problem goes much further back, but it is
masked in 8.1 and before because we didn't attempt to invoke domain check
constraints within datatype input.  It would only be exposed if a C-language
datatype input function used the snapshot; which evidently none do, or we'd
have heard complaints sooner.  Since this code has changed a lot over time,
a back-patch is hardly risk-free, and so I'm disinclined to patch further
than absolutely necessary.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/backend/commands:
        trigger.c (r1.210.2.6 -> r1.210.2.7)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c?r1=1.210.2.6&r2=1.210.2.7)
    pgsql/src/backend/parser:
        analyze.c (r1.353.2.1 -> r1.353.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/analyze.c?r1=1.353.2.1&r2=1.353.2.2)
    pgsql/src/backend/tcop:
        postgres.c (r1.518.2.1 -> r1.518.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c?r1=1.518.2.1&r2=1.518.2.2)
    pgsql/src/include/parser:
        analyze.h (r1.34 -> r1.34.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/analyze.h?r1=1.34&r2=1.34.2.1)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix failure to ensure that a snapshot is available to datatype
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Remove pg_plan_queries()'s now-useless needSnapshot parameter.