postgresql/src/include/catalog
Alvaro Herrera 91d97462c9
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
2020-05-06 12:29:41 -04:00
..
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
binary_upgrade.h Fix pg_upgrade to not fail when new-cluster TOAST rules differ from old. 2016-05-06 22:05:51 -04:00
catalog.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
catversion.h Do not write out WCOs in Query 2015-10-05 07:38:56 -04:00
dependency.h Heed lock protocol in DROP OWNED BY 2020-05-06 12:29:41 -04:00
duplicate_oids pgindent run for 9.4 2014-05-06 12:12:18 -04:00
genbki.h Allow forcing nullness of columns during bootstrap. 2015-02-21 22:31:54 +01:00
heap.h Return ObjectAddress in many ALTER TABLE sub-routines 2015-03-25 17:17:56 -03:00
index.h Fix possible crash during FATAL exit from reindexing. 2020-04-21 15:58:43 -04:00
indexing.h Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
namespace.h Require the schema qualification in pg_temp.type_name(arg). 2019-08-05 07:48:45 -07:00
objectaccess.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
objectaddress.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
opfam_internal.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_aggregate.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_am.h Add BRIN infrastructure for "inclusion" opclasses 2015-05-15 18:05:22 -03:00
pg_amop.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_amproc.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_attrdef.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_attribute.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_auth_members.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_authid.h Make BYPASSRLS behave like superuser RLS bypass. 2015-10-03 20:20:50 -04:00
pg_cast.h Fix copy-pasto in comment. 2016-10-12 12:08:54 +03:00
pg_class.h ALTER TABLE .. FORCE ROW LEVEL SECURITY 2015-10-04 21:05:18 -04:00
pg_collation.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_collation_fn.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_constraint.h Always require SELECT permission for ON CONFLICT DO UPDATE. 2017-11-06 09:15:11 +00:00
pg_control.h Back-patch log_newpage_range(). 2020-03-21 09:38:35 -07:00
pg_conversion.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_conversion_fn.h Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
pg_database.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_db_role_setting.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_default_acl.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_depend.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_description.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_enum.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_event_trigger.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_extension.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_foreign_data_wrapper.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_foreign_server.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_foreign_table.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_index.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_inherits.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_inherits_fn.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_language.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_largeobject.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_largeobject_metadata.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_namespace.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_opclass.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_operator.h Split out pg_operator.h function declarations to new file pg_operator_fn.h. 2016-01-01 13:00:13 -05:00
pg_operator_fn.h Split out pg_operator.h function declarations to new file pg_operator_fn.h. 2016-01-01 13:00:13 -05:00
pg_opfamily.h Add BRIN infrastructure for "inclusion" opclasses 2015-05-15 18:05:22 -03:00
pg_pltemplate.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_policy.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_proc.h Fix bogus provolatile/proparallel markings on a few built-in functions. 2018-03-30 18:14:51 -04:00
pg_proc_fn.h Add transforms feature 2015-04-26 10:33:14 -04:00
pg_range.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_replication_origin.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_rewrite.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_seclabel.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_shdepend.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_shdescription.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_shseclabel.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_statistic.h Further patch rangetypes_selfuncs.c's statistics slot management. 2017-05-08 15:02:58 -04:00
pg_tablespace.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_transform.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_trigger.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_ts_config.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_ts_config_map.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_ts_dict.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_ts_parser.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_ts_template.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_type.h Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
pg_type_fn.h Fix missing role dependencies for some schema and type ACLs. 2018-11-09 20:42:03 -05:00
pg_user_mapping.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage.h Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:15 -07:00
storage_xlog.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
toasting.h Add TOAST table to pg_shseclabel for long label use 2015-03-21 22:14:49 -04:00
unused_oids Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00