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 1lNXjY-0005bK-Kx for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Mar 2021 09:17:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lNUBX-0005aP-8i for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Mar 2021 05:30:03 +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 1lNUBX-0005aI-2B for pgsql-hackers@lists.postgresql.org; Sat, 20 Mar 2021 05:30:03 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lNUBV-0003j0-Bv for pgsql-hackers@lists.postgresql.org; Sat, 20 Mar 2021 05:30:02 +0000 Received: by mail-pf1-x42a.google.com with SMTP id x26so7305532pfn.0 for ; Fri, 19 Mar 2021 22:30:01 -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:content-transfer-encoding:in-reply-to; bh=sXr5uUiEPMJXFnlmHHQokGqGNOqjMbCxIIHrMmyxqMc=; b=kVUoF5e3l9YQZrDED4HFUsIJrtCzPi72iOWADy+1Thyd17eYbaNSDpsJVW8tNRoDDi yN3HqlaPb6UdJg2Vh7FmhZKK+ROjOpi/woWX06YXE1HLz98iVvilPev2WE0UpNeDBq7h 0Xn2/fBqHpNNH+2iXy9R6m3mXranH8+GOBm4NGrrsuysx869ZoI4LYa5OBpHmQlbnvRr D9yy8ln+KF8rccQhTt96d97xes3A3taqOd9LWh920dtP/rol11bVPlwJWxzN53x2g2xb Q2si/DBnU1tx6cnUQg1bZ7+ch2zYXuwQCbFMx6pf7hZHOH3zSaXKSgaQwcPICMAODCpz zr2w== 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:content-transfer-encoding :in-reply-to; bh=sXr5uUiEPMJXFnlmHHQokGqGNOqjMbCxIIHrMmyxqMc=; b=dynKHKE2QvAC60SbqA3AqTNv6qaGqWbCFk8DexT0Rlz6F+Mof/mAij/a9eLksDpVM9 NOrTJvG85nCg9hP3mouwgm9eDarqBZUw1GVqCMqXYEibrw5msp7OS5eNpCCWmzori779 2ntEEllH4fyfH3C9euwzsHUWcodxDy9tHJRYTuIp1hIzM66ODwudJHXDQSuqpPNtRL+k TY2yU1xLdtqcO3OpYWmy5HhDX0eUacGqjkH3uVYBj/sb3ylrtfGsg8V4h7VfPFIzsKYI 4q9IPVp4fduPk4YHdyiokT38tb/RyeKewibhS8t3cfx0FKnFtaenKaAOa+UZcIfE9qsJ O42w== X-Gm-Message-State: AOAM532JM0vK6dwie0Pd/3dvK4qoV/BhYIsrsKH78vAdH0fDW2J1ogFW borLOCLndcGa9u7xU8CJoVg= X-Google-Smtp-Source: ABdhPJwkD5riVOiSEEiC0+p0PTCNfO1NZETATi6nd62cn/HoGQPQq15QrwTnEUFaRmqDEW3wSGBFig== X-Received: by 2002:aa7:8187:0:b029:213:d43b:4782 with SMTP id g7-20020aa781870000b0290213d43b4782mr4186857pfi.26.1616218079330; Fri, 19 Mar 2021 22:27:59 -0700 (PDT) Received: from nol (2001-b011-0008-5a5e-b371-3c25-da0d-fd6e.dynamic-ip6.hinet.net. [2001:b011:8:5a5e:b371:3c25:da0d:fd6e]) by smtp.gmail.com with ESMTPSA id c2sm7258760pfb.121.2021.03.19.22.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 22:27:58 -0700 (PDT) Date: Sat, 20 Mar 2021 13:28:33 +0800 From: Julien Rouhaud To: Bruce Momjian Cc: Hannu Krosing , Robert Haas , Pavel Stehule , Tom Lane , Alvaro Herrera , 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: <20210320052833.ojsg2azbs5ahnlgi@nol> References: <20210317232956.veah6bax3mespdtq@nol> <20210318134729.GA8529@momjian.us> <20210318180656.3aat6jkbs7ylcg4k@nol> <20210318192349.GD3721@momjian.us> <20210319031650.aqy3ad7fpqsudo3b@nol> <20210319132906.GG3572@momjian.us> <20210319142751.vsvsjbp4bsvbh4ek@nol> <20210319165443.GI3572@momjian.us> <20210320001054.GA7968@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210320001054.GA7968@momjian.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Mar 19, 2021 at 08:10:54PM -0400, Bruce Momjian wrote: > On Sat, Mar 20, 2021 at 01:03:16AM +0100, Hannu Krosing wrote: > > It would be really convenient if user-visible serialisations of the query id > > had something that identifies the computation method. > > > > maybe prefix 'N' for internal, 'S' for pg_stat_statements etc. > > > > This would immediately show in logs at what point the id calculator was changed > > Yeah, but it an integer, and I don't think we want to change that. Also, with Bruce's approach to ask extensions to error out if they would overwrite a queryid the only way to change the calculation method is a restart. So only one source can exist in the system. Hopefully that's a big enough hammer that administrators will know what method they're using.