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 1u2tk9-007U6F-77 for pgsql-general@arkaria.postgresql.org; Thu, 10 Apr 2025 15:23:05 +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 1u2tk7-00D8kl-Bb for pgsql-general@arkaria.postgresql.org; Thu, 10 Apr 2025 15:23:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u2tk6-00D8ka-Hm for pgsql-general@lists.postgresql.org; Thu, 10 Apr 2025 15:23:03 +0000 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u2tk3-004XpK-0t for pgsql-general@lists.postgresql.org; Thu, 10 Apr 2025 15:23:02 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id B3F5011400FE; Thu, 10 Apr 2025 11:22:57 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Thu, 10 Apr 2025 11:22:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1744298577; x=1744384977; bh=qjKRHboaYZ5hcsyfl5QPYOB13fqHH2/nC418wF7on+A=; b= T7M9Fmwz+WGmIVf1aviCdBcpqIyNew8bnw99zAmP9cZ1raFS996etex6oGFZHcqI UzWpXBCE4cgpO/W/lWSCAvoFDpAZ2kOHuEkqWCG/UtDF3ynqVi+HPdNO8lf/UcCK Xxl96VBjMqX5uoqWOsiVCEI/UmXUk2thgH9drkM3yjHYAQEUvbxbTz0PCeVkptl2 j5SYsDE/NVdscP75UbObEQE4O/OXpYPOeCJi2V69ttSuNzfUvG0ocCwU1DMKdjWn rnm1ZOSY88xtBuQlpVuiJ+3/kvYGEVr1BLfO5OO13QAaUS+d9DaYQ+iFPcXn+fH6 QVxRtGldnUK2vUJF4zysBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1744298577; x=1744384977; bh=q jKRHboaYZ5hcsyfl5QPYOB13fqHH2/nC418wF7on+A=; b=JpXTUeK1ZmtmNVFF3 uXN/lAn1tObwftfULD8/9ECieNfOGymzXFos2szitHv6KBDXeBZonLJntmgQrPxf RgBT1AWy6jZLRdRqSQ2+o/6paXg/mOTpnt1jEqKuH12T2NI7Q+tGKJCifmWQd0Dq gETLCLBa9KdnNOMgJiAULiM9EOyfwz6IO9HAdMFHhoQUp3y0S+ydxx4q16VWJvsr CD6L4mgtpDVMyPEA3IXAp1pa9lFPALpMizgPi+5m45Ly5HcPZTiAB+18+q/GMUu6 XIJb+i9/5gKQMHPibqG7KuJenWFaJ8q3UnjN8vdQn828x+XhIXLRzYQcviRjNXQ9 b2DNQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtdelvdeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddv jeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvg hrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeelgeevkeekkeeuiefg tdevieeluefhfedufeetkeejffekjeeujeehgeehgeektdenucffohhmrghinhepphhosh htghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnh gspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepmhhitghh rggvlhdrjhdrthgvfhhfthesshhnrghpohhnrdgtohhmpdhrtghpthhtohepphhgshhqlh dqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Apr 2025 11:22:56 -0400 (EDT) Message-ID: <97cfc252-9a26-489e-b458-999ac5589224@aklaver.com> Date: Thu, 10 Apr 2025 08:22:56 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Capturing both IP address and hostname in the log To: "Tefft, Michael J" , "pgsql-general@lists.postgresql.org" References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/10/25 05:22, Tefft, Michael J wrote: > The documentation for log_hostname says: > > log_hostname (boolean) > > By default, connection log messages only show the IP address of the > connecting 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 > get IP address. We would like to capture both. > > Since the doc says “Turning this parameter on causes logging of the host > name **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”? I see the same thing. It seems either or. > > Thanks, > > Mike Tefft > > (We are using PG14 and PG16, but the docs say the same thing, as does PG17) > -- Adrian Klaver adrian.klaver@aklaver.com