pgsql: Ensure ParseTzFile() closes the input file after failing.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Ensure ParseTzFile() closes the input file after failing.
Дата
Msg-id E1nw6uM-0024Hw-7s@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Ensure ParseTzFile() closes the input file after failing.

We hadn't noticed this because (a) few people feed invalid
timezone abbreviation files to the server, and (b) in typical
scenarios guc.c would throw ereport(ERROR) and then transaction
abort handling would silently clean up the leaked file reference.
However, it was possible to observe file leakage warnings if one
breaks an already-active abbreviation file, because guc.c does
not throw ERROR when loading supposedly-validated settings during
session start or SIGHUP processing.

Report and fix by Kyotaro Horiguchi (cosmetic adjustments by me)

Discussion: https://postgr.es/m/20220530.173740.748502979257582392.horikyota.ntt@gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2114910cae6ae3c623cd9b02ef79270cd5b0134e

Modified Files
--------------
src/backend/utils/misc/tzparser.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Doc: fix mention of pg_dump's minimum supported server version.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Revert changes to CONCURRENTLY that "sped up" Xmin advance