postgresql/src/backend/utils/cache
Thomas Munro 189097db82 Fix exception safety bug in typcache.c.
If an out-of-memory error was thrown at an unfortunate time,
ensure_record_cache_typmod_slot_exists() could leak memory and leave
behind a global state that produced an infinite loop on the next call.

Fix by merging RecordCacheArray and RecordIdentifierArray into a single
array.  With only one allocation or re-allocation, there is no
intermediate state.

Back-patch to all supported releases.

Reported-by: "James Pang (chaolpan)" <chaolpan@cisco.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/PH0PR11MB519113E738814BDDA702EDADD6EFA%40PH0PR11MB5191.namprd11.prod.outlook.com
2023-09-13 14:48:00 +12:00
..
attoptcache.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
catcache.c Fix omissions in support for the "regcollation" type. 2022-07-17 17:43:28 -04:00
evtcache.c Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
inval.c Fix back-patch of "Avoid race in RelationBuildDesc() ..." 2022-02-09 18:16:56 -08:00
lsyscache.c Preserve pg_attribute.attstattarget across REINDEX CONCURRENTLY 2021-02-10 13:09:09 +09:00
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
partcache.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
plancache.c Avoid unnecessary plancache revalidation of utility statements. 2023-08-24 12:02:40 -04:00
relcache.c Add indisreplident to fields refreshed by RelationReloadIndexInfo() 2023-07-14 11:16:10 +09:00
relfilenodemap.c Spelling adjustments 2020-06-07 15:06:51 +02:00
relmapper.c Another fix to relmapper race condition. 2021-06-24 11:19:31 +03:00
spccache.c Introduce a maintenance_io_concurrency setting. 2020-03-16 17:14:26 +13:00
syscache.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
ts_cache.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
typcache.c Fix exception safety bug in typcache.c. 2023-09-13 14:48:00 +12:00