Re: Planner debug views

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Planner debug views
Дата
Msg-id 20150728032036.GO5596@postgresql.org
обсуждение исходный текст
Ответ на Re: Planner debug views  (Qingqing Zhou <zhouqq.postgres@gmail.com>)
Ответы Re: Planner debug views  (Qingqing Zhou <zhouqq.postgres@gmail.com>)
Список pgsql-hackers
Qingqing Zhou wrote:

> Attached is a draft patch implementing the idea. To play with it, you
> shall create the follow two foreign tables:
> CREATE EXTENSION file_fdw;
> CREATE SERVER pglog FOREIGN DATA WRAPPER file_fdw;
> create foreign table pg_planner_rels(rel text, content text)server
> pglog options(filename '<your_install>/data/debug_planner_relopt.csv',
> format 'csv');
> create foreign table pg_planner_paths(rel text, path text, replacedby
> text, reason int, startupcost float, totalcost float, cheapest text,
> innerp text, outerp text, content text) server pglog options(filename
> '<your_install>/data/debug_planner_paths.csv', format 'csv');

I think this is a pretty neat idea, but I'm not sure this user interface
is a good one.  Why not have a new option for EXPLAIN, so you would call
"EXPLAIN (planner_stuff=on)" and it returns this as a resultset?  This
idea of creating random CSV files seems odd and inconvenient in the long
run.  For instance it fails if you have two sessions doing it
simultaneously; you could tack the process ID at the end of the file
name to prevent that problem, but then the foreign table breaks each
time.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Kouhei Kaigai
Дата:
Сообщение: Re: [DESIGN] ParallelAppend
Следующее
От: Andres Freund
Дата:
Сообщение: Re: LWLock deadlock and gdb advice