Re: How to deinitialize a connection for background worker
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: How to deinitialize a connection for background worker |
| Дата | |
| Msg-id | 3357370.1737479891@sss.pgh.pa.us обсуждение |
| Ответ на | How to deinitialize a connection for background worker ("ISHAN CHHANGANI ." <f20200230h@alumni.bits-pilani.ac.in>) |
| Список | pgsql-hackers |
"ISHAN CHHANGANI ." <f20200230h@alumni.bits-pilani.ac.in> writes:
> I am working on a project which requires me to create a background worker. This worker checks some array(shared
memory)every second and then connects to the database mentioned within the array. That is I want to connect to
differentdatabases using the same background worker without killing it.
You can't really. There is no part of our catalog-access
infrastructure that is designed to support this, and there are bits of
cached state all over the system that will misbehave if you try.
You found some of it, but there is plenty more.
I'd suggest letting the worker process die and spawning a new one
if you need to redirect its efforts to a new database. If that
seems too expensive, rethink the design that requires you to do it.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера