Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jIDDM-00030M-H4 for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Mar 2020 15:17:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jIDDL-0001E9-8T for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Mar 2020 15:17:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jIDDK-0001E2-Qi for pgsql-hackers@lists.postgresql.org; Sat, 28 Mar 2020 15:17:35 +0000 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jIDDE-0001xC-Kn for pgsql-hackers@postgresql.org; Sat, 28 Mar 2020 15:17:33 +0000 Received: by mail-lj1-x243.google.com with SMTP id w1so13222577ljh.5 for ; Sat, 28 Mar 2020 08:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=b1utWJMkQ/TDXmPM6UG+IDuYRzsLsdgVxVQionz3bYQ=; b=PhTaLjgWoSA71kI7YCXHSz4u73lXFExnJPkc5pmTZrvHfY1Kx71r1f3j+pc8OfQ/KW kJC8EnexWTj2JNMt1/4J+DSl1HBuwkRLL2rf/saGi5T+Ihc/kSZHIGtTMkyo1bABOkiE 2AoHXZo482pRCnn6xwZUTjmzGX2jCQUmRhkwTn56jQ2ui9zD1vgx+sfnTcrZy+tDRJa7 SGrqEpvHKYhWyd69KNM/YSuNVVKujgu0yIZha2aUV+NprhBoCUVC7zSHxYeSw7N0mpX8 Hd9ju8kT3cFttjQsSrg/PNgeRv8trz8dKujcvSIyquegthmbe3lB5+Wrf/DgAlCzn/Eo Jhmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=b1utWJMkQ/TDXmPM6UG+IDuYRzsLsdgVxVQionz3bYQ=; b=aqd1pK4oNnV3QNeilrHcb7/AyaoPRSYfXwCqU4AckU6vzy+Va9Yw1xSi2g6cVgkLr6 GVkmWDLKH9JovDXRjxCva8EBUkLi6z3mzX/78zk875iHdwwhprrtnAZhnPysONBO5W2n w+HgUcO27cySEfi2VLmxoqcFy4i2zZ7qgN1sBVzNOC/ejgvhvKhkRzGNYF/uE9A5UQa5 k1EUXUe8/LXQ7w/Gcj0JJKPxNwqSN9SaiRdP3XC6yOUAgRsIxC2vBMS6fWsBd+yId/TO iTHzSlRVxghgdDptN6N1Xu8n36MDYQ8Pqwg98lrXL8ht0ZBLaLSXg2Yzk3HoHZdzocvf qujA== X-Gm-Message-State: AGi0PuYwaF1EJauSCkYbpUr7BCpQaAxpVa+dQyM4STyHsmemKQsFvf7M ClyAyGyA6u/05wDXfWXnJeg= X-Google-Smtp-Source: APiQypLs0oQjkvxc1Wvf2XTtvGr/zLcszKEOh2xIcPovkHFgW4ezzZo2XMnb2r5iM1qhJU3R6v660w== X-Received: by 2002:a2e:87cc:: with SMTP id v12mr2489933ljj.127.1585408646941; Sat, 28 Mar 2020 08:17:26 -0700 (PDT) Received: from nol (82-64-124-11.subs.proxad.net. [82.64.124.11]) by smtp.gmail.com with ESMTPSA id o192sm2367044lfa.89.2020.03.28.08.17.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Mar 2020 08:17:25 -0700 (PDT) Date: Sat, 28 Mar 2020 16:17:21 +0100 From: Julien Rouhaud To: Amit Kapila Cc: robertmhaas@gmail.com, PostgreSQL Hackers Subject: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch) Message-ID: <20200328151721.GB12854@nol> References: <5b71ad52-68c6-08cb-6408-31307e9e6f10@oss.nttdata.com> <20200319153129.GA36079@nol> <762d4ee8-9710-cdcd-e661-b5c79aaa9bf0@oss.nttdata.com> <20200328133827.GA12854@nol> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200328133827.GA12854@nol> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, Mar 28, 2020 at 02:38:27PM +0100, Julien Rouhaud wrote: > On Sat, Mar 28, 2020 at 04:14:04PM +0530, Amit Kapila wrote: > > > > I see some basic problems with the patch. The way it tries to compute > > WAL usage for parallel stuff doesn't seem right to me. Can you share > > or point me to any test done where we have computed WAL for parallel > > operations like Parallel Vacuum or Parallel Create Index? > > Ah, that's indeed a good point and AFAICT WAL records from parallel utility > workers won't be accounted for. That being said, I think that an argument > could be made that proper infrastructure should have been added in the original > parallel utility patches, as pg_stat_statement is already broken wrt. buffer > usage in parallel utility, unless I'm missing something. Just to be sure I did a quick test with pg_stat_statements behavior using parallel/non-parallel CREATE INDEX and VACUUM, and unsurprisingly buffer usage doesn't reflect parallel workers' activity. I added an open for that, and adding Robert in Cc as 9da0cc352 is the first commit adding parallel maintenance.