Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSxV0-000782-BB for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Sep 2021 08:21:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mSxUx-0002uc-Sv for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Sep 2021 08:20:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSxUx-0002uT-Kd for pgsql-hackers@lists.postgresql.org; Wed, 22 Sep 2021 08:20:59 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSxUq-0000MP-Ro for pgsql-hackers@postgresql.org; Wed, 22 Sep 2021 08:20:58 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 31E2C5C00FE; Wed, 22 Sep 2021 04:20:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 22 Sep 2021 04:20:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=7DU13JsdLIh6q5vuynXHUBqd+13SkxdU2xb3G5LNH /U=; b=dRa+NnYA6NNvEVPDhdWo9kJISZaspcmP610PXHZ8kj8SKv0iqdgrdLTEa Moyi/pte/3CvoBu6uxuL25v9f/DZMhyqgvbGbxHp1K7XcAc/E3jfexPW/sXy4t9Z mre2B8/M/sFd7gqpvCO3ukNixv8Qjk7tHfd9vu2A1lBYFa7r9Vn0Mrx5cTbTCvWb dflMClb8dW/eHvO8QkIcNPnGXxhYVsAoyLwECmdk7VLmIxEgpeVVS3Mlewzj1IdU tkXSGn3LG8sIn1RBkwPRiLQrqhDgj/Xv3UENyVIN9dEF+W6fxowCvBLaZQrhPm1d dGHQAWmunOwrQt2PhuIClLSPooSeQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeijedgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefheenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhephfefleefueevuddvffeh jedtjeejgfelhfdtvdffheeludetudegfeeftdffffejnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Sep 2021 04:20:49 -0400 (EDT) Subject: Re: Proposal: Save user's original authenticated identity for logging To: Michael Paquier Cc: Jacob Champion , "pgsql-hackers@postgresql.org" References: <4a87886f034c713c056c43850f55e6e0ba50d8b5.camel@vmware.com> From: Peter Eisentraut Message-ID: <2dba8b35-c607-ae30-07d2-610886aff897@enterprisedb.com> Date: Wed, 22 Sep 2021 10:20:47 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 22.09.21 09:39, Michael Paquier wrote: > On Wed, Sep 22, 2021 at 08:59:38AM +0200, Peter Eisentraut wrote: >> I noticed this patch eliminated one $Test::Builder::Level assignment. Was >> there a reason for this? >> >> I think we should add it back, and also add a few missing ones in similar >> places. See attached patch. >> >> [...] >> >> { >> + local $Test::Builder::Level = $Test::Builder::Level + 1; >> + > > So you are referring to this one removed in c50624c. In what does > this addition change things compared to what has been added in > connect_ok() and connect_fails()? I am pretty sure that I have > removed this one because this logic got refactored in > PostgresNode.pm. This should be added to each level of a function call that represents a test. This ensures that when a test fails, the line number points to the top-level location of the test_role() call. Otherwise it would point to the connect_ok() call inside test_role().