Redhat 5.2/6.0 PostgreSQL 6.5 With both an ODBC application & a local native libpq application, when the app is idle for a long period of time, the connection to the backend gets lost. Is there some kind of postmaster setting to keep alive? Other ideas? Ken
"Ken J. Wright" <ken@ori-ind.com> writes:
> app is idle for a long period of time, the connection to the backend gets
> lost. Is there some kind of postmaster setting to keep alive? Other ideas?
There is not, but you could try patching the backend to set the
KEEPALIVE option on the TCP socket --- see StreamConnection() in
src/backend/libpq/pqcomm.c.
If that helps, I think it'd be reasonable to accept the patch as
an #ifdef'd chunk of code with a config.h variable to control it.
I'm a little hesitant to just drop it in unconditionally --- I don't
know whether KEEPALIVE is supported by all platforms...
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера