Re: Logging query parmeters in auto_explain

2022-07-06 Thread Dagfinn Ilmari Mannsåker
On Wed, 6 Jul 2022, at 02:02, Michael Paquier wrote: > On Fri, Jul 01, 2022 at 09:58:52AM +0900, Michael Paquier wrote: >> I have kept things as I originally intended, and applied 0001 for the >> refactoring pieces. > > And done as well with 0002. So we are good for this thread. Thanks! - ilmari

Re: Logging query parmeters in auto_explain

2022-07-05 Thread Michael Paquier
On Fri, Jul 01, 2022 at 09:58:52AM +0900, Michael Paquier wrote: > I have kept things as I originally intended, and applied 0001 for the > refactoring pieces. And done as well with 0002. So we are good for this thread. -- Michael signature.asc Description: PGP signature

Re: Logging query parmeters in auto_explain

2022-06-30 Thread Michael Paquier
On Wed, Jun 29, 2022 at 09:17:49AM +0900, Michael Paquier wrote: > The majority of TAP scripts have their subroutines at the beginning of > the script, and there are few having that at the end. I won't fight > you on that, but the former is more consistent. I have kept things as I originally inte

Re: Logging query parmeters in auto_explain

2022-06-28 Thread Michael Paquier
On Tue, Jun 28, 2022 at 10:12:18AM +0100, Dagfinn Ilmari Mannsåker wrote: > That makes sense, but I still think the query_log() function definition > should go at the end (after done_testing()), so the machinery doesn't > distract from what's actually being tested. The majority of TAP scripts have

Re: Logging query parmeters in auto_explain

2022-06-28 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Mon, Jun 27, 2022 at 12:27:57PM +0100, Dagfinn Ilmari Mannsåker wrote: >> I forgot to mention, I also changed the order of the query and >> parameters, so that they can more naturally be left out when no changes >> are needed. > > I can see that, and I have added $nod

Re: Logging query parmeters in auto_explain

2022-06-28 Thread Michael Paquier
On Mon, Jun 27, 2022 at 12:27:57PM +0100, Dagfinn Ilmari Mannsåker wrote: > I forgot to mention, I also changed the order of the query and > parameters, so that they can more naturally be left out when no changes > are needed. I can see that, and I have added $node as an extra parameter of the rou

Re: Logging query parmeters in auto_explain

2022-06-27 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Michael Paquier writes: > >> On Thu, Jun 09, 2022 at 11:55:11PM +0100, Dagfinn Ilmari Mannsåker wrote: >>> Done (and more tests added), v3 attached. >> >> One thing I am wondering is if we'd better mention errdetail_params() >> at the top of the initial check d

Re: Logging query parmeters in auto_explain

2022-06-27 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Thu, Jun 09, 2022 at 11:55:11PM +0100, Dagfinn Ilmari Mannsåker wrote: >> Done (and more tests added), v3 attached. > > One thing I am wondering is if we'd better mention errdetail_params() > at the top of the initial check done in ExplainQueryParameters(). > That's a

Re: Logging query parmeters in auto_explain

2022-06-14 Thread Michael Paquier
On Thu, Jun 09, 2022 at 11:55:11PM +0100, Dagfinn Ilmari Mannsåker wrote: > Done (and more tests added), v3 attached. One thing I am wondering is if we'd better mention errdetail_params() at the top of the initial check done in ExplainQueryParameters(). That's a minor issue, though. +sub query_lo

Re: Logging query parmeters in auto_explain

2022-06-09 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Tue, Jun 07, 2022 at 12:18:52PM +0100, Dagfinn Ilmari Mannsåker wrote: >> Point, fixed in the attached v2. I've also added a test that truncation >> and disabling works. > > The tests are structured so as all the queries are run first, then the > full set of logs is s

Re: Logging query parmeters in auto_explain

2022-06-08 Thread Michael Paquier
On Tue, Jun 07, 2022 at 12:18:52PM +0100, Dagfinn Ilmari Mannsåker wrote: > Point, fixed in the attached v2. I've also added a test that truncation > and disabling works. The tests are structured so as all the queries are run first, then the full set of logs is slurped and scanned. With things li

Re: Logging query parmeters in auto_explain

2022-06-07 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Tue, May 31, 2022 at 09:33:20PM +0100, Dagfinn Ilmari Mannsåker wrote: >> Here's a patch that adds a corresponding >> auto_explain.log_parameter_max_length config setting, which controls the >> "Query Parameters" node in the logged plan. Just like in core, the >> def

Re: Logging query parmeters in auto_explain

2022-06-07 Thread Michael Paquier
On Tue, May 31, 2022 at 09:33:20PM +0100, Dagfinn Ilmari Mannsåker wrote: > Here's a patch that adds a corresponding > auto_explain.log_parameter_max_length config setting, which controls the > "Query Parameters" node in the logged plan. Just like in core, the > default is -1, which logs the param

Re: Logging query parmeters in auto_explain

2022-06-06 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Hi hackers, > > Inspired by a question on IRC, I noticed that while the core statement > logging system gained the option to log statement parameters in PG 13, > auto_explain was left out. > > Here's a patch that adds a corresponding > auto_explain.log_parameter

Logging query parmeters in auto_explain

2022-05-31 Thread Dagfinn Ilmari Mannsåker
Hi hackers, Inspired by a question on IRC, I noticed that while the core statement logging system gained the option to log statement parameters in PG 13, auto_explain was left out. Here's a patch that adds a corresponding auto_explain.log_parameter_max_length config setting, which controls the "Q