pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Rework EXPLAIN for planner's buffer usage.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Rework EXPLAIN for planner's buffer usage.
@ 2020-08-21 11:50 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2020-08-21 11:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Rework EXPLAIN for planner's buffer usage.

Commit ce77abe63c allowed EXPLAIN (BUFFERS) to report the information
on buffer usage during planning phase. However three issues were
reported regarding this feature.

(1) Previously, EXPLAIN option BUFFERS required ANALYZE. So the query
    had to be actually executed by specifying ANALYZE even when we
    want to see only the planner's buffer usage. This was inconvenient
    especially when the query was write one like DELETE.

(2) EXPLAIN included the planner's buffer usage in summary
    information. So SUMMARY option had to be enabled to report that.
    Also this format was confusing.

(3) The output structure for planning information was not consistent
    between TEXT format and the others. For example, "Planning" tag
    was output in JSON format, but not in TEXT format.

For (1), this commit allows us to perform EXPLAIN (BUFFERS) without
ANALYZE to report the planner's buffer usage.

For (2), this commit changed EXPLAIN output so that the planner's
buffer usage is reported before summary information.

For (3), this commit made the output structure for planning
information more consistent between the formats.

Back-patch to v13 where the planner's buffer usage was allowed to
be reported in EXPLAIN.

Reported-by: Pierre Giraud, David Rowley
Author: Fujii Masao
Reviewed-by: David Rowley, Julien Rouhaud, Pierre Giraud
Discussion: https://postgr.es/m/07b226e6-fa49-687f-b110-b7c37572f69e@dalibo.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/674899ae02c375b03411c0676e7cfb4bafeebac9

Modified Files
--------------
doc/src/sgml/ref/explain.sgml         |  3 +-
src/backend/commands/explain.c        | 46 ++++++++++++++---------------
src/test/regress/expected/explain.out | 55 ++++++++++++++++++++++++++++++++---
src/test/regress/sql/explain.sql      |  2 ++
4 files changed, 77 insertions(+), 29 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Rework EXPLAIN for planner's buffer usage.
@ 2020-08-21 11:50 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2020-08-21 11:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Rework EXPLAIN for planner's buffer usage.

Commit ce77abe63c allowed EXPLAIN (BUFFERS) to report the information
on buffer usage during planning phase. However three issues were
reported regarding this feature.

(1) Previously, EXPLAIN option BUFFERS required ANALYZE. So the query
    had to be actually executed by specifying ANALYZE even when we
    want to see only the planner's buffer usage. This was inconvenient
    especially when the query was write one like DELETE.

(2) EXPLAIN included the planner's buffer usage in summary
    information. So SUMMARY option had to be enabled to report that.
    Also this format was confusing.

(3) The output structure for planning information was not consistent
    between TEXT format and the others. For example, "Planning" tag
    was output in JSON format, but not in TEXT format.

For (1), this commit allows us to perform EXPLAIN (BUFFERS) without
ANALYZE to report the planner's buffer usage.

For (2), this commit changed EXPLAIN output so that the planner's
buffer usage is reported before summary information.

For (3), this commit made the output structure for planning
information more consistent between the formats.

Back-patch to v13 where the planner's buffer usage was allowed to
be reported in EXPLAIN.

Reported-by: Pierre Giraud, David Rowley
Author: Fujii Masao
Reviewed-by: David Rowley, Julien Rouhaud, Pierre Giraud
Discussion: https://postgr.es/m/07b226e6-fa49-687f-b110-b7c37572f69e@dalibo.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9d701e624f4b9386cbd99519dab7936afe3d5aed

Modified Files
--------------
doc/src/sgml/ref/explain.sgml         |  3 +-
src/backend/commands/explain.c        | 46 ++++++++++++++---------------
src/test/regress/expected/explain.out | 55 ++++++++++++++++++++++++++++++++---
src/test/regress/sql/explain.sql      |  2 ++
4 files changed, 77 insertions(+), 29 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-08-21 11:50 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-08-21 11:50 pgsql: Rework EXPLAIN for planner's buffer usage. Fujii Masao <fujii@postgresql.org>
2020-08-21 11:50 pgsql: Rework EXPLAIN for planner's buffer usage. Fujii Masao <fujii@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox