Re: Logging which interface was connected to in log_line_prefix

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>, Cary Huang <cary(dot)huang(at)highgo(dot)ca>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Logging which interface was connected to in log_line_prefix
Date: 2024-05-12 12:25:24
Message-ID: 28327ff2-39c0-46a0-9886-acc9d4475487@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01.05.24 19:04, Greg Sabino Mullane wrote:
> Thank you for taking the time to review this. I've attached a new
> rebased version, which has no significant changes.
>
> There is a comment in the patch that states:
>
> /* We do not need clean_ipv6_addr here: just report verbatim */
>
> I am not quite sure what it means, but I am guessing it means that
> the patch does not need to format the IPv6 addresses in any specific
> way.
>
>
> Yes, basically correct. There is a kluge (their word, not mine) in
> utils/adt/network.c to strip the zone - see the comment for the
> clean_ipv6_addr() function in that file. I added the patch comment in
> case some future person wonders why we don't "clean up" the ipv6
> address, like other places in the code base do. We don't need to pass it
> back to anything else, so we can simply output the correct version, zone
> and all.

clean_ipv6_addr() needs to be called before trying to convert a string
representation into inet/cidr types. This is not what is happening
here. So the comment is not applicable.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2024-05-12 12:26:10 Re: Why is citext/regress failing on hamerkop?
Previous Message Peter Eisentraut 2024-05-12 12:21:15 Re: Logging which interface was connected to in log_line_prefix