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 1lh1Z7-0006Ii-0l for pgsql-hackers@arkaria.postgresql.org; Thu, 13 May 2021 02:59:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lh1Z4-0005u1-LU for pgsql-hackers@arkaria.postgresql.org; Thu, 13 May 2021 02:59:06 +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 1lh1Z4-0005tt-Bt for pgsql-hackers@lists.postgresql.org; Thu, 13 May 2021 02:59:06 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lh1Z1-0006de-Ah for pgsql-hackers@lists.postgresql.org; Thu, 13 May 2021 02:59:05 +0000 Received: by mail-pl1-x629.google.com with SMTP id v13so13613135ple.9 for ; Wed, 12 May 2021 19:59:02 -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=WIpE6Ws0/wO0sN1pPn4WaQTUA2Hdw7Fztrw//u4xFP8=; b=JIbv79QnSw4+nAGAPSPhRjSCRpLsH2vrN5cShf96RArACKhbV7zmK3/fE5So5rKFRk /XsSVbiJ/cdeyX7lp6OSUZf58qWB5SF9HImz4QgCTLFpqm4jSxMlwYch6bB6HXLMm8zz DqW/TK4WVM88PoDx06dyggHk74xUZNb/RpVPJN96yNRkVlkXQi2C6Ia7RKjyTo9BigEI gDSRilFfQZCkyyKSSYSkNxs3tK+CTJpvxX+q0ukL6K7wJnLx6Cr8vdr2KcQFTsIZ8oy6 eUdrQbLTgihK3zm3DB6pdcPyYo0qLay/3i1iTWQyn7VjhtAA8keeN2yZp7eMwxx/fplo 6aJA== 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=WIpE6Ws0/wO0sN1pPn4WaQTUA2Hdw7Fztrw//u4xFP8=; b=HftqBJ25S6NZRVrZzZQPkSNMgQSBPEaGFddHq2SB6qJKKI9mGI/Ro9FkC+hI6k+FRi ct7m5UUkaGGfWHXU51LKAesZrFsG+L0Wyeo61J2j3lZQbqYHH0MDa/ArOdAVLL8xMBJx p+m6WGKs2JB+p59PgBu4JBVxZoWDeIAu0f+v1QQTmHXQ/wNkQGRznGcV8OTmodP1n1mt as+kWUwCWqX5tC+CQYkCCEVU0wTivimSyORm6/d3t/857Bw2ZLNgadnxIF8HIfNcsdX3 6OCJ+Logp1r/1tq+e1nSJyisnz0QLE04u1+Y/utBDN/e/OThZ308Ueus3jMM3l/44bOv QzIg== X-Gm-Message-State: AOAM5303h/0qcxrTNr40OU+jNT9L0i1Wj9OWZWCiAmDPiqw0LOtagO9j Vn+Zm+UGIrNgewINpiif4eE= X-Google-Smtp-Source: ABdhPJzrS64hSmafeMwqh1ZIc3EUHMoBh9p2yN3gh+ANAfa+3gVI7GumsBhLddsOh3KjWsiORG0hYA== X-Received: by 2002:a17:902:9685:b029:ef:70fd:a5a2 with SMTP id n5-20020a1709029685b02900ef70fda5a2mr9251217plp.20.1620874741122; Wed, 12 May 2021 19:59:01 -0700 (PDT) Received: from nol (2001-b011-0008-3a8c-638b-a3db-2ad1-c7d1.dynamic-ip6.hinet.net. [2001:b011:8:3a8c:638b:a3db:2ad1:c7d1]) by smtp.gmail.com with ESMTPSA id y66sm920811pgb.14.2021.05.12.19.58.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 19:59:00 -0700 (PDT) Date: Thu, 13 May 2021 10:59:24 +0800 From: Julien Rouhaud To: Kyotaro Horiguchi Cc: magnus@hagander.net, masao.fujii@oss.nttdata.com, michael@paquier.xyz, andres@anarazel.de, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, sfrost@snowman.net, bruce@momjian.us, myon@debian.org, peter.eisentraut@enterprisedb.com, pgsql-hackers@lists.postgresql.org Subject: Re: compute_query_id and pg_stat_statements Message-ID: <20210513025924.xzfvaycfpme6koad@nol> References: <20210513.112629.407758843298621458.horikyota.ntt@gmail.com> <20210513.113056.577948943557799213.horikyota.ntt@gmail.com> <20210513023920.raegzbpqpowncbot@nol> <20210513.114934.535938760583149042.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210513.114934.535938760583149042.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, May 13, 2021 at 11:49:34AM +0900, Kyotaro Horiguchi wrote: > At Thu, 13 May 2021 10:39:20 +0800, Julien Rouhaud wrote in > > On Thu, May 13, 2021 at 11:30:56AM +0900, Kyotaro Horiguchi wrote: > > > At Thu, 13 May 2021 11:26:29 +0900 (JST), Kyotaro Horiguchi wrote in > > > > At Thu, 13 May 2021 10:02:45 +0800, Julien Rouhaud wrote in > > > > Yes, I know. So I said that "if not yet called". I believe any "real" > > > > alternative query-id provider is supposed to be hooked "before" > > > > pg_stat_statements. (It is a kind of magic to control the order of > > > > plugins, though..) When the alternative provider generated a query_id > > > > (that is, it has set jstate), pg_stat_statment doesn't call the > > > > in-core JumbleQuery and uses the givin query_id. > > > > > > Forgot to mention, I think that the state "query_id provider is active > > > but it has not assigned one to this query" can be signaled by > > > jstate= and query_id = 0. > > > > I assume that you mean "third-party query_id provider" here, as the core one > > will always return a non-zero query_id? > > Right. > > > I guess it could work, but a lot of people are complaining that having > > compute_query_id = [ off | on | auto ] is too confusing, so I don't see how > > having "off" means "sometimes off, sometimes on" is going to be any clearer for > > users. > > I don't get it. It read as "people are complaining the tristate is too > confusing, so I made it tristate"? No, the consensus was for having a tristate, so I implemented it, and now people are complaining that it's too confusing. > For the second point, so I said that the variable controls whether the > "internal" query-id pvovider turn on. It is more clearer if the name > were something like "use_internal_query_id_generator". I don't see how it's really different. If I understand correctly, you're suggesting that use_internal_query_id_generator = off can mean either - off - on if pg_stat_statements or similar extension is configured but no custom query_id provider is configured, and in any case it will always be displayed as off with no other new GUC. Is that correct?