postgresql/src/include/catalog
Jeff Davis f16f5d608c GetSubscription(): use per-object memory context.
Constructing a Subcription object uses a number of small or temporary
allocations. Use a per-object memory context for easy cleanup.

Get rid of FreeSubscription() which did not free all the allocations
anyway. Also get rid of the PG_TRY()/PG_CATCH() logic in
ForeignServerConnectionString() which were used to avoid leaks during
GetSubscription().

Co-authored-by: Álvaro Herrera <alvherre@kurilemu.de>
Suggested-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/xvdjrdqnpap3uq7owbaox3r7p5gf7sv62aaqf2ju3vb6yglatr%40kvvwhoudrlxq
Discussion: https://postgr.es/m/CAA4eK1K=WjZ1maBCmj=5ZdO66AwPORK5ZBxVKedS0xdCcb621A@mail.gmail.com
2026-03-24 15:11:45 -07:00
..
.gitignore Put genbki.pl output into src/include/catalog/ directly 2024-03-14 07:11:21 +01:00
binary_upgrade.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
catalog.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
catversion.h Add support for lock statistics in pgstats 2026-03-24 15:32:09 +09:00
dependency.h Harden _int_matchsel() against being attached to the wrong operator. 2026-02-09 10:14:22 -05:00
duplicate_oids Update copyright for 2026 2026-01-01 13:24:10 -05:00
genbki.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
heap.h Avoid name collision with NOT NULL constraints 2026-02-21 12:22:08 +01:00
index.h Reduce header inclusions via execnodes.h 2026-03-16 14:34:57 +01:00
indexing.h Stop including {brin,gin}_tuple.h in tuplesort.h 2026-01-12 18:09:49 +01:00
Makefile SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
meson.build SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
namespace.h Don't include storage/lock.h in so many headers 2026-03-24 17:11:12 +01:00
objectaccess.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
objectaddress.h Switch SysCacheIdentifier to a typedef enum 2026-02-18 09:58:38 +09:00
partition.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_aggregate.dat Add data type oid8, 64-bit unsigned identifier 2026-01-07 11:37:00 +09:00
pg_aggregate.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_am.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_am.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_amop.dat Add data type oid8, 64-bit unsigned identifier 2026-01-07 11:37:00 +09:00
pg_amop.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_amproc.dat Add data type oid8, 64-bit unsigned identifier 2026-01-07 11:37:00 +09:00
pg_amproc.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_attrdef.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_attribute.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_auth_members.dat Simplify creation of built-in functions with non-default ACLs. 2026-03-05 17:43:09 -05:00
pg_auth_members.h Simplify creation of built-in functions with non-default ACLs. 2026-03-05 17:43:09 -05:00
pg_authid.dat Simplify creation of built-in functions with non-default ACLs. 2026-03-05 17:43:09 -05:00
pg_authid.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_cast.dat Allow explicit casting between bytea and uuid. 2026-03-19 13:51:50 -07:00
pg_cast.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_class.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_class.h SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
pg_collation.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_collation.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_constraint.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_control.h Move fake LSN infrastructure out of GiST. 2026-03-13 19:38:17 -04:00
pg_conversion.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_conversion.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_database.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_database.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_db_role_setting.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_default_acl.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_depend.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_description.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_enum.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_event_trigger.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_extension.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_foreign_data_wrapper.h CREATE SUBSCRIPTION ... SERVER. 2026-03-06 08:27:56 -08:00
pg_foreign_server.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_foreign_table.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_index.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_inherits.h Don't include storage/lock.h in so many headers 2026-03-24 17:11:12 +01:00
pg_init_privs.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_language.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_language.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_largeobject.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_largeobject_metadata.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_namespace.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_namespace.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_opclass.dat Mark GiST inet_ops as opcdefault, and deal with ensuing fallout. 2026-01-08 14:03:56 -05:00
pg_opclass.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_operator.dat Add data type oid8, 64-bit unsigned identifier 2026-01-07 11:37:00 +09:00
pg_operator.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_opfamily.dat Add data type oid8, 64-bit unsigned identifier 2026-01-07 11:37:00 +09:00
pg_opfamily.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_parameter_acl.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_partitioned_table.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_policy.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_proc.dat Add support for lock statistics in pgstats 2026-03-24 15:32:09 +09:00
pg_proc.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_propgraph_element.h SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
pg_propgraph_element_label.h SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
pg_propgraph_label.h SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
pg_propgraph_label_property.h SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
pg_propgraph_property.h SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
pg_publication.h Add support for EXCEPT TABLE in ALTER PUBLICATION. 2026-03-20 11:36:09 +05:30
pg_publication_namespace.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_publication_rel.h Allow table exclusions in publications via EXCEPT TABLE. 2026-03-04 15:56:48 +05:30
pg_range.dat Record range constructor functions in pg_range 2026-01-22 15:56:29 +01:00
pg_range.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_replication_origin.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_rewrite.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_seclabel.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_sequence.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_shdepend.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_shdescription.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_shseclabel.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_statistic.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_statistic_ext.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_statistic_ext_data.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_subscription.h GetSubscription(): use per-object memory context. 2026-03-24 15:11:45 -07:00
pg_subscription_rel.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_tablespace.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_tablespace.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_transform.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_trigger.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_ts_config.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_ts_config.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_ts_config_map.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_ts_config_map.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_ts_dict.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_ts_dict.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_ts_parser.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_ts_parser.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_ts_template.dat Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_ts_template.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_type.dat Add data type oid8, 64-bit unsigned identifier 2026-01-07 11:37:00 +09:00
pg_type.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
pg_user_mapping.h Cope with AIX's alignment woes by using _Pragma("pack"). 2026-02-23 12:34:54 -05:00
README Add src/include/catalog/README 2025-08-19 08:41:42 +02:00
reformat_dat_file.pl Update copyright for 2026 2026-01-01 13:24:10 -05:00
renumber_oids.pl Update copyright for 2026 2026-01-01 13:24:10 -05:00
storage.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
storage_xlog.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
toasting.h Don't include storage/lock.h in so many headers 2026-03-24 17:11:12 +01:00
unused_oids Update copyright for 2026 2026-01-01 13:24:10 -05:00

See <https://www.postgresql.org/docs/devel/bki.html> about the
files in this directory.