Re: Keep-alive?

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Adam H(dot)Pendleton" <fmonkey(at)fmonkey(dot)net>, <Michiel_Lange(at)actuera(dot)nl>
Cc: <mark(at)nsa(dot)co(dot)il>, <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Keep-alive?
Date: 2003-10-09 07:45:14
Message-ID: 03AF4E498C591348A42FC93DEA9661B84C5AD5@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

> -----Original Message-----
> From: Adam H.Pendleton [mailto:fmonkey(at)fmonkey(dot)net]
> Sent: 09 October 2003 03:25
> To: Michiel_Lange(at)actuera(dot)nl
> Cc: mark(at)nsa(dot)co(dot)il; pgadmin-support(at)postgresql(dot)org
> Subject: Re: [pgadmin-support] Keep-alive?
>
>
> On Wednesday, Oct 8, 2003, at 07:27 US/Eastern,
> Michiel_Lange(at)actuera(dot)nl wrote:
>
> > I think that adding an option to PgAdmin "send keepalive packages
> > every <##> seconds" would be a valuable addition...
> >
>
> I think this would be a much more viable solution than
> re-connecting to
> the database.

No network level solution is viable for us unless we want to maintain
our own replacement for libpq, besides which, even if we did implement
some kind of icmp heartbeat, there's no guarantee it would help because
it would be completely independent from any TCP connections - a firewall
might still decide to close what it thinks are idle connections inspite
of icmp messages.

Istm that there are 2 options:

1) Implement reconnects in pgConn.cpp. The major objection to this is
that the server may not notice that the original connection is dead, and
thus a number of dead connections may build up until the connection
limit on the server is reached. I think this problem is actually a bit
irrelevant - as things stand at the moment, if you connection drops, you
manually reconnect as soon as you need to. How many of us ever go and
look for dead connections on the server, and even if you did, and found
some, what would you do about it short of restarting the server?

2) Implement SQL level keep alives. This could a be simple SELECT
version() query that is executed automatically after n seconds of
inactivity.

Thoughts?

Regards, Dave.

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Adam H. Pendleton 2003-10-09 12:31:13 Re: Keep-alive?
Previous Message Adam H.Pendleton 2003-10-09 02:24:48 Re: Keep-alive?