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 1lUKY9-0004wH-Vd for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Apr 2021 02:37:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUKY8-00070t-2n for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Apr 2021 02:37:40 +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 1lUKY7-00070m-Pc for pgsql-hackers@lists.postgresql.org; Thu, 08 Apr 2021 02:37:39 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lUKY5-0008KH-OU for pgsql-hackers@lists.postgresql.org; Thu, 08 Apr 2021 02:37:38 +0000 Received: by mail-pf1-x42e.google.com with SMTP id y16so721183pfc.5 for ; Wed, 07 Apr 2021 19:37:37 -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=Mw5EDFZ/qZy1jw5NmXBOp7AAHqfjNtz+wPRS/lNQpe0=; b=PPs5C5ks994KHastw0balCLdGgkzEYMhIfYdBcsg6idoL8Bj+dp79VZ/gkvV1m44+h Cg2+liIcVFxRuHsdFAv66mVjMrfBRBEF6OjDGomlQM5jjOTGsvgmyQhCVPSmSBobam0N 3Qq/5HZkzLF9Czr4xHed75vuMHL/z4z9MAqt5NNfDDwS9OpY7bEUs+JLAoMBM3DVJHoR sBKQyLROADKWGEThuLtfc4EfWpPkKxciWf67vAfV4uXYD0IYPNF7S0I/XIwwmOyyuWSw RQK+XFEdvn8kKAH+FsQ3KCaqK2mTXoj8STMePHE30gIpSB79EKRDFOrExkeTdt5BUflJ Jgzg== 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=Mw5EDFZ/qZy1jw5NmXBOp7AAHqfjNtz+wPRS/lNQpe0=; b=o+boBOJSyNzvCeqdGk1TWMfBqQRWvdXKppgmCCWSZvZLBLMIUzad9fSvJO/HR7nEBS VWp816eOAOFCQDi+0v7127sot+oU/TrtgUMz5AIOKv0LEfxSjJxNrd/Zg6vR0nnqQdBP mimptRj7rwMfuumffQYC4Idebk+j/ioeXYKx4/5g/nVtoWUTiSmZfdUPMAp3T0mbYAD8 GR7bZ8fse+TFA7VbIkliVn1MHsSnzCBiwY9aac1i/1XryvArzVfYRX7XjCr5ZHDs3Hp6 4+Sg0vilexalVsHp+aGKbX2hSORNVHoY6oD0AiLAUuRETC13snebWsOCR8vBYiBuL64S FzwQ== X-Gm-Message-State: AOAM533u1ulB2VqxzEwhKTINHKdwRr7YJ84Omac+F1gt54tiGCqipxzt NEe66tx3thX5R0aauVKyPNY= X-Google-Smtp-Source: ABdhPJzX9/+D3m6veoqyYWX1zIZoXRJUhrDipkBHhCnIED+pIIsc65S5NN+QcDdbP+0sjNO50d58XA== X-Received: by 2002:aa7:8e9b:0:b029:244:9951:425b with SMTP id a27-20020aa78e9b0000b02902449951425bmr588068pfr.56.1617849456709; Wed, 07 Apr 2021 19:37:36 -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 b126sm22756134pga.91.2021.04.07.19.37.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Apr 2021 19:37:35 -0700 (PDT) Date: Thu, 8 Apr 2021 10:38:08 +0800 From: Julien Rouhaud To: Bruce Momjian Cc: Tom Lane , Nitin Jadhav , Alvaro Herrera , Hannu Krosing , Robert Haas , Pavel Stehule , Michael Paquier , torikoshia , Atsushi Torikoshi , Tatsuro Yamada , Tomas Vondra , Evgeny Efimkin , PostgreSQL Hackers Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view? Message-ID: <20210408023808.gp75kbrli5df7wkd@nol> References: <20210407181211.GB24239@momjian.us> <1646131.1617826550@sss.pgh.pa.us> <20210407202255.GD24239@momjian.us> <20210407215625.syzdpwew4j47hhgl@nol> <20210407223840.GE24239@momjian.us> <1730584.1617836485@sss.pgh.pa.us> <20210407233835.GF24239@momjian.us> <20210408004748.mhqds3v3nij35ihw@nol> <20210408005402.GG24239@momjian.us> <20210408023101.GI24239@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210408023101.GI24239@momjian.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Apr 07, 2021 at 10:31:01PM -0400, Bruce Momjian wrote: > On Wed, Apr 7, 2021 at 08:54:02PM -0400, Bruce Momjian wrote: > > > Unless I'm missing something this will output the query id in the next log > > > line? The new code should be added before the newline is output, and the comma > > > should also be output before the queryid. > > > > Yes, correct, updated patch attached. > > Patch applied. Thanks! And I agree with using query_id in the new field names while keeping queryid for pg_stat_statements to avoid unnecessary query breakage.