pgsql: Fix cache flush hazard in cache_record_field_properties().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix cache flush hazard in cache_record_field_properties().
Дата
Msg-id E1UmW60-0004RO-1T@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix cache flush hazard in cache_record_field_properties().

We need to increment the refcount on the composite type's cached tuple
descriptor while we do lookups of its column types.  Otherwise a cache
flush could occur and release the tuple descriptor before we're done with
it.  This fails reliably with -DCLOBBER_CACHE_ALWAYS, but the odds of a
failure in a production build seem rather low (since the pfree'd descriptor
typically wouldn't get scribbled on immediately).  That may explain the
lack of any previous reports.  Buildfarm issue noted by Christian Ullrich.

Back-patch to 9.1 where the bogus code was added.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/e46753e9b935516b296bff8d46b9234bc46ee596

Modified Files
--------------
src/backend/utils/cache/typcache.c |    5 +++++
1 file changed, 5 insertions(+)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix cache flush hazard in cache_record_field_properties().
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Improve description of loread/lowrite.