Re: Allow auto_explain to log plans before queries are executed

Поиск
Список
Период
Сортировка
От legrand legrand
Тема Re: Allow auto_explain to log plans before queries are executed
Дата
Msg-id 1582825067004-0.post@n3.nabble.com
обсуждение исходный текст
Ответ на Re: Allow auto_explain to log plans before queries are executed  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
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_planid = true
pg_stat_sql_plans.explain = true
    -->  it writes explain plan in log file after planning and only one time
per (queryid,planid)
           then no need of sampling

and with
pg_stat_sql_plans.track = 'all'
  --> function pgssp_backend_queryid(pid) retrieves (nested) queryid of a
stuck statement, 
        and permit to retrieve its plan (by its queryid) in logs.

Regards
PAscal




--
Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.
Следующее
От: Andres Freund
Дата:
Сообщение: pgbench: option delaying queries till connections establishment?