pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Finnerty <jfinnert@amazon.com>
To: pgsql-hackers@postgresql.org
Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Date: Tue, 19 Mar 2019 10:23:55 -0700 (MST)
Message-ID: <1553016235129-0.post@n3.nabble.com> (raw)
In-Reply-To: <CAOBaU_YsiPHJ-mm26omMY7hgBBXfx9Ld0xw-DWrdvpbBKpbqQg@mail.gmail.com>
References: <CA+8PKvQnMfOE-c3YLRwxOsCYXQDyP8VXs6CDtMZp1V4=D4LuFA@mail.gmail.com>
	<21800.1552701008@sss.pgh.pa.us>
	<CA+TgmobNUwzTnb6f5Kmw=qSXXs2sMexerd8uTyaHE2CG9=F=SQ@mail.gmail.com>
	<28191.1552753201@sss.pgh.pa.us>
	<CAOBaU_aQzRosCQtnSQFRKCpQSh7857xWWRpBtBMtmZa+3Ybcuw@mail.gmail.com>
	<CA+8PKvR4+EkRXw7SCw3Rf560XPtCt197kgvkhe5vhS=z8jHm2Q@mail.gmail.com>
	<CAOBaU_bK8fjOzq2VZ8qEGRWh9wE2g5pUH8bFL_n5S+0F0AqyUQ@mail.gmail.com>
	<CAOBaU_YsiPHJ-mm26omMY7hgBBXfx9Ld0xw-DWrdvpbBKpbqQg@mail.gmail.com>

The queryId depends on oids, so it is not stable enough for some purposes. 
For example, to create a SQL identifier that survives across a server
upgrade, or that can be shipped to another database, the queryId isn't
usable. 

The apg_plan_mgmt extensions keeps both its own stable SQL identifier as
well as the queryId, so it can be used to join to pg_stat_statements if
desired.  If we were to standardize on one SQL identifier, it should be
stable enough to survive a major version upgrade or to be the same in
different databases.





-----
Jim Finnerty, AWS, Amazon Aurora PostgreSQL
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html




view thread (222+ messages)  latest in thread

Message-ID: <1553016235129-0.post@n3.nabble.com>
Permalink:  ../1553016235129-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1553016235129-0.post@n3.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: jfinnert@amazon.com
  Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
  In-Reply-To: <1553016235129-0.post@n3.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox