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.89) (envelope-from ) id 1huXQG-00081s-5f for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2019 07:28:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1huXQF-0002LM-10 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2019 07:28:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1huXQE-0002IY-K6 for pgsql-hackers@lists.postgresql.org; Mon, 05 Aug 2019 07:28:46 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1huXQA-0002hI-TV for pgsql-hackers@postgresql.org; Mon, 05 Aug 2019 07:28:46 +0000 Received: by mail-pg1-x543.google.com with SMTP id i18so39253552pgl.11 for ; Mon, 05 Aug 2019 00:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=rkPEHZUry2LD2KbTQex9eKvzLWSUk7RzN75NLG6a0+Q=; b=hw+jakpLGxdoDbloSp/6jnwXg9X//XbXL4mArh9VEkoLrbjIiHZc1vTIjZtXQM209T 8xp67KT3F8vidGxjLuWkj95xSY3E/RLucEzCoijFsczEBlGXx96Xv+JOXrderztiyJ9v dd/qlmejEuCjzYGoopItF5tnJyhVyIgpr0epHryXy+BNy1dyilQb4A+TJzQWh3GpYRR1 qekYKityFeI2sA76xGMYOCrdRq7tBZ50VwnCYEKwemVbYVhEXDbv9ig4Y6tNqY5Ih8fT mLD4AJQCbhk1V9D30kcHyo7QYIp6gj6EPjTPXGxBnL/IdcD4c3pGGyI9EKRWJI07V64V xgaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=rkPEHZUry2LD2KbTQex9eKvzLWSUk7RzN75NLG6a0+Q=; b=oah2pjB+stsG86IPNpq5y4EUBsoft5JSq+jMX9JvWoC7nBSb4ZKB9Hof1QwOEC/ITr w479Xstm41Bx8Zx4FUdAuMdpXmqdv4oJcU/hEigqYPKWGYZvRrd82KhppxXy+DlIhkbE wwGdMBOWuD+Hw02W51MA0CH9bkjztmoZkEZiGzPJpWce3H2Fgt9lcImiVnqfry7AuaQZ Y2GDgKu8lBvn7CZnEYAwGuizZV6Zos8TmWu18pUk1Kq8tR1Q+GK9yKBow0963c6ZLhYH h1llA+97JSEjXMJef21XdCDvPtIFm51Z1ODfmln6HooezQtTlVb5iBuTDX8jRPWAEwou +hYQ== X-Gm-Message-State: APjAAAUAMAi7lHgeeSEzU8p5+uj38xud32OK9Td8gFmuBPTfvcoT4z33 0FIzi8G60fqtfbsN8Z6quBI= X-Google-Smtp-Source: APXvYqz4JKcIBENRSGptM31zXAqmsLJKtQ07irTYXIbf+KoEkVEUlc+SJRwz1vaXoWAIIPX0whik8A== X-Received: by 2002:a63:8dc9:: with SMTP id z192mr79936689pgd.151.1564990120499; Mon, 05 Aug 2019 00:28:40 -0700 (PDT) Received: from localhost (w204177.dynamic.ppp.asahi-net.or.jp. [121.1.204.177]) by smtp.gmail.com with ESMTPSA id 137sm102899444pfz.112.2019.08.05.00.28.38 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 05 Aug 2019 00:28:40 -0700 (PDT) Date: Mon, 05 Aug 2019 16:28:24 +0900 (Tokyo Standard Time) Message-Id: <20190805.162824.123166397.horikyota.ntt@gmail.com> To: legrand_legrand@hotmail.com Cc: pgsql-hackers@postgresql.org Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view? From: Kyotaro Horiguchi In-Reply-To: <1564902241482-0.post@n3.nabble.com> References: <20190801210514.qdiam2oazua6otkk@alap3.anarazel.de> <1564902241482-0.post@n3.nabble.com> User-Agent: Mew version 6.5 on Emacs 22.2 / Mule 5.0 =?iso-2022-jp?B?KBskQjpnGyhCKQ==?= / Meadow-3.01-dev (TSUBO-SUMIRE) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk At Sun, 4 Aug 2019 00:04:01 -0700 (MST), legrand legrand wrote in <1564902241482-0.post@n3.nabble.com> > > However having the nested queryid in > > pg_stat_activity would be convenient to track > > what is a long stored functions currently doing. > > +1 > > And this could permit to get wait event sampling per queryid when > pg_stat_statements.track = all I'm strongly on this side emotionally, but also I'm on Tom and Andres's side that exposing querid that way is not the right thing. Doing that means we don't need exact correspondence between top-level query and queryId (in nested or multistatement queries) in this patch. pg_stat_statements will allow us to do the same thing by having additional uint64[MaxBackends] array in pgssSharedState, instead of expanding PgBackendStatus array in core by the same size. regards. -- Kyotaro Horiguchi NTT Open Source Software Center