| От | dan@sidhe.org |
|---|---|
| Тема | Sharing database handles across forked child processes |
| Дата | |
| Msg-id | 52562.199.172.169.21.1194973351.squirrel@localhost обсуждение исходный текст |
| Ответы |
Re: Sharing database handles across forked child processes
|
| Список | pgsql-general |
How does Postgres handle sharing database handles across child processes? That is, if I have a process that opens a connection to the database and then forks a few child processes, what happens? Can the child processes safely use the handle? If one child closes the handle, what happens to the handle in all the other children? The parent? This isn't a great thing to do, I realize, but I'm wedging database access into an existing heavily fork-bound perl program, so my hands are somewhat tied architecturally. (If it means I have to constantly test to see if the handle's valid, and may have to deal with a handle randomly going away on me, I can handle that -- I'm more worried about data corruption and deadlock problems here, stuff I can't reasonably catch at the application level) -Dan
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера