Re: client socket TIME_WAIT state after PQfinish

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>
Cc: Guillaume Du Pasquier <guillaume(dot)dupasquier(at)sensometrix(dot)ch>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: client socket TIME_WAIT state after PQfinish
Date: 2010-09-27 16:34:01
Message-ID: AANLkTik17K1vawqZeFB0E-chO4PrfQKYabqo0A053qDW@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 27, 2010 at 12:22 PM, Nicolas Barbier
<nicolas(dot)barbier(at)gmail(dot)com> wrote:
> According to the Two Generals' Problem [1], one of the sides
> necessarily doesn't know whether the other side has received its last
> packet. Therefore, TCP lets one of the sides sit in TIME_WAIT status
> for as long as any packets could in principle survive on the network
> (typically defined as 2 minutes on IP networks IIRC), and potentially
> disturb a new connection between the same (dst IP, dst port, src IP,
> src port) combination.

In other words, this is the way TCP is designed to work, not something
specific to PostgreSQL.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-09-27 16:36:44 Re: Improving prep_buildtree used in VPATH builds
Previous Message David E. Wheeler 2010-09-27 16:25:31 Re: trailing whitespace in psql table output