Re: Allow auto_explain to log plans before queries are executed

2020-04-08 Thread David Steele
On 3/5/20 8:46 AM, Julien Rouhaud wrote: On Thu, Feb 27, 2020 at 7:31 AM Julien Rouhaud wrote: On Thu, Feb 27, 2020 at 7:12 AM Pavel Stehule wrote: čt 27. 2. 2020 v 7:01 odesílatel Yugo NAGATA napsal: I think "query debugger" feature you proposed is out of scope of auto_explain module.

Re: Allow auto_explain to log plans before queries are executed

2020-03-27 Thread legrand legrand
Kyotaro Horiguchi-4 wrote > At Thu, 27 Feb 2020 06:27:24 +0100, Pavel Stehule < > pavel.stehule@ > > wrote in >> odesílatel Kyotaro Horiguchi < > horikyota.ntt@ > > >> napsal: > > If we need a live plan dump of a running query, We could do that using > some kind of inter-backend triggering. (

Re: Allow auto_explain to log plans before queries are executed

2020-03-05 Thread Julien Rouhaud
On Thu, Feb 27, 2020 at 7:31 AM Julien Rouhaud wrote: > > On Thu, Feb 27, 2020 at 7:12 AM Pavel Stehule wrote: > > > > čt 27. 2. 2020 v 7:01 odesílatel Yugo NAGATA napsal: > >> I think "query debugger" feature you proposed is out of scope of > >> auto_explain module. I also think the feature to

Re: Allow auto_explain to log plans before queries are executed

2020-02-27 Thread legrand legrand
Hi, that feature for dumping plans with auto explain is already available in https://github.com/legrandlegrand/pg_stat_sql_plans This is an hybrid extension combining auto_explain and pg_stat_statements, adding a planid and tracking metrics even on error, ..., ... With pg_stat_sql_plans.track_p

Re: Allow auto_explain to log plans before queries are executed

2020-02-26 Thread Julien Rouhaud
On Thu, Feb 27, 2020 at 7:12 AM Pavel Stehule wrote: > > čt 27. 2. 2020 v 7:01 odesílatel Yugo NAGATA napsal: >> >> On Thu, 27 Feb 2020 06:27:24 +0100 >> Pavel Stehule wrote: >> >> > čt 27. 2. 2020 v 6:16 odesílatel Kyotaro Horiguchi >> > >> > napsal: >> > >> > > Hello. >> > > >> > > At Thu, 2

Re: Allow auto_explain to log plans before queries are executed

2020-02-26 Thread Pavel Stehule
čt 27. 2. 2020 v 7:01 odesílatel Yugo NAGATA napsal: > On Thu, 27 Feb 2020 06:27:24 +0100 > Pavel Stehule wrote: > > > čt 27. 2. 2020 v 6:16 odesílatel Kyotaro Horiguchi < > horikyota@gmail.com> > > napsal: > > > > > Hello. > > > > > > At Thu, 27 Feb 2020 10:18:16 +0900, Yugo NAGATA > > > w

Re: Allow auto_explain to log plans before queries are executed

2020-02-26 Thread Pavel Stehule
čt 27. 2. 2020 v 6:58 odesílatel Kyotaro Horiguchi napsal: > At Thu, 27 Feb 2020 06:27:24 +0100, Pavel Stehule > wrote in > > odesílatel Kyotaro Horiguchi > > napsal: > > > > In the current patch, log_before_query (will be log_before_execution) > > > > has no effect if log_analyze is enabled in

Re: Allow auto_explain to log plans before queries are executed

2020-02-26 Thread Yugo NAGATA
On Thu, 27 Feb 2020 06:27:24 +0100 Pavel Stehule wrote: > čt 27. 2. 2020 v 6:16 odesílatel Kyotaro Horiguchi > napsal: > > > Hello. > > > > At Thu, 27 Feb 2020 10:18:16 +0900, Yugo NAGATA > > wrote in > > > On Wed, 26 Feb 2020 18:51:21 +0100 > > > Julien Rouhaud wrote: > > > > > > > On Thu, F

Re: Allow auto_explain to log plans before queries are executed

2020-02-26 Thread Kyotaro Horiguchi
At Thu, 27 Feb 2020 06:27:24 +0100, Pavel Stehule wrote in > odesílatel Kyotaro Horiguchi > napsal: > > > In the current patch, log_before_query (will be log_before_execution) > > > has no effect if log_analyze is enabled in order to avoid to log the > > > same plans twice. Instead, is it bett

Re: Allow auto_explain to log plans before queries are executed

2020-02-26 Thread Yugo NAGATA
On Thu, 27 Feb 2020 14:14:41 +0900 (JST) Kyotaro Horiguchi wrote: > Hello. > > At Thu, 27 Feb 2020 10:18:16 +0900, Yugo NAGATA wrote > in > > On Wed, 26 Feb 2020 18:51:21 +0100 > > Julien Rouhaud wrote: > > > > > On Thu, Feb 27, 2020 at 02:35:18AM +0900, Yugo NAGATA wrote: > > > > Hi, > > >

Re: Allow auto_explain to log plans before queries are executed

2020-02-26 Thread Pavel Stehule
čt 27. 2. 2020 v 6:16 odesílatel Kyotaro Horiguchi napsal: > Hello. > > At Thu, 27 Feb 2020 10:18:16 +0900, Yugo NAGATA > wrote in > > On Wed, 26 Feb 2020 18:51:21 +0100 > > Julien Rouhaud wrote: > > > > > On Thu, Feb 27, 2020 at 02:35:18AM +0900, Yugo NAGATA wrote: > > > > Hi, > > > > > > > >

Re: Allow auto_explain to log plans before queries are executed

2020-02-26 Thread Kyotaro Horiguchi
Hello. At Thu, 27 Feb 2020 10:18:16 +0900, Yugo NAGATA wrote in > On Wed, 26 Feb 2020 18:51:21 +0100 > Julien Rouhaud wrote: > > > On Thu, Feb 27, 2020 at 02:35:18AM +0900, Yugo NAGATA wrote: > > > Hi, > > > > > > Attached is a patch for allowing auto_explain to log plans before > > > queries

Re: Allow auto_explain to log plans before queries are executed

2020-02-26 Thread Yugo NAGATA
On Wed, 26 Feb 2020 18:51:21 +0100 Julien Rouhaud wrote: > On Thu, Feb 27, 2020 at 02:35:18AM +0900, Yugo NAGATA wrote: > > Hi, > > > > Attached is a patch for allowing auto_explain to log plans before > > queries are executed. > > > > Currently, auto_explain logs plans only after query execution

Re: Allow auto_explain to log plans before queries are executed

2020-02-26 Thread Julien Rouhaud
On Thu, Feb 27, 2020 at 02:35:18AM +0900, Yugo NAGATA wrote: > Hi, > > Attached is a patch for allowing auto_explain to log plans before > queries are executed. > > Currently, auto_explain logs plans only after query executions, > so if a query gets stuck its plan could not be logged. If we can > k

Allow auto_explain to log plans before queries are executed

2020-02-26 Thread Yugo NAGATA
Hi, Attached is a patch for allowing auto_explain to log plans before queries are executed. Currently, auto_explain logs plans only after query executions, so if a query gets stuck its plan could not be logged. If we can know plans of stuck queries, we may get some hints to resolve the stuck. Thi