Re: Stats Collector Error 7.4beta1 and 7.4beta2

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, Kurt Roeckx <Q(at)ping(dot)be>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, akavan(at)cox(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Stats Collector Error 7.4beta1 and 7.4beta2
Date: 2003-09-05 16:32:12
Message-ID: 3F58BA8C.3070108@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
>> Redhat 7.1 says
>> The file descriptor sockfd must refer to a socket. If the
>> socket is of type SOCK_DGRAM then the serv_addr address is
>> the address to which datagrams are sent by default, and
>> the only address from which datagrams are received. If
>
>> Looks like the test is obsolete. Any objections to remove it? Do people
>> agree that it's a bugfix that can go into 7.4?
>
> The test is not "obsolete"; we understood when we wrote it that it
> should theoretically be redundant with the kernel-level restriction.
> But there may be systems out there that fail to make the check promised
> by the HPUX and Linux manpages. So I'd prefer to leave it in there if
> we can. I don't want to rip it out simply because we don't understand
> why it's failing on Adam's setup.
>
> What I'm wondering about is whether we are comparing the right number of
> bytes ... have both address structs been reported to have the same
> length? Maybe we need a min().

I disagree. If getsockname(), getpeername() or recvfrom() return
different address length's, it'd be more an indicator that the addresses
ARE different anyway. Just because an IPV4 address doesn't have that
feature is no reason to assume that addresses of different length are
the same if they match over min() bytes.

If you want to continue to check the addresses and feel that HPUX and
Linux manpage claims about kernel behaviour aren't enough, then we have
to make it a specific check per "supported" AF. For now, that'd just be
AF_INET and AF_INET6, and the default case bailing out with an error.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-09-05 16:36:50 Re: thread safety
Previous Message Mendola Gaetano 2003-09-05 16:29:12 Re: Planning to force reindex of hash indexes