[PATCH] session_replication_role = replica with TRUNCATE

Поиск
Список
Период
Сортировка
От Marco Nenciarini
Тема [PATCH] session_replication_role = replica with TRUNCATE
Дата
Msg-id ff835f71-3c6c-335e-4c7b-b9e1646cf3d7@2ndquadrant.it
обсуждение исходный текст
Ответы Re: [PATCH] session_replication_role = replica with TRUNCATE  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Re: [PATCH] session_replication_role = replica with TRUNCATE  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
Hi,

The current behavior of session_replication_role = replica with TRUNCATE
is not the same of with the other commands.
It does not check FKs for INSERT/UPDATE/DELETE but it does for TRUNCATE,
so one cannot execute TRUNCATE on a table when it is possible to DELETE
from table without WHERE clause.

I'm attaching a simple patch to make TRUNCATE match behavior of DELETE
for session_replication_role = replica.

Regards,
Marco

--
Marco Nenciarini - 2ndQuadrant Italy
PostgreSQL Training, Services and Support
marco.nenciarini@2ndQuadrant.it | www.2ndQuadrant.it

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Basebackups reported as idle
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] taking stdbool.h into use