[HACKERS] OpenTemporaryFile() vs resowner.c

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема [HACKERS] OpenTemporaryFile() vs resowner.c
Дата
Msg-id CAEepm=3y_jxHjXb3SM778rbRAfpXjZOez0skiaDVBxp_9-Wqkw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] OpenTemporaryFile() vs resowner.c
Список pgsql-hackers
Hi hackers,

Andres, Robert and Peter G rightly complained[1] that my shared
temporary file patch opens a file, then calls
ResourceOwnerEnlargeFiles() which can fail due to lack of memory, and
then registers the file handle to make sure we don't leak it.  Doh.
The whole point of the separate ResourceOwnerEnlargeXXX() interface is
to be able to put it before resource acquisition.

The existing OpenTemporaryFile() coding has the same mistake.  Please
see attached.

[1] https://www.postgresql.org/message-id/20171107210155.kuksdd324kgz5oev%40alap3.anarazel.de

-- 
Thomas Munro
http://www.enterprisedb.com

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Exclude pg_internal.init from base backup
Следующее
От: Masahiko Sawada
Дата:
Сообщение: [HACKERS] Remove duplicate setting in test/recovery/Makefile