pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: byme@byme.email, Wim Bertels <wim.bertels@ucll.be>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: pg_stat_statements IN problem
Date: Tue, 03 Oct 2023 10:54:17 +0200
Message-ID: <f0254aba438399af2fb69110cfc5c71fd4cacb08.camel@cybertec.at> (raw)
In-Reply-To: <9o10Aeez9I_z3V3wCkp9jmm7sbI5JaySNUqBl44FoDvLz7RaPpYTxF6ZifZH7YKkWaWfM3XeFpDDFsHzMfb3koq8S51Z0NjbRJ6TT0_Hu0g=@byme.email>
References: <Z6FGe-JBOEhPm3AUulSOJc7z5UiSbr3U_N88tmBbXyNbwZLolx8kV7i8qBuJHYxI64cYcsXnV-2ynh1VBr3uK6doMBtuUkYXtpH70keFNYQ=@byme.email>
	<caf838741f25152369ac50d04da83550e68a3bd4.camel@ucll.be>
	<9o10Aeez9I_z3V3wCkp9jmm7sbI5JaySNUqBl44FoDvLz7RaPpYTxF6ZifZH7YKkWaWfM3XeFpDDFsHzMfb3koq8S51Z0NjbRJ6TT0_Hu0g=@byme.email>

On Tue, 2023-10-03 at 08:05 +0000, byme@byme.email wrote:
> "This obfuscates our monitoring because the same query with different amount of arguments gets translated into this:
> IN ($1, $2)
> and so on."
> 
> The questions are:
> 1. Shouldnt IN behave so that the query in pg_stat_statements would look like this:
> IN $1
> 2. Shouldnt there be at least some flag to aggregate such queries into one?
> 3. Is there any workaround how to aggregate those queries except the "= ANY"?
> 4. How come no one is bothered by this if this makes pg_stat_statements unusable with lots of queries using IN, what others do with this problem?
> 5. what do you mean by changing pg_stat_statements with another view/table?

There is currently a patch for this very problem under review:

https://commitfest.postgresql.org/44/2837/

The discussion is here:

https://www.postgresql.org/message-id/flat/CA+q6zcWtUbT_Sxj0V6HY6EZ89uv5wuG5aefpe_9n0Jr3VwntFg@mail....

You could comment on that patch or review it.  Useful reviews and supporting
comments help move the patch forward.  That would best serve your interests.

Yours,
Laurenz Albe





view thread (7+ messages)  latest in thread

Message-ID: <f0254aba438399af2fb69110cfc5c71fd4cacb08.camel@cybertec.at>
Permalink:  ../f0254aba438399af2fb69110cfc5c71fd4cacb08.camel@cybertec.at/
Also on:    postgresql.org/message-id/f0254aba438399af2fb69110cfc5c71fd4cacb08.camel@cybertec.at

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, wim.bertels@ucll.be
  Subject: Re: pg_stat_statements IN problem
  In-Reply-To: <f0254aba438399af2fb69110cfc5c71fd4cacb08.camel@cybertec.at>
  References: <Z6FGe-JBOEhPm3AUulSOJc7z5UiSbr3U_N88tmBbXyNbwZLolx8kV7i8qBuJHYxI64cYcsXnV-2ynh1VBr3uK6doMBtuUkYXtpH70keFNYQ=@byme.email> <caf838741f25152369ac50d04da83550e68a3bd4.camel@ucll.be> <9o10Aeez9I_z3V3wCkp9jmm7sbI5JaySNUqBl44FoDvLz7RaPpYTxF6ZifZH7YKkWaWfM3XeFpDDFsHzMfb3koq8S51Z0NjbRJ6TT0_Hu0g=@byme.email> <f0254aba438399af2fb69110cfc5c71fd4cacb08.camel@cybertec.at>

* 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