logo       

Re: Keep-alive support: msg#00000

Subject: Re: Keep-alive support
For pgsql-hackers, here is the original thread (I think this mail is appropriate for this list, correct me if I'm wrong):
http://archives.postgresql.org/pgsql-interfaces/2006-11/msg00014.php

Leandro Lucarella escribió:
Thanks all for your responses, but this is *not* a libpqxx issue, just because I'm doing the test using plain libpq. Anyways, I have a little more information about my problem and it's no libpq either =)

The problem is shown when the time between the wire is unplugged and the use of the connection is not long enough to let the keep-alive kill the connection. Then the connection becomes active and the TCP timers looks like go back to the defaults, because there is data in the socket queue to send. So it's an OS/TCP issue.

I don't see any way to control this without using an application-level keep-alive, so I appreciate any ideas and suggestions =)

Hi! It's me again =)

I was thinking about solutions for my problem, and I've come up with (mainly) this 3 ideas:

1) Add TIPC[1] support to Postgresql. This is the cleaner solution, I think, but the the hardest and could take a lot of time, but if I use some of the other hacks in the meantime and if there is interest on adding this to Postgresql officially, I can evaluate working on this seriously. What I'm sure I don't want is to keep my own Postresql fork.
So, what do you think about this? Or where should I ask?

2) Use a "monitor" dummy connection to postgres, do the TCP keep-alive tunning and select() the socket waiting for a disconnection. Since this socket will never be active (is that right? Or Postgresql sends any kind of control information on an idle connection?), the TCP keep-alive will be enough to determine if the connection is lost in a short period of time. If there is no problem with this, I think it could be a quick and not-so-nasty solution =)

3) Use Heartbeat[2] or make some other specific solution like it (probably using TIPC too). I don't like it at all, since I'm looking for a more self-contained solution, but it's another option.

I really appreciate any thought on this, and any suggestions.

TIA.

[1] http://tipc.sourceforge.net/
[2] http://www.linux-ha.org/HeartbeatProgram

--
Leandro Lucarella
Integratech S.A.
4571-5252

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe