| От | Markus Wagner |
|---|---|
| Тема | how to synchronize database operations? |
| Дата | |
| Msg-id | 200208151636.02712.magnus@gmx.de обсуждение исходный текст |
| Ответы |
Re: how to synchronize database operations?
|
| Список | pgsql-general |
Hi, when I (re)create my db from within C using libpq I do the following: I open "template1" and execute "drop database ..." and "create database ...". This worked fine for some time. However, I encountered some synchronization problem: When recreating, which includes the drop command, I get immediately before the create command the error "template1 is accessed by other users". Then, when doing the same thing again, there is no db to drop, and the create call succeeds. It seems that the create command comes too early for the postmaster. Simply adding a delay of some seconds would not be that good. How can I synchronize that? Just trying to open template1 again and again? A code snippet would help very much. Thank you, Markus
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера