client socket TIME_WAIT state after PQfinish - Mailing list pgsql-hackers

From Guillaume Du Pasquier
Subject client socket TIME_WAIT state after PQfinish
Date
Msg-id EF883A8436897F4380CD4DA6E9CF88B60C2ABC241F@dc.sensometrix.local
Whole thread Raw
Responses Re: client socket TIME_WAIT state after PQfinish
List pgsql-hackers

Dear all,

 

Environement:

- OS : Ubuntu 10.04 LTS.

- DB:  postgresql 8.4.

- Connection to postgresql using sslmode = disable

 

Scenario :

1.       I use pgadmin to connect/disconnect to the postgresql server on port 5432 or

2.       I use a progam using libpq  and make PQconnectdb and PQfinish.

 

Bug:

 

In both cases, the client socket (pgadmin or my program) remains in TIME_WAIT state.

I have used wireshark to sniff the TCP protocol.

 

We have at the end of a connection:

 

Client                  Server

   --->    FIN,ACK  --->

   <---    FIN,ACK  <---

   --->      ACK    --->

 

This ends up in a TIME_WAIT state. The TCP protocol should be

 

Client                  Server

   --->    FIN,ACK  --->

   <---      ACK    <---

   <---    FIN,ACK  <---

   --->      ACK    --->

 

I suppose there is a bug in the postgresql server that do not send an ack to the client.

 

Could you please clarify this situation ? I am a bit lost.

 

Thank you,

 

Franck Lefort

 

 

pgsql-hackers by date:

Previous
From: Marios Vodas
Date:
Subject: Re: gist access methods parameter types
Next
From: Robert Haas
Date:
Subject: Re: A small update for postgresql.conf.sample