diff options
author | Jeff Davis <jdavis@postgresql.org> | 2021-07-09 14:15:48 -0700 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2021-07-10 10:26:38 -0700 |
commit | dd0e37cc1598050ec38fa289908487d4f5c96dca (patch) | |
tree | fdcc3bc228a3c24d70d8fe6cf4969023a8e2007b /src/backend/access/gist/gistbuild.c | |
parent | 9f6be2e79f88c65cef7cfeb0580e8b2ba74974f6 (diff) | |
download | postgresql-dd0e37cc1598050ec38fa289908487d4f5c96dca.tar.gz |
Fix assign_record_type_typmod().
If an error occurred in the wrong place, it was possible to leave an
unintialized entry in the hash table, leading to a crash. Fixed.
Also, be more careful about the order of operations so that an
allocation error doesn't leak memory in CacheMemoryContext or
unnecessarily advance NextRecordTypmod.
Backpatch through version 11. Earlier versions (prior to 35ea75632a5)
do not exhibit the problem, because an uninitialized hash entry
contains a valid empty list.
Author: Sait Talha Nisanci <Sait.Nisanci@microsoft.com>
Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/HE1PR8303MB009069D476225B9A9E194B8891779@HE1PR8303MB0090.EURPRD83.prod.outlook.com
Backpatch-through: 11
Diffstat (limited to 'src/backend/access/gist/gistbuild.c')
0 files changed, 0 insertions, 0 deletions