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 1lUOTD-0005Hl-ST for pgsql-committers@arkaria.postgresql.org; Thu, 08 Apr 2021 06:48:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUOTC-0004T7-QR for pgsql-committers@arkaria.postgresql.org; Thu, 08 Apr 2021 06:48:50 +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 1lUOTC-0004T0-Kw for pgsql-committers@lists.postgresql.org; Thu, 08 Apr 2021 06:48:50 +0000 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lUOTA-0002Kj-8J for pgsql-committers@lists.postgresql.org; Thu, 08 Apr 2021 06:48:50 +0000 Received: by mail-pg1-x535.google.com with SMTP id b17so709707pgh.7 for ; Wed, 07 Apr 2021 23:48:47 -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=CYubY7Z9Hiux3ztHC6+JRZ6A1+aH4CvkyaSJxdNXjNk=; b=tM75fAeTSVNYU3FKHxVbbKweHTlaZIjNhqFvsfkYDsEKslfW5D3estxf/EhLlKL/GY 3zcHOVjjyixdt50azSYqRYULrIV6ddBh4o0kFStYT0JrFpx9XQQR7RhshuYHe9AdL7jj ty/+q6taronG3V1TjPKZe/8b+saqqmCYqEM/8YmyfFkk9ijsojVDtdYFR2zbbLfqNjct 8u1EY7Y9ETmglzNo537MsIuhh87MARxSiBLUyjN328HMlxu92DLW2IBzG/QIHnpZhIht E9ppXu5UAUlySQ1mUp//siY7mwId4B/PZjBD1HRfr5vqd74EG0t/N95pwaQgIcpZMfHT ezNg== 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=CYubY7Z9Hiux3ztHC6+JRZ6A1+aH4CvkyaSJxdNXjNk=; b=PxibvYeaYyLCUUKtQUGyWES/1KvxuRfTNtnPnT6gmILFsheCi0gIn8r31hpeQgjjnZ IkgG0Bc+u8EMqRXb6qgZC6t765/3FPyk/C0mzHJrSITaiRcgRBW3WSZ09YlbF8Gk5Ksk G/ZcWFT2UuujqOSXCmY+zc/eRvmJIetKQMz/Xv0EQgMf6M28ky7vEA7scew+XtbqCEGx AuvEI2F/QY4Adi0URY/ogy+ugBPCccahEMQoc3R3XNOUPtRIjSno3s95GGLKLanqO1OI RH0ycHHiZMfvciTrwHkZyEFqIJLmiDVST3UsE28ctOoRNGxEMGh8rl8CulyOvz3k60vJ 4kOA== X-Gm-Message-State: AOAM533iGLtA6pZXumBQYPN4ZJk+1E4nM2PWTOtYCCtJdSFDyLGbLbni /NXsU5EV9Vyz1MuLBOOeBU4= X-Google-Smtp-Source: ABdhPJz2nh75i2ViOe+vThBJRyftbL1n3QflR9tinp/PoDbGHHqqCcWpIAjZex0W3rTC7Mfn3Hu9CQ== X-Received: by 2002:a62:1bd5:0:b029:1f9:2f83:2e82 with SMTP id b204-20020a621bd50000b02901f92f832e82mr6106261pfb.1.1617864526069; Wed, 07 Apr 2021 23:48:46 -0700 (PDT) Received: from nol (2001-b011-0008-9647-4c71-2a6f-a895-f450.dynamic-ip6.hinet.net. [2001:b011:8:9647:4c71:2a6f:a895:f450]) by smtp.gmail.com with ESMTPSA id y13sm16325897pgs.93.2021.04.07.23.48.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Apr 2021 23:48:45 -0700 (PDT) Date: Thu, 8 Apr 2021 14:49:19 +0800 From: Julien Rouhaud To: Amit Kapila Cc: Andres Freund , Bruce Momjian , pgsql-committers Subject: Re: pgsql: Move pg_stat_statements query jumbling to core. Message-ID: <20210408064919.bxqnzpi2ctt3rfzg@nol> References: <20210408051735.lfbdzun5zdlax5gd@alap3.anarazel.de> <20210408061102.xripofnfvqt7qcrg@nol> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 08, 2021 at 12:08:02PM +0530, Amit Kapila wrote: > On Thu, Apr 8, 2021 at 11:40 AM Julien Rouhaud wrote: > > > > That was indeed the problem. I think the best is to entirely ignore parallel > > workers in pg_stat_statements, > > > > I haven't studied this patch but I have a question here. We normally > do accumulate the stats from parallel workers for the purpose of > Explain Analyze, so won't ignoring them in pg_stat_statements a bit > inconsistent but if that is the case even before this patch then that > might be fine? I think that this patch shouldn't change pg_stat_statements previous behavior, and that the previous behavior was correct. It doesn't change the way we get instrumentation data from parallel workers, just avoid to have parallel workers call pgss_store and report multiple time the same activity. The only difference is that now pg_stat_statements won't setup instrumentation flags, but those should be inherited in parallel worker from the main process right?