pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Heed lock protocol in DROP OWNED BY 6+ messages / 1 participants [nested] [flat]
* pgsql: Heed lock protocol in DROP OWNED BY @ 2020-05-06 16:55 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2020-05-06 16:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5be594caf818e0b5e33f8dec191f2707394a6d95 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(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Heed lock protocol in DROP OWNED BY @ 2020-05-06 16:55 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2020-05-06 16:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2eea49471fbaeed050eea4fe0e28cdb8de61d0ac 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(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Heed lock protocol in DROP OWNED BY @ 2020-05-06 16:55 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2020-05-06 16:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Heed lock protocol in DROP OWNED BY @ 2020-05-06 16:55 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2020-05-06 16:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4d21263fffd2d5aebeb2e52dbaaa31d3ba16d51e 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(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Heed lock protocol in DROP OWNED BY @ 2020-05-06 16:55 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2020-05-06 16:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2bf56f50ebb0c9ce2416b27a640cf61488b5ed89 Modified Files -------------- src/backend/catalog/dependency.c | 15 +++++++++------ src/backend/catalog/pg_shdepend.c | 24 +++++++++++++++++++++++- src/include/catalog/dependency.h | 4 ++++ 3 files changed, 36 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Heed lock protocol in DROP OWNED BY @ 2020-05-06 16:55 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 6+ messages in thread From: Alvaro Herrera @ 2020-05-06 16:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/91d97462c96e07a6885261c9d46554b1c4ce834b Modified Files -------------- src/backend/catalog/dependency.c | 15 +++++++++------ src/backend/catalog/pg_shdepend.c | 24 +++++++++++++++++++++++- src/include/catalog/dependency.h | 4 ++++ 3 files changed, 36 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2020-05-06 16:55 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-05-06 16:55 pgsql: Heed lock protocol in DROP OWNED BY Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-05-06 16:55 pgsql: Heed lock protocol in DROP OWNED BY Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-05-06 16:55 pgsql: Heed lock protocol in DROP OWNED BY Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-05-06 16:55 pgsql: Heed lock protocol in DROP OWNED BY Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-05-06 16:55 pgsql: Heed lock protocol in DROP OWNED BY Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-05-06 16:55 pgsql: Heed lock protocol in DROP OWNED BY Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox