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 1lROAU-00013z-Rx for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Mar 2021 23:53:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lROAT-0001eC-Ql for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Mar 2021 23:53:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lROAT-0001e5-Ju for pgsql-hackers@lists.postgresql.org; Tue, 30 Mar 2021 23:53:05 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lROAR-0003QK-78 for pgsql-hackers@lists.postgresql.org; Tue, 30 Mar 2021 23:53:05 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D4BD92054; Tue, 30 Mar 2021 19:52:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 30 Mar 2021 19:52:59 -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:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=hJsLL4+ZfNYDlskSWS2iTsSgHkppGX0rzNdYsDG1UIw=; b=tpaPhRwr klGgMwK+qZZjtwo/WOh034DD9KUFryVCYuAP57MTPivRCcDUQ8P+qPKDVjj7QQhO 2RbnEtbEpBooSeM5yW8Lm/uP/oOEZmzRvXlQpkfXnB8TH1YNNtzMH3i8JcJJ4uG5 FyZDCzQ3Fl3h17ThoA8/h5BYnj3OOefmOug7IhNLj1wRe6fIQxvAw1KWnOYvV+um WvrCbfxi/unJMdFSgLJFOA3komGx+mA0u3NtXi+pn06N/RuNRGP+ht2gX0yxuto+ s/Ow5P4OCixYZ/BZSEjoDe3mM7KS7U8f5DToPl8vDpu2ldsDeqg9ts4IBjvSDdXa ZDwmxY8O3NXVBw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeiuddgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgoteeftdelqddtudculddvtddmnecujfgurhepff fhvffukfggtggugfgjfgesthekredttderudenucfhrhhomhepfddkrghlvhhhvghrrhgv segrlhhvhhdrnhhoqdhiphdrohhrghdkfdcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnoh dqihhprdhorhhgqeenucggtffrrghtthgvrhhnpeehkeegiedvueffleehtdeuffetjeej tdetteeukeduvdegudeihfefffevffdtudenucfkphepudeltddrleehrdduledrleehne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id B382224005E; Tue, 30 Mar 2021 19:52:57 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 163AF2A0A6F; Tue, 30 Mar 2021 20:52:55 -0300 (-03) Date: Tue, 30 Mar 2021 20:52:55 -0300 From: "'alvherre@alvh.no-ip.org'" To: "iwata.aya@fujitsu.com" Cc: "tsunakawa.takay@fujitsu.com" , 'Kyotaro Horiguchi' , "tgl@sss.pgh.pa.us" , "k.jamison@fujitsu.com" , "pgsql-hackers@lists.postgresql.org" Subject: Re: libpq debug log Message-ID: <20210330235255.GA17949@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Okay, pushed this patch and the new testing for it based on libpq_pipeline. We'll see how the buildfarm likes it. I made some further changes to the last version; user-visibly, I split the trace flags in two, keeping the timestamp suppression separate from the redacting feature for regression testing. I didn't like the idea of silently skipping the redacted fields, so I changed the code to print NNNN or SSSS instead. I also made the redacting occur in the last mile (pqTraceOutputInt32 / String) rather that in their callers: it seemed quite odd to advance the cursor in the "else" branch. I refactored the duplicate code that appeared for Notice and Error. In that function, we redact not only the 'L' field (what Iwata-san was doing) but also 'F' (file) and 'R' (routine) because those things can move around for reasons that are not interesting to testing this code. In the libpq_pipeline commit I added 'pipeline_abort' and 'transaction' to the cases that generate traces, which adds coverage for NoticeResponse and ErrorResponse. -- Álvaro Herrera 39°49'30"S 73°17'W