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 1u2qvK-006rWC-Ns for pgsql-general@arkaria.postgresql.org; Thu, 10 Apr 2025 12:22:27 +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 1u2qvI-00B8Wp-Ke for pgsql-general@arkaria.postgresql.org; Thu, 10 Apr 2025 12:22:24 +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 1u2qvH-00B8Wa-Mc for pgsql-general@lists.postgresql.org; Thu, 10 Apr 2025 12:22:24 +0000 Received: from mx0b-004aa801.pphosted.com ([148.163.140.28]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u2qvE-0043LL-1R for pgsql-general@lists.postgresql.org; Thu, 10 Apr 2025 12:22:22 +0000 Received: from pps.filterd (m0384004.ppops.net [127.0.0.1]) by mx0b-004aa801.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 539NJJeb024804 for ; Thu, 10 Apr 2025 07:22:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=snapon.com; h= content-type:date:from:message-id:mime-version:subject:to; s= s2048a; bh=cYqmJq7um0q9J3KkX4VNLXqMUJ0mo1Nz3wcCQWSNRO0=; b=tKMYg JeQkETEHfHLHZTkc/6iD1xKeqD3BbyMvenJm0BEn51AvqViEIRMqzvfanJTxoVMA L8ywu5BgiwdzoUE+O0lQ9hlYtl1w/GmhMGTEDYbcD8jqmUZNPVmv4SevGb/ZL5Ac ZONusKnUv5WCw3kt1Qlkqmb2n+PzCh3MOWD3mhooPVSg95Wtxd+ylYIxQaateJvF KUVKUqAgttMqNgusCOJfnOLxyc02f/1PawvSclVt620f6fkx3SJQdvJaw+QNHOgr K0P2B8tDzRjB6kCb7TIwDYNk4paTM1IRyu0dqMGq6WaEEQFydixalIlRGCqsUegK g7FivhOmJzglLxf4Q== Received: from sn4pr2101cu001.outbound.protection.outlook.com (mail-southcentralusazlp17012010.outbound.protection.outlook.com [40.93.14.10]) by mx0b-004aa801.pphosted.com (PPS) with ESMTPS id 45umejes7m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 10 Apr 2025 07:22:19 -0500 (CDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ME25iKFHTKEtPTQAn0ZPxy5IYKb+n/lE7Bc/ZgbCIg3ilSJDZDt6+5wyfyIWJgwUYRFRhZggVDDZD02/uQ+4hNpTvPoIJLW70wQVgdecjOnZXKaSZXBmCIwM5ejASyH+hcEmY4n67cxE2tVGi/spU2Y8Y6HJqm3gT7/6Ick5MZxLFTR96gHLlfJEIjRj0yq4/4ps9x16PuPpv4NEMSlMGHO5mRHaHJLDFd7Sgs6lMUqJ3K+gOMRxwj+oOYCJg19Vo3KfQaXf5G2flXGfcihb0+DFj3Qlcd2Uk8rV9GtvhPWU7++5xCIwdGurwDI/L9NtjNjazXKvo6MAqWKAuQkl9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cYqmJq7um0q9J3KkX4VNLXqMUJ0mo1Nz3wcCQWSNRO0=; b=jPpoB9hOkCKYTdu/gCH0aWlJHKzN7uLLsK6tTk4WNp5+ugg5Eg1wnFZHjMrNKEyTcPRDT3BnOS5ccsYPGWsyLbxiR2HNiBT42aeafNfzoyTnbSnLJQ+cTerG/TMGZIBcN1qYu3W4qkk793XzL/3KHG+QoIhXqVpeXPGWmmFvt6FOXekrOklVl1w64w5+FC7ivByvtcQCU0qQwpSD3DX7UlAy+8YrdtPFERyiWvyk4aOo8U4C0IPeCf6YsQSAUq8FE/kXt78EBjIsb1qP1aXtZrkb2UQBkFoIvYFOIO2CUYbFeJ0rItHzjVLW/SEmw8SpgKdr8X+F9qOxS4AfB3oJHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=snapon.com; dmarc=pass action=none header.from=snapon.com; dkim=pass header.d=snapon.com; arc=none Received: from BN8PR04MB5508.namprd04.prod.outlook.com (2603:10b6:408:55::10) by IA3PR04MB9678.namprd04.prod.outlook.com (2603:10b6:208:512::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8606.32; Thu, 10 Apr 2025 12:22:16 +0000 Received: from BN8PR04MB5508.namprd04.prod.outlook.com ([fe80::3d9c:e17d:9001:29f6]) by BN8PR04MB5508.namprd04.prod.outlook.com ([fe80::3d9c:e17d:9001:29f6%4]) with mapi id 15.20.8606.033; Thu, 10 Apr 2025 12:22:16 +0000 From: "Tefft, Michael J" To: "pgsql-general@lists.postgresql.org" Subject: Capturing both IP address and hostname in the log Thread-Topic: Capturing both IP address and hostname in the log Thread-Index: AduqEospS0uWvdtUSXSIVGevXq4GJQ== Date: Thu, 10 Apr 2025 12:22:16 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN8PR04MB5508:EE_|IA3PR04MB9678:EE_ x-ms-office365-filtering-correlation-id: a4cb5cae-7771-42d8-10ec-08dd782a54c9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|376014|366016|38070700018|8096899003|13003099007; x-microsoft-antispam-message-info: =?us-ascii?Q?GO3KClP/HXRQZa3LDzOatrV2k7Xe87L8W0/9gijVyJI9+zuu2lGFuoy6L2Oo?= =?us-ascii?Q?QB+Ah0tdCKfft7oElpQJRnBYJnzlUyJqbb6583t+8//DP5vnCcRKYstv5WOr?= =?us-ascii?Q?PX4PHpK1pXDgB5bVxe/Cs8Pk3FXH4SvnV9rL2kkAcHPoMDM9OvyZUjR5Crrb?= =?us-ascii?Q?HtzJzKAP4VXy2t49Urxxw80bobBynC1k9C4oFJNciWvcdqU4uS2RMbOirAtZ?= =?us-ascii?Q?WlNPQ7aJVikCDZPcZ288k3oR4jxjEmv15L/UzDZCElUIU9FC63Ky6lEZl4gz?= =?us-ascii?Q?u6NJ4Z/dgA92ZGxUClAsoD+J2dmTIOrGmmvYNbDFaHySpZ0TBMBgbeB7XPYT?= =?us-ascii?Q?g8n2xt6BlicIsrjUfQuCLTj1rMPuU7SZAY5gUB2STqLSlmFtiJZR1wSl7urC?= =?us-ascii?Q?Z52GSGm0hBMLngyuVNT6LlOKURtcT3XUf5nv+HDJdJZkAH/SGeVf+nwGcb98?= =?us-ascii?Q?wx+/k5760JVzXTnUg828USDO3X2sITZU8VEQUNLe1+EkrnkT6b7wk9rZqJGf?= =?us-ascii?Q?/VCnGqTVEmsKdJdbyqFB4npL0n7pB+sugyueP7RnUTKFNBYtxwzOk7Ps/dsS?= =?us-ascii?Q?gmmUhw2Y585qRw+snIBD9Wc3Qu0tS8Qk/vLrwVBZzGm+6iWelPBjgQ3OgMDW?= =?us-ascii?Q?zdLMIHJaPwArYIXfBVcVNwfTXlurJxbI19XyYCx/aYdX2S9nTUYgCeBv5soS?= =?us-ascii?Q?nHnci2IUQyWzblQne0IydYgbMpcDp0F7zwfuU3jvOVqJS/5xTlcXYND7WDZs?= =?us-ascii?Q?IUMjxTJA7jXyjZf3Izki6GkxY4g6Q/ujYFyfKkBbuhFgq9dQCx3XkzSVnPt0?= =?us-ascii?Q?XxkNShJO7KMJjAA8AGoqi8HkNbFG73hV3WGHEgieZOBfEAO7emcXzRi6eyaU?= =?us-ascii?Q?8fzmpEjeF7ntGieauVHMJvSv585FqFyQefwPaf8b1EEwXV8UqR+wplZ0a2BO?= =?us-ascii?Q?o8AKptj1yvTb0StOcUk0YHEaVxOtKJboyt/xrz5ySA2dPHE171OpKe70pXFx?= =?us-ascii?Q?Nr1QP27c/G67zHINFXN2W98oAxcpZZ/3afEisiz2UZtr8PpVMJ15oVaee3BB?= =?us-ascii?Q?9rO0xy5K2jdYGTm/xT+wKZAWKbenT5+82CPhpGGfuXebtcbm427TN7Zb/q1P?= =?us-ascii?Q?Z0RURmiZe3ki8SuCrYxalJBylNDYBbL+5Uhy4oTYwlu106T0tPcgo9u3hOGF?= =?us-ascii?Q?e/rAEP4HNGEVyZ67fY0RvyKrX2RtGnWP1VhlaLy4eLarZT8ZEiDSN0fXSvrQ?= =?us-ascii?Q?h5jUTgi6ZaaNWxgQqj4SPxzcSFL89pzVxgTXeFLHRSjv2eICCOvpMkEd6iWZ?= =?us-ascii?Q?xYlPVlQ4ThbdQpbhfDRZU0cHOuFtn7OhGDcbpY5IO3c3bbgJUFpO1J0FqVfv?= =?us-ascii?Q?Oos16+eujD7LMflONnPIb6dZZ0Iwg1e7tRbfA/93k/Vac1NtpFJivP1Phzhl?= =?us-ascii?Q?+sL/UwIzk/EqtpVDrJZ/QitejmTHj6rZnSkUGPQ/yrrf7hlk+UcDbw=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR04MB5508.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(38070700018)(8096899003)(13003099007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4RWsHDwSHkoxZZzsbu/FjMe3BXdeB9pB6bEguJQK7hA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?nd2496NuD0x8uMabRdPsXRIIf/WvJ2oBDra0dwpomQLFCn9OZTMSz27ffwka?= =?us-ascii?Q?QiIEiXPhLxJm7BAs5h9A++8ln3jKIA23u/g72Vf7jnC2EoTpDMCGRR+vjvSb?= =?us-ascii?Q?gLfJWKSjpLLoLOAQTTiKljSpd0Y3hX8DlwO18lmv1p0eHJboJwOu0SHw8C41?= =?us-ascii?Q?ZSl4/dqjo6+ZEF9TO34HXuANm+WxIRGPpkXmKi6oQQnpkC87RYHcuw2MAI+Y?= =?us-ascii?Q?6AiIn1k+qGvzNk9MnEp73BypezPYLTMgoFnGqgNQ7qd8MAHEOXxcBmLGMuMB?= =?us-ascii?Q?u5eHG99yCsAQ6to//6SCXnmyc+iz57Dy+dszrqhYZSjtn1HnGs9coUEa58EK?= =?us-ascii?Q?PFlHzaq1iMZI8XShudgBCRZY0VybttPS+q7qd+GT7ov1dLuOh6HqDfFBOF85?= =?us-ascii?Q?VhWDiceXEe+M8kTqBsgdajrDKQdCInrLxo23csSB/OzUJi6h7ToK5UbgeQoo?= =?us-ascii?Q?Frigw8mf8Jf6lcPZ+Q6GbnHsbrPDJW+fIoicTQDy/updmwOOZo/d56Umfyop?= =?us-ascii?Q?fu+or/sVHvjc8+slBT+HSFDtND55D6jmBn2RcKPUVx2+2kv8G59Q3gHPA24+?= =?us-ascii?Q?05gOhJprkqrJQ38DnjU/N7ouwM71FfTo8s0oWlQ14e+5i1ah14g4LKNBUtyX?= =?us-ascii?Q?5aw4rbzXjLc/arMnDoF2p7pj2q6s6r6yRRGCBH6c?= Content-Type: multipart/alternative; boundary="_000_BN8PR04MB550874EE58EC715656C3D3D2D0B72BN8PR04MB5508namp_" MIME-Version: 1.0 X-OriginatorOrg: snapon.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR04MB5508.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4cb5cae-7771-42d8-10ec-08dd782a54c9 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Apr 2025 12:22:16.2834 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9cbb18c7-7b64-4d6a-953b-09ec023c8c08 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SkfNn5c28KcTQmTL+XQTCx0qjXaWhMTcL6vog/g9CvqR1x0lj/RBNBxbV6osp66jJ9Uu5JZF/EocsK+0BziKV01VgKHYGqOFp7hOkr287+E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA3PR04MB9678 X-Proofpoint-GUID: g53JWdooGXOCWztJBE0fz2Nho3hk5mGG X-Authority-Analysis: v=2.4 cv=L8wdQ/T8 c=1 sm=1 tr=0 ts=67f7b7fb cx=c_pps a=5L1ZokDb34JZJib1CqSWiA==:117 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=XR8D0OoHHMoA:10 a=epTmVMiNAAAA:8 a=hDuK7A0agciRfkYi_eIA:9 a=CjuIK1q_8ugA:10 a=_2sYgq99wlcA:10 a=q9exU-SzD0kA:10 a=yMhMjlubAAAA:8 a=SSmOFEACAAAA:8 a=cxD5aVULbZicsEGoPhYA:9 a=d7dferAgHzc7rBHY:21 a=gKO2Hq4RSVkA:10 a=UiCQ7L4-1S4A:10 a=hTZeC7Yk6K0A:10 a=frz4AuCg-hUA:10 X-Proofpoint-ORIG-GUID: g53JWdooGXOCWztJBE0fz2Nho3hk5mGG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-10_02,2025-04-08_04,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 clxscore=1011 bulkscore=0 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 phishscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504100090 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_BN8PR04MB550874EE58EC715656C3D3D2D0B72BN8PR04MB5508namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The documentation for log_hostname says: log_hostname (boolean) By default, connection log messages only show the IP address of the connect= ing host. Turning this parameter on causes logging of the host name as well= . Note that depending on your host name resolution setup this might impose = a non-negligible performance penalty. This parameter can only be set in the= postgresql.conf file or on the server command line. https://www.postgresql.org/docs/14/runtime-config-logging.html We have set log_hostname ON and we get hostname reported - but we do not ge= t IP address. We would like to capture both. Since the doc says "Turning this parameter on causes logging of the host na= me *as well*" we were hoping we would capture both, but we are not getting = what we expect. Is there a way to capture both IP address and hostname in the log messages?= Or must we choose "one or the ootehr"? Thanks, Mike Tefft (We are using PG14 and PG16, but the docs say the same thing, as does PG17) --_000_BN8PR04MB550874EE58EC715656C3D3D2D0B72BN8PR04MB5508namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

The documentation f= or log_hostname says:

log_hostname (= boolean)

By default, connect= ion log messages only show the IP address of the connecting host. Turning t= his parameter on causes logging of the host name as well. Note that dependi= ng on your host name resolution setup this might impose a non-negligible performance penalty. This parameter can= only be set in the postgresql.conf file or on the server command= line.

 

https://www.postgre= sql.org/docs/14/runtime-config-logging.html

 

We have set log_hos= tname ON and we get hostname reported – but we do not get IP address.= We would like to capture both.

Since the doc says = “Turning this parameter on causes logging of the host name *as wel= l*” we were hoping we would capture both, but we are not getting = what we expect.

 

Is there a way to c= apture both IP address and hostname in the log messages? Or must we choose = “one or the ootehr”?

 

Thanks,<= /span>

Mike Tefft

 

(We are using PG14 = and PG16, but the docs say the same thing, as does PG17)<= /p>

--_000_BN8PR04MB550874EE58EC715656C3D3D2D0B72BN8PR04MB5508namp_--