postgresql/src/backend/utils/cache
Thomas Munro e2452c2a63 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:46:16 +12:00
..
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
attoptcache.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
catcache.c Fix omissions in support for the "regcollation" type. 2022-07-17 17:43:28 -04:00
evtcache.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
inval.c Fix CREATE INDEX CONCURRENTLY for the newest prepared transactions. 2021-10-23 18:36:42 -07:00
lsyscache.c Restore the previous semantics of get_constraint_index(). 2022-03-11 13:47:26 -05:00
partcache.c ALTER TABLE ... DETACH PARTITION ... CONCURRENTLY 2021-03-25 18:00:28 -03: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:08 +09:00
relfilenodemap.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
relmapper.c Another fix to relmapper race condition. 2021-06-24 11:19:03 +03:00
spccache.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
syscache.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
ts_cache.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
typcache.c Fix exception safety bug in typcache.c. 2023-09-13 14:46:16 +12:00