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)" <[email protected]> Reviewed-by: Michael Paquier <[email protected]> Discussion: https://postgr.es/m/PH0PR11MB519113E738814BDDA702EDADD6EFA%40PH0PR11MB5191.namprd11.prod.outlook.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6ae57f190e276f46bc2d0b616515bed4b4f664ce Modified Files -------------- src/backend/utils/cache/typcache.c | 52 +++++++++++++++++++------------------- src/tools/pgindent/typedefs.list | 1 + 2 files changed, 27 insertions(+), 26 deletions(-)
pgsql-committers by date:
Соглашаюсь с условиями обработки персональных данных