pgsql: Forbid ALTER TABLE and CLUSTER when there are pending

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Forbid ALTER TABLE and CLUSTER when there are pending
Дата
Msg-id 20080102233442.8F9DA7540F0@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Forbid ALTER TABLE and CLUSTER when there are pending AFTER-trigger events
in the current backend for the target table.  These operations move tuples
around and would thus invalidate the TIDs stored in the trigger event records.
(We need not worry about events in other backends, since acquiring exclusive
lock should be enough to ensure there aren't any.)  It might be sufficient
to forbid only the table-rewriting variants of ALTER TABLE, but in the absence
of any compelling use-case, let's just be safe and simple.  Per follow-on
investigation of bug #3847, though this is not actually the same problem
reported therein.

Possibly this should be back-patched, but since the case has never been
reported from the field, I didn't bother.

Modified Files:
--------------
    pgsql/src/backend/commands:
        cluster.c (r1.166 -> r1.167)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/cluster.c?r1=1.166&r2=1.167)
        tablecmds.c (r1.238 -> r1.239)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.238&r2=1.239)
        trigger.c (r1.226 -> r1.227)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c?r1=1.226&r2=1.227)
    pgsql/src/include/commands:
        trigger.h (r1.65 -> r1.66)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/trigger.h?r1=1.65&r2=1.66)

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

Предыдущее
От: rlucas@pgfoundry.org (User Rlucas)
Дата:
Сообщение: aupg - aupg_src: Modified the aupgschema.rowid() types to use SQL
Следующее
От: mkz@pgfoundry.org (User Mkz)
Дата:
Сообщение: pgbouncer - pgbouncer: allow autoconf 2.59