Re: Feature freeze date for 8.1 - Mailing list pgsql-hackers

From
Subject Re: Feature freeze date for 8.1
Date
Msg-id web-96187855@mail3.doruk.net.tr
Whole thread Raw
In response to Re: Feature freeze date for 8.1  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
On Mon, 2 May 2005 18:47:14 +0300 (EEST)Heikki Linnakangas <hlinnaka@iki.fi> wrote:

>FWIW, I've been bitten by this problem twice with other
>applications.
>
>1. We had a DB2 database with clients running in other
>computers in the network. A faulty switch caused random
>network outages. If the connection timed out and the
>client was unable to send it's request to the server, the
>client would notice that the connection was down, and open
>a new one. But the server never noticed that the
>connection was dead. Eventually, the maximum number of
>connections was reached, and the administrator had to kill
>all the connections manually.
Are you pleased from this feature on DB2 ? I think you
will say no :-)

>2. We had a custom client-server application using TCP
>across a network. There was stateful firewall between the
>server and the clients that dropped the connection at
>night when there was no activity. After a couple of days,
>the server reached the maximum number of threads on the
>platform and stopped accepting new connections.

Yes, because your firewall drops only connectiona between
clients and firewall, not database.

>In case 1, the switch was fixed. If another switch fails,
>the same will happen again. In case 2, we added an
>application-level heartbeat that sends a dummy message
>from server to client every 10 minutes.
>
>TCP keep-alive with a small interval would have saved the
>day in both cases. Unfortunately the default interval must
>be >= 2 hours, according to RFC1122.
Yes..

>On most platforms, including Windows and Linux, the TCP
>keep-alive interval can't be set on a per-connection
>basis. The ideal solution would be to modify the operating
>system to support it.

How will we do this ?

>What we can do in PostgreSQL is to introduce an
>application-level heartbeat. A simple "Hello world"
>message sent from server to client that the client would
>ignore would do the trick.

This couldnt be not forgetten that a clients can have more
than one connection to database and one of them is lost..

Best Regards,

Adnan DURSUN
ASRIN Bilişim Hiz.Ltd.


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [pgsql-advocacy] Increased company involvement
Next
From: "Marc G. Fournier"
Date:
Subject: Re: [pgsql-advocacy] Increased company involvement