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 1jKOKy-0004SC-9h for pgsql-committers@arkaria.postgresql.org; Fri, 03 Apr 2020 15:34:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jKOKx-0008Se-0N for pgsql-committers@arkaria.postgresql.org; Fri, 03 Apr 2020 15:34:27 +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 1jKOKw-0008My-Qp for pgsql-committers@lists.postgresql.org; Fri, 03 Apr 2020 15:34:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKOKu-00046Z-PU for pgsql-committers@lists.postgresql.org; Fri, 03 Apr 2020 15:34:25 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 033FYNLY008868; Fri, 3 Apr 2020 11:34:23 -0400 From: Tom Lane To: Fujii Masao cc: Michael Paquier , Fujii Masao , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Include information on buffer usage during planning phase, in EX In-reply-to: <4e46867d-7183-ef3c-5299-755b4396e96c@oss.nttdata.com> References: <20200403025751.GB1759@paquier.xyz> <0fa34bc8-479e-61e8-94c0-9cdbc34ea0bb@oss.nttdata.com> <23095.1585884653@sss.pgh.pa.us> <4ecdae9c-fa0b-17b6-9166-0a45c396da22@oss.nttdata.com> <20577.1585920933@sss.pgh.pa.us> <1c26658b-fb09-3c4c-2eff-a61e86ab5316@oss.nttdata.com> <32174.1585925727@sss.pgh.pa.us> <4e46867d-7183-ef3c-5299-755b4396e96c@oss.nttdata.com> Comments: In-reply-to Fujii Masao message dated "Sat, 04 Apr 2020 00:25:05 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8866.1585928063.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 03 Apr 2020 11:34:23 -0400 Message-ID: <8867.1585928063@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Fujii Masao writes: > Attached is the patch that changes explain.c as follows (i.e., removes > Buffers lines at all) to make it more stable. > ln :=3D regexp_replace(ln, '\m\d+\M', 'N', 'g'); > -- In sort output, the above won't match units-suffixed number= s > ln :=3D regexp_replace(ln, '\m\d+kB', 'NkB', 'g'); > - -- Text-mode buffers output varies depending on the system stat= e > - ln :=3D regexp_replace(ln, '^( +Buffers: shared)( hit=3DN)?( re= ad=3DN)?', '\1 [read]'); > + -- Ignore text-mode buffers output because it varies depending > + -- on the system state > + CONTINUE WHEN (ln ~ ' +Buffers: .*'); > return next ln; > end loop; > end; Works for me. regards, tom lane