Re: hash_create(): check return code

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: hash_create(): check return code
Дата
Msg-id
8344.1098627959@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
hash_create(): check return code Neil Conway <neilc@samurai.com>
Re: hash_create(): check return code Tom Lane <tgl@sss.pgh.pa.us>
Re: hash_create(): check return code Neil Conway <neilc@samurai.com>
Re: hash_create(): check return code Tom Lane <tgl@sss.pgh.pa.us>
Re: hash_create(): check return code Neil Conway <neilc@samurai.com>
Re: hash_create(): check return code Tom Lane <tgl@sss.pgh.pa.us>
Re: hash_create(): check return code Neil Conway <neilc@samurai.com>
Neil Conway  writes:
> There was one case in pgstat.c where I had to wrap the hash_create() 
> call in a PG_TRY() block to ensure a file handle is closed (this code 
> might be invoked by a regular backend it appears, so elog(ERROR) won't 
> necessarily close the file handle).

A better solution is to use AllocateFile/FreeFile; I'm not 100%
certain that that works in the pgstat context, but I think it should.

			regards, tom lane
В списке pgsql-patches по дате отправления
От: Neil Conway
Дата:
От: Magnus Hagander
Дата:
Сообщение: initdb conf-files linebreaks
FAQ