Re: Record queryid when auto_explain.log_verbose is on

2023-03-06 Thread Imseih (AWS), Sami
> > It's a bit annoying that the info is missing since pg 14, but we > > probably can't > > backpatch this as it might break log parser tools. > What do you think? That's a good point about log parsing tools, i.e. pgbadger. Backpatching does not sounds to appealing to me after giving this a

Re: Record queryid when auto_explain.log_verbose is on

2023-03-06 Thread torikoshia
On 2023-03-07 08:50, Imseih (AWS), Sami wrote: I am wondering if this patch should be backpatched? The reason being is in auto_explain documentation [1], there is a claim of equivalence of the auto_explain.log_verbose option and EXPLAIN(verbose) ". it's equivalent to the VERBOSE option of

Re: Record queryid when auto_explain.log_verbose is on

2023-03-06 Thread Imseih (AWS), Sami
I am wondering if this patch should be backpatched? The reason being is in auto_explain documentation [1], there is a claim of equivalence of the auto_explain.log_verbose option and EXPLAIN(verbose) ". it's equivalent to the VERBOSE option of EXPLAIN." This can be quite confusing for users

Re: Record queryid when auto_explain.log_verbose is on

2023-01-26 Thread Michael Paquier
On Thu, Jan 26, 2023 at 10:00:04PM +0900, torikoshia wrote: > I'll work on this next. Cool, thanks! -- Michael signature.asc Description: PGP signature

Re: Record queryid when auto_explain.log_verbose is on

2023-01-26 Thread torikoshia
On 2023-01-26 12:40, Michael Paquier wrote: On Wed, Jan 25, 2023 at 04:46:36PM +0900, Michael Paquier wrote: Thanks. Will check and probably apply on HEAD. Done, after adding one test case with compute_query_id=regress and applying some indentation. -- Michael Thanks! On 2023-01-23

Re: Record queryid when auto_explain.log_verbose is on

2023-01-25 Thread Michael Paquier
On Wed, Jan 25, 2023 at 04:46:36PM +0900, Michael Paquier wrote: > Thanks. Will check and probably apply on HEAD. Done, after adding one test case with compute_query_id=regress and applying some indentation. -- Michael signature.asc Description: PGP signature

Re: Record queryid when auto_explain.log_verbose is on

2023-01-24 Thread Michael Paquier
On Tue, Jan 24, 2023 at 11:01:46PM +0900, torikoshia wrote: > On 2023-01-23 09:35, Michael Paquier wrote: >> ExplainPrintTriggers() is kind of different because there is >> auto_explain_log_triggers. Still, we could add a flag in ExplainState >> deciding if the triggers should be printed, so as

Re: Record queryid when auto_explain.log_verbose is on

2023-01-24 Thread torikoshia
On 2023-01-23 09:35, Michael Paquier wrote: On Fri, Jan 20, 2023 at 12:32:58PM +0900, Michael Paquier wrote: FWIW, no objections from here. This maps with EXPLAIN where the query ID is only printed under VERBOSE. While looking at this change, I have been wondering about something.. Isn't the

Re: Record queryid when auto_explain.log_verbose is on

2023-01-22 Thread Michael Paquier
On Fri, Jan 20, 2023 at 12:32:58PM +0900, Michael Paquier wrote: > FWIW, no objections from here. This maps with EXPLAIN where the query > ID is only printed under VERBOSE. While looking at this change, I have been wondering about something.. Isn't the knowledge of the query ID something that

Re: Record queryid when auto_explain.log_verbose is on

2023-01-19 Thread Michael Paquier
On Fri, Jan 20, 2023 at 11:43:51AM +0900, torikoshia wrote: > Sorry to make you go through the trouble of looking for it. > I've now created it. > https://commitfest.postgresql.org/42/4136/ FWIW, no objections from here. This maps with EXPLAIN where the query ID is only printed under VERBOSE. --

Re: Record queryid when auto_explain.log_verbose is on

2023-01-19 Thread torikoshia
On 2023-01-19 19:05, Julien Rouhaud wrote: Hi, On Tue, Jan 17, 2023 at 10:53:23PM +0900, torikoshia wrote: > > For interactive EXPLAIN the query identifier is printed just after the > plan, > before the triggers and the JIT summary so auto_explain should do the > same. Thanks for the comment!

Re: Record queryid when auto_explain.log_verbose is on

2023-01-19 Thread Julien Rouhaud
Hi, On Tue, Jan 17, 2023 at 10:53:23PM +0900, torikoshia wrote: > > > > For interactive EXPLAIN the query identifier is printed just after the > > plan, > > before the triggers and the JIT summary so auto_explain should do the > > same. > Thanks for the comment! > Agreed and updated the patch.

Re: Record queryid when auto_explain.log_verbose is on

2023-01-17 Thread torikoshia
On 2023-01-16 22:07, Julien Rouhaud wrote: Hi, On Mon, Jan 16, 2023 at 09:36:59PM +0900, torikoshia wrote: As far as I read the manual below, auto_explain.log_verbose should record logs equivalent to VERBOSE option of EXPLAIN. Ah good catch, that's clearly an oversight! Attached patch

Re: Record queryid when auto_explain.log_verbose is on

2023-01-16 Thread Justin Pryzby
On Mon, Jan 16, 2023 at 09:36:59PM +0900, torikoshia wrote: > Attached patch makes auto_explain also print query identifiers. This was asked during the initial patch; does your patch address the issues here ? https://www.postgresql.org/message-id/20200308142644.vlihk7djpwqjkp7w%40nol -- Justin

Re: Record queryid when auto_explain.log_verbose is on

2023-01-16 Thread Julien Rouhaud
Hi, On Mon, Jan 16, 2023 at 09:36:59PM +0900, torikoshia wrote: > > As far as I read the manual below, auto_explain.log_verbose should record > logs equivalent to VERBOSE option of EXPLAIN. Ah good catch, that's clearly an oversight! > Attached patch makes auto_explain also print query

Record queryid when auto_explain.log_verbose is on

2023-01-16 Thread torikoshia
Hi, As far as I read the manual below, auto_explain.log_verbose should record logs equivalent to VERBOSE option of EXPLAIN. -- https://www.postgresql.org/docs/devel/auto-explain.html auto_explain.log_verbose controls whether verbose details are printed when an execution plan is logged; it's