Re: Plugging fd leaks (was Re: Switching timeline over streaming replication)
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Plugging fd leaks (was Re: Switching timeline over streaming replication) |
| Дата | |
| Msg-id | 11172.1353942250@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Plugging fd leaks (was Re: Switching timeline over streaming replication) (Amit Kapila <amit.kapila@huawei.com>) |
| Список | pgsql-hackers |
Amit Kapila <amit.kapila@huawei.com> writes:
> On Monday, November 26, 2012 7:01 PM Heikki Linnakangas wrote:
>> Hmm, if it's just for locking purposes, how about using a lwlock or a
>> heavy-weight lock instead?
> Its not only for lock, the main idea is that we create temp file and write
> modified configuration in that temp file.
> In end if it's success, then we rename temp file to .conf file but if it
> error out then at abort we need to delete temp file.
> So in short, main point is to close/rename the file in case of success (at
> end of command) and remove in case of abort.
I'd go with the TRY/CATCH solution. It would be worth extending the
fd.c infrastructure if there were multiple users of the feature, but
there are not, nor do I see likely new candidates on the horizon.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера