Re: How does an application recognize the death of the postmaster

Поиск
Список
Период
Сортировка
От Guy Rouillier
Тема Re: How does an application recognize the death of the postmaster
Дата
Msg-id D4D1632DC736E74AB95FE78CD6090079012623@mtxexch01.add0.masergy.com
обсуждение исходный текст
Ответ на How does an application recognize the death of the postmaster  (Geoffrey <esoteric@3times25.net>)
Список pgsql-general
Geoffrey wrote:
> How do folks handle the death of the postmaster in their applications?
> Assuming the postmaster dies after an application has connected to the
> database, but before it makes a request.  What should I look for?
> Currently our application that's in development does not handle the
> situation well.  What we want to do is gracefully (as possible)
> shutdown the application.

Really depends on your run-time environment.  Running Java under the
JBoss app server or the Tomcat servlet container, you can configure data
sources so that they test a connection before parceling them out to
applications.  If a pooled connection has gone dead, the container will
discard it and get another one for you.  That will allow you application
to be blissfully unaware of momentary glitches.  However, that obviously
won't help if your database is down hard for an extended period.  Both
containers can be configured to give up trying and return an error to
your app.

--
Guy Rouillier



В списке pgsql-general по дате отправления:

Предыдущее
От: "Larry Rosenman"
Дата:
Сообщение: Re: out of memory for query result
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: out of memory for query result