Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uHPCg-001isc-Rr for pgsql-hackers@arkaria.postgresql.org; Tue, 20 May 2025 15:48:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uHPCf-007Yvh-UU for pgsql-hackers@arkaria.postgresql.org; Tue, 20 May 2025 15:48:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uHPCf-007YvV-KF for pgsql-hackers@lists.postgresql.org; Tue, 20 May 2025 15:48:29 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uHPCd-002mHc-0L for pgsql-hackers@lists.postgresql.org; Tue, 20 May 2025 15:48:28 +0000 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-6020ff8d54bso1475332a12.2 for ; Tue, 20 May 2025 08:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747756106; x=1748360906; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tUi9ln1bQworCuGbvwfmoz9oFSpMH/n8/looTHgXHQA=; b=gqkWSpOrDW933Z7LPkT6fbMzDCxRBSRMwwY3ApZSKbvxlJKFWeW0TaZhZtdq8GceJF dufTJJrs4YoLF8eqhTUOBN5MvW5XjcReJrvaO/sLY526Q7RTLiRN1xob6bT2eriGSukv eqGhnLeJI9vBhvSA2307a15MaMEmoYhFhgAy92DHhQA1Kei+fOsFBGyEZHOP0S6+s1ks B/g3ij6pdSXETjZ9w8qpeuruXOgT9vOexmQUGMv1Uy9haz5Gj6KoxX8O6zAfKWpNbmmB d/hGqXZND0YWMMCh4yBgEyCy6uCelHB1tbDtcDQpS39STi6XkefYVdacrzvKZ3mdiZhE XpPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747756106; x=1748360906; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tUi9ln1bQworCuGbvwfmoz9oFSpMH/n8/looTHgXHQA=; b=n6ezW9AB+kb/saTQ2GVrA/5eNZK/rKrBY75xISUkVIMk/ARk1n2qq5Q/6cj0CBa/qI XMd72xhFfrwI8hppOQOUufGij4Otz84h3NhIp5UlmX8HbW2DTl/ZwUY3IjbAv+IHBXse FfL3/NgPPsuhwWYIIJzAzm1DHQEvn21mHPIyJpwxzI8Sq7T5cEPnBmlatJsuONlVX24r KObjuCMcgkmrB+cU5sNPad5T+9BZmaJxI2N4RCYZybfZWrl0FWd4ompggiJ4FcaCk0Ct ry8U1EH12oLO51hUFKBSZYor+5lalJcw/4zMmEiUu2D3SLyfQJLWjycmtuAAtDb+0IRy 0Vrg== X-Forwarded-Encrypted: i=1; AJvYcCV9fZnuAJDNtPXKENRqQsyfl6muh0gJ3J3Sn6l1WeRO6Nn1hJjKCfq7aaY2Nrx6wzuzCVsduc2Owpl5aFvg@lists.postgresql.org X-Gm-Message-State: AOJu0YwrtGwhSWsL50AOgzheg0XMYIPImJreXztQVN6qtLHxw0a1uBuY tI7rZucnhy75UCGeTrLkm6lI/lDTVlSTYJuyLWp63J5SixYt7NLCIICMmvejcY03BBvTvG+ZI0b bioJKqxX+HkQVAqkVvICI7dRmv272mWo= X-Gm-Gg: ASbGncs+89zJ8qQgffO6f2sKwWZgXynkVfQINZlDHdfnxdT5NOlq5rwF+dELbWRfdcJ yoyGPXsDibEXulHk7C5zsxuO0UQrfFR9KieO4hWLU9MvN0bSpj3w6gUToKz88L0tLYBzADcedKm zE0qO0fCPLWgq3T0mL2GB09olVwSOPZMOv X-Google-Smtp-Source: AGHT+IFr7LP9CpsQcK+1pBVLoQpGsImqINDFelY4GBcrzOaqrAOmJ8vN2pYa0KjZ4sFFm6ZS6nBnYWRA2uje6J3Tmcc= X-Received: by 2002:a05:6402:3552:b0:5fa:f7ee:191f with SMTP id 4fb4d7f45d1cf-600991bc783mr14501535a12.32.1747756105858; Tue, 20 May 2025 08:48:25 -0700 (PDT) MIME-Version: 1.0 References: <97cfc252-9a26-489e-b458-999ac5589224@aklaver.com> <525679.1744300832@sss.pgh.pa.us> In-Reply-To: <525679.1744300832@sss.pgh.pa.us> From: Melanie Plageman Date: Tue, 20 May 2025 11:48:13 -0400 X-Gm-Features: AX0GCFt4Y4mhuJudG2lG9pBilWa4w82cJrmmnEtD-qJa6TAt-kidFn9FO0i0RcM Message-ID: Subject: Re: Capturing both IP address and hostname in the log To: Tom Lane Cc: Adrian Klaver , "Tefft, Michael J" , pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000d805280635932db1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d805280635932db1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 10, 2025 at 12:00=E2=80=AFPM Tom Lane wrote= : > Melanie recently committed a patch (9219093ca) that purports to > generalize our log_connections logging ability: > > Convert the boolean log_connections GUC into a list GUC comprised of > the > connection aspects to log. > > This gives users more control over the volume and kind of connection > logging. > > The current log_connections options are 'receipt', 'authentication', > and > 'authorization'. The empty string disables all connection logging. > 'all' > enables all available connection logging. > > I wonder if it'd be reasonable to remove the separate log_hostname GUC > and fold it into this infrastructure, and while doing so make it > possible to log either or both of the client IP address and hostname. > (For that matter, I think there is interest in being able to capture > the server IP address too, cf 3516ea768. You might wish to log the > IP address only once, not in every log line.) Seems reasonable to me. I'd be willing to move such a thing forward but would want to see the feature requestors' specific desired behavior (e.g. an option for each of hostname, client ip address, and server address?). Also, if they write a WIP patch at least to config.sgml, it would also help me gauge how serious of a request it is or, rather, how satisfactory a solution a log_connections option is. Perhaps there are people who absolutely love log_hostname and don't want to see it deprecated as a separate GUC? I also think folding in log_disconnections as a "disconnection" option makes sense. I do have some anxiety that a very long list of options will anger users -- but I suppose that ship mostly sailed. - Melanie --000000000000d805280635932db1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Thu, Apr 10, 202= 5 at 12:00=E2=80=AFPM Tom Lane <tgl= @sss.pgh.pa.us> wrote:
Melanie recently committed a patch (9219093ca) that purports to
generalize our log_connections logging ability:

