Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] listening addresses

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] listening addresses
Date: 2004-03-21 16:46:16
Message-ID: 405DC6D8.4040100@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches

Tom Lane wrote:

>Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>  
>
>>A small problem with it was reported to me a couple of days ago - user 
>>had firewalled off all IP6 traffic. The stats collector happily bound 
>>and connected to the socket, but all the packets fell in the bit bucket. 
>>They found it quite hard to diagnose the problem.
>>    
>>
>
>  
>
>>Possible solutions that occurred to me:
>>. an initial "hello"-"yes i'm here" exchange to validate the address
>>    
>>
>
>That one seems reasonable to me.  Seems like it would take just a few
>more lines of code in the loop that tries to find a working socket to
>check that we can send a byte and receive it.  You'd have to be careful
>not to block if the socket is indeed not working ... also, is it safe to
>assume that a byte sent with send() is *immediately* ready to recv()?
>
>  
>

This patch attempts to implement the idea, with safety in case the 
packet is not immediately available.

comments welcome

cheers

andrew

Attachment: stats.patch
Description: text/plain (1.6 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-03-21 17:23:39
Subject: Re: [HACKERS] listening addresses
Previous:From: Tom LaneDate: 2004-03-21 16:39:49
Subject: Re: Unbalanced Btree Indices ...

pgsql-patches by date

Next:From: Andrew DunstanDate: 2004-03-21 16:58:23
Subject: listening addresses
Previous:From: Claudio NatoliDate: 2004-03-21 09:36:34
Subject: win32 build patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group