| От | Tom Lane |
|---|---|
| Тема | Re: unsafe use of hash_search(... HASH_ENTER ...) |
| Дата | |
| Msg-id | 16797.1117298789@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: unsafe use of hash_search(... HASH_ENTER ...) ("Qingqing Zhou" <zhouqq@cs.toronto.edu>) |
| Список | pgsql-hackers |
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> Consider the senario like this:
> Backends register some dirty segments in BgWriterShmem->requests; bgwrite
> will AbsorbFsyncRequests() asynchornously but failed to record some one in
> pendingOpsTable due to an "out of memory" error. All dirty segments
> remembered in "requests" after this one will not have chance be absorbed by
> bgwriter.
So really we have to PANIC if we fail to record a dirty segment. That's
a bit nasty, but since the hashtable is so small (only 16 bytes per
gigabyte-sized dirty segment) it seems unlikely that the situation will
ever occur in practice.
I'll put a critical section around it --- seems the easiest way to
ensure a panic ...
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера