pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add SETTINGS option to EXPLAIN, to print modified settings.
Date: Wed, 03 Apr 2019 22:22:20 +0000
Message-ID: <E1hBoGy-0008JG-3J@gemulon.postgresql.org> (raw)

Add SETTINGS option to EXPLAIN, to print modified settings.

Query planning is affected by a number of configuration options, and it
may be crucial to know which of those options were set to non-default
values.  With this patch you can say EXPLAIN (SETTINGS ON) to include
that information in the query plan.  Only options affecting planning,
with values different from the built-in default are printed.

This patch also adds auto_explain.log_settings option, providing the
same capability in auto_explain module.

Author: Tomas Vondra
Reviewed-by: Rafia Sabih, John Naylor
Discussion: https://postgr.es/m/e1791b4c-df9c-be02-edc5-7c8874944be0@2ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ea569d64ac7174d3fe657e3e682d11053ecf1866

Modified Files
--------------
contrib/auto_explain/auto_explain.c |  13 ++
doc/src/sgml/auto-explain.sgml      |  18 +++
doc/src/sgml/ref/explain.sgml       |  12 ++
src/backend/commands/explain.c      |  76 +++++++++++
src/backend/utils/misc/guc.c        | 262 +++++++++++++++++++++++++++++-------
src/include/commands/explain.h      |   1 +
src/include/utils/guc.h             |   2 +
src/include/utils/guc_tables.h      |   1 +
8 files changed, 333 insertions(+), 52 deletions(-)



Message-ID: <E1hBoGy-0008JG-3J@gemulon.postgresql.org>
Permalink:  ../E1hBoGy-0008JG-3J@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hBoGy-0008JG-3J@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tomas.vondra@postgresql.org
  Subject: Re: pgsql: Add SETTINGS option to EXPLAIN, to print modified settings.
  In-Reply-To: <E1hBoGy-0008JG-3J@gemulon.postgresql.org>
  References: <E1hBoGy-0008JG-3J@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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