pgsql: Heed lock protocol in DROP OWNED BY
От | Alvaro Herrera |
---|---|
Тема | pgsql: Heed lock protocol in DROP OWNED BY |
Дата | |
Msg-id | E1jWNKs-0007m3-Bu@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Heed lock protocol in DROP OWNED BY We were acquiring object locks then deleting objects one by one, instead of acquiring all object locks first, ignoring those that did not exist, and then deleting all objects together. The latter is the correct protocol to use, and what this commits changes to code to do. Failing to follow that leads to "cache lookup failed for relation XYZ" error reports when DROP OWNED runs concurrently with other DDL -- for example, a session termination that removes some temp tables. Author: Álvaro Herrera Reported-by: Mithun Chicklore Yogendra (Mithun CY) Reviewed-by: Ahsan Hadi, Tom Lane Discussion: https://postgr.es/m/CADq3xVZTbzK4ZLKq+dn_vB4QafXXbmMgDP3trY-GuLnib2Ai1w@mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/59273a7cec34e5bb8a9483f23a03e3318b52d65b Modified Files -------------- src/backend/catalog/dependency.c | 15 +++++++++------ src/backend/catalog/pg_shdepend.c | 24 +++++++++++++++++++++++- src/backend/commands/subscriptioncmds.c | 1 - src/include/catalog/dependency.h | 4 ++++ 4 files changed, 36 insertions(+), 8 deletions(-)
В списке pgsql-committers по дате отправления: