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 1tntKm-003IIq-1b for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2025 05:54:52 +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 1tntKm-00EykB-5R for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2025 05:54:50 +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 1tntKl-00Eyk2-Ra for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2025 05:54:50 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tntKi-0006vM-1H for pgsql-hackers@postgresql.org; Fri, 28 Feb 2025 05:54:49 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-439a4fc2d65so17361465e9.3 for ; Thu, 27 Feb 2025 21:54:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740722087; x=1741326887; darn=postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=yKz8YxNSMCsNOWUmdP0tnpHY8w072hsztz0JZTkagAU=; b=PLSFa/gC8MJNiSUoUlJAgoVqHV0+/QrcPlpyNf9czsozwztzzPAbFHigAslk4hxaPV P2sLI3aKhh4S2xST2NKv/F9Ln8lvcbL6bhPZivpBEo1MZ7mVHvI5M7i048jKKXdFqfRR HoqSEN0ow3yxoZBrKku88AwsDc++xgEVSgbpMrzas9EPeKeeGoRo8Zna2ka8OFbVJBHC PV6VLC1bdH+ErPHnVumUqRmJ+c9VOfRpV3UEmNjFQ6FPvMb/nvTMLb0H726Ae4pdMgyD gacHpCX38VzWYPRuDE1oiFCmx204R6zy0U1yhQBzCB8muDWBEMn/qEj1Dh7UWDnkuVx3 5FsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740722087; x=1741326887; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yKz8YxNSMCsNOWUmdP0tnpHY8w072hsztz0JZTkagAU=; b=jm/hqPK9i7FxEjL71myCp5woYOQmXfmiL9ffso16sho1LhNU9U9OObse/s6I2zH6q0 tKWEMujJM9DzB+gGwawaTxt9Gw8KFrjBx/NR6xXEWG6wE7fFj8o8G4qTjt/jRiYRVuQ8 SzocJcsJH1GuyHRUaViCyEuA7MtlB+GZ9PtmUltUDESVSWlfAP0YBtb3Rm2kc5ZsZygD 1pRegatKXOpWcPGqSDnymEPfd8D9zK9+vsrTgVK8SEOEYQXL5XHlD1qI/Oz0nTuuTTub QzVZqCtAy9T8AtQZHvw6xZW59VyX+7F3yT6+M3eGm5+0+SkKsqXfwjfUGVYO0M1tzi02 g08g== X-Forwarded-Encrypted: i=1; AJvYcCVmKiMtf6rRwQSV6aDnEDDcc5qi0uPgSkpprbcRswWzb81dMy0Rst35rjYjeSskMEQTDFp1r+weN4Vaq4dG@postgresql.org X-Gm-Message-State: AOJu0YxAoKLX0ujr9lvxdRJJ9r7eQqnljtOeDAwjK6Cc1lFO27iyWvrD 7DlNS8FhGMcGFnVwmiLLx8aZVSdnyp376ulq3oK8v8BTnTm1fgW2 X-Gm-Gg: ASbGncum3VqNUzY64lP+MXCKvNiCSv8wUxRTJ6MnJ1RRJPJ5YlDcXaFA9kx3zTMQF5F vLvUUvDU2o4JkWDvddB+5f3pR7ViSEmvMpGyqCwPV20pMCxmsXfCgDGQkkzLxZBrOprDJc9oitz BFwE4H79awYvLuHF/bV542LZxdkGSbpEwcql+8hXHxR9nPay+kEZ8I/xGp3Pgu48TjFiNnXKvCD 7LTQmlGtNLgFkLoacpH5cLuDyb1U57m96ox6FHjdwxYUep0iEnNhQD6ZUi3RKNduUbReE+da6wP kWUmY5UC0iw63bGkRyexdjR8BKmeOmDF0WK8wxE/WOSGJWAPkiump3oFInXDDk2F9w84iSmPnjz bq37aonxGIzXzbhM6cj/Py9qI2zLzY/Q9xRJz3lRhecRLErXSIJK95D2I4Q== X-Google-Smtp-Source: AGHT+IGb4iRLnjyaxWclZC7KEAXISBhh6q0Rb3CnNt83yt554T0j0qcBa3tc/Yl2KE+7Sxl6WNPHKw== X-Received: by 2002:a05:6000:1786:b0:390:e85b:a8f6 with SMTP id ffacd0b85a97d-390ec7ce749mr1833839f8f.21.1740722086603; Thu, 27 Feb 2025 21:54:46 -0800 (PST) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-181-182.eu-west-3.compute.amazonaws.com. [15.237.181.182]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-390e4795d30sm4143260f8f.10.2025.02.27.21.54.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2025 21:54:45 -0800 (PST) Date: Fri, 28 Feb 2025 05:54:44 +0000 From: Bertrand Drouvot To: Melanie Plageman Cc: Andres Freund , Fujii Masao , Guillaume Lelarge , Pg Hackers , Daniel Gustafsson , andrey.chudnovskiy@microsoft.com, Jelte Fennema-Nio , Jacob Champion Subject: Re: Log connection establishment timings Message-ID: References: <65fe2d68-a214-40f0-80a8-56ca7323ad5c@oss.nttdata.com> <7d3fcftmqsm2vounbkmkqnwbqkovsizgdkow46qo7nunau4q2n@pyavjiltbqnu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Thu, Feb 27, 2025 at 05:55:19PM -0500, Melanie Plageman wrote: > On Thu, Feb 27, 2025 at 11:30 AM Andres Freund wrote: > > > > On 2025-02-27 11:08:04 -0500, Melanie Plageman wrote: > > > > > However, since that is a bigger project (with more refactoring, etc), > > > he suggested that we change log_connections to a GUC_LIST > > > (ConfigureNamesString) with options like "none", "received, > > > "authenticated", "authorized", "all". > > > > Yep. > > I've done a draft of this in attached v7 (see 0001). Thanks for the patch! > It still needs polishing (e.g. I need to figure out where to put the new guc hook > functions and enums and such) yeah, I wonder if it would make sense to create new dedicated "connection_logging" file(s). >, but I want to see if this is a viable direction forward. > > I'm worried the list of possible connection log messages could get > unwieldy if we add many more. Thinking out loud, I'm not sure we'd add "many more" but maybe what we could do is to introduce some predefined groups like: 'basic' (that would be equivalent to 'received, + timings introduced in 0002') 'security' (equivalent to 'authenticated,authorized') Not saying we need to create this kind of predefined groups now, just an idea in case we'd add many more: that could "help" the user experience, or are you more concerned about the code maintenance? Just did a quick test, (did not look closely at the code), and it looks like that: 'all': does not report the "received" (but does report authenticated and authorized) 'received': does not work? 'authenticated': works 'authorized': works Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com