Add the option to report WAL usage in EXPLAIN and auto_explain.
authorAmit Kapila
Mon, 6 Apr 2020 02:32:15 +0000 (08:02 +0530)
committerAmit Kapila
Mon, 6 Apr 2020 02:32:15 +0000 (08:02 +0530)
commit33e05f89c53e5a1533d624046bb6fb0da7bb7141
tree1e6f18ed5d7625db62e941ff52006ea2487dcd5c
parenta40caf5f862ca8b7e927b2ab2567e934868e9376
Add the option to report WAL usage in EXPLAIN and auto_explain.

This commit adds a new option WAL similar to existing option BUFFERS in the
EXPLAIN command.  This option allows to include information on WAL record
generation added by commit df3b181499 in EXPLAIN output.

This also allows the WAL usage information to be displayed via
the auto_explain module.  A new parameter auto_explain.log_wal controls
whether WAL usage statistics are printed when an execution plan is logged.
This parameter has no effect unless auto_explain.log_analyze is enabled.

Author: Julien Rouhaud
Reviewed-by: Dilip Kumar and Amit Kapila
Discussion: https://postgr.es/m/CAB-hujrP8ZfUkvL5OYETipQwA=e3n7oqHFU=4ZLxWS_Cza3kQQ@mail.gmail.com
contrib/auto_explain/auto_explain.c
doc/src/sgml/auto-explain.sgml
doc/src/sgml/ref/explain.sgml
src/backend/commands/explain.c
src/bin/psql/tab-complete.c
src/include/commands/explain.h