=C2=A0 =C2=A0 Convert the boolean log_connections GUC into a list GUC compr= ised of the
=C2=A0 =C2=A0 connection aspects to log.

=C2=A0 =C2=A0 This gives users more control over the volume and kind of con= nection
=C2=A0 =C2=A0 logging.

=C2=A0 =C2=A0 The current log_connections options are 'receipt', &#= 39;authentication', and
=C2=A0 =C2=A0 'authorization'. The empty string disables all connec= tion logging. 'all'
=C2=A0 =C2=A0 enables all available connection logging.

I wonder if it'd be reasonable to remove the separate log_hostname GUC<= br> and fold it into this infrastructure, and while doing so make it
possible to log either or both of the client IP address and hostname.
(For that matter, I think there is interest in being able to capture
the server IP address too, cf 3516ea768.=C2=A0 You might wish to log the IP address only once, not in every log line.)

Seems reasonable to me. I'd be willing to move such a thing forward = but would want to see the feature requestors' specific desired behavior= (e.g. an option for each of hostname, client ip address, and server addres= s?). Also, if they write a WIP patch at least to config.sgml, it would also= help me gauge how serious of a request it is or, rather, how satisfactory = a solution a log_connections option is.

Perhaps th= ere are people who absolutely love log_hostname and don't want to see i= t deprecated as a separate GUC?

I also think foldi= ng in log_disconnections as a "disconnection" option makes sense.= I do have some anxiety that a very long list of options will anger users -= - but I suppose that ship mostly sailed.

- Melanie=
--000000000000d805280635932db1--