From: | "Guy Rouillier" <guyr(at)masergy(dot)com> |
---|---|
To: | "PostgreSQL List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How does an application recognize the death of the postmaster |
Date: | 2006-05-03 19:09:25 |
Message-ID: | D4D1632DC736E74AB95FE78CD6090079012623@mtxexch01.add0.masergy.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-05-03 19:12:39 | Re: out of memory for query result |
Previous Message | Larry Rosenman | 2006-05-03 18:57:40 | Re: out of memory for query result |