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 1utpqZ-00Edoh-8o for pgsql-general@arkaria.postgresql.org; Wed, 03 Sep 2025 15:56:32 +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 1utpqY-00AD1b-Co for pgsql-general@arkaria.postgresql.org; Wed, 03 Sep 2025 15:56:30 +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 1utpqX-00AD1T-Jk for pgsql-general@lists.postgresql.org; Wed, 03 Sep 2025 15:56:30 +0000 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1utpqT-000NNF-27 for pgsql-general@lists.postgresql.org; Wed, 03 Sep 2025 15:56:29 +0000 Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id 475E27A0025; Wed, 3 Sep 2025 11:56:24 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Wed, 03 Sep 2025 11:56:24 -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=fm3; t=1756914984; x=1757001384; bh=rDD/111+Gc7zA+UNIgH1qs/zekHSqCRNWhvR0YwxZX4=; b= bfgGBCXU8IDXInCP6GkZxPka62rYJLzEMoDAv6TraWf7FwrsTnLaYrRZlWlSBq1e +U4L8xB/dhgQroYXzwOduC290BQB7Va7uLYTqY9WXtzzSaOMQbRfKuy36htP/yi9 YdN/cpJXmqRaUep08CIjZCS2aw2H93srmL2XSjHFPNtq/Q+QvEjjLywFjE+Bky3z cbnEMeKWEw99LEQLGu1BaxC8BWScsHPpTZMnZg01IZ+jFUeusioyYdQKF7/ZjF7N vY1mBNN4JQbdES6cxwX7yw/+0Q9cALmndYhkD5Zbnbk9f19XPr7tVpEbSaIGUUNk kGUMNfrYl8CrA37McZJjWQ== 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=fm1; t=1756914984; x=1757001384; bh=r DD/111+Gc7zA+UNIgH1qs/zekHSqCRNWhvR0YwxZX4=; b=EF0PzfLPdA5J+sFp9 WH2Q3k0qOb7aC09Ci54R+LurH7ybIQdTX/lNzosELtxJ8naWs6HOH2r5MXO9a/g8 azam4Gy/Rw0sA9gIkAJXphkNy18b5bQsyokSY6Hc05QsQm1TDNEM1+BcFIhhJBvz JlXXg/YOHO7hnW6JJhS0RoH7iJj+ubxmu6rUydw1KvDeSOt5r4UNNRENJFDfhg9L 6LdZa2TahsYUrp117TSL4kqtIufqvNGLlgmKWy2fFISzAEINVWGHEYFW4MJEiegn KK6eVxVWU2qAxEc3JkKf8Hy4u8JnrNsRNrpOQQseUF0Y2Ed+0fn9EaVWGIfSlObv iDKLw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdefheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvd ejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgv rhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepleegveekkeekueeigf dtveeileeuhfefudefteekjeffkeejueejheegheegkedtnecuffhomhgrihhnpehpohhs thhgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhn sggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrlhgsrh gvtghhthdrughrvghsshesphhoshhtvghordguvgdprhgtphhtthhopehpghhsqhhlqdhg vghnvghrrghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 Sep 2025 11:56:23 -0400 (EDT) Message-ID: <4f8c37af-96ed-487d-892c-e4b0fdd662ec@aklaver.com> Date: Wed, 3 Sep 2025 08:56:22 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Q: limit the length of log file entries? To: =?UTF-8?Q?Albrecht_Dre=C3=9F?= , 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 9/3/25 08:40, Albrecht Dreß wrote: > Hi all, > > I wonder if it would be possible to limit the length of individual log lines being written to the log file. > > Background: > I have a PL/PGsql DB function 'addval(_id text, _data bytea) RETURNS VOID'. When a broken bytea is passed as 2nd parameter, something like > > albrecht@test FEHLER: ungültige hexadezimale Ziffer: »r« bei Zeichen 28 > albrecht@test ANWEISUNG: SELECT FROM addval('hopp', '\xbroken') > > is printed in the log file. This is fine and very helpful in this case, but I have a “friendly user” who transmitted a broken hex string of ~100 KBytes as second parameter, resulting in a log line of this size which is not really readable and when done frequently quickly fills the logs. > > The log settings are, inter alia > > log_parameter_max_length = 256 > log_parameter_max_length_on_error = 256 > log_error_verbosity = TERSE Did you reload the server after making the above changes? Did you take a look at output from: https://www.postgresql.org/docs/current/view-pg-settings.html for appropriate settings name to see if something is overriding the settings you changed? > > but seem to have not the desired effect in this case. Did it have any effect? > > I use PostgreSQL version 17.6-1.pgdg13+1 on Debian Trixie. > > Thanks in advance for any help, > Albrecht. -- Adrian Klaver adrian.klaver@aklaver.com