pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: legrand legrand <legrand_legrand@hotmail.com>
To: pgsql-hackers@postgresql.org
Subject: Re: explain plans with information about (modified) gucs
Date: Mon, 14 Jan 2019 16:00:35 -0700 (MST)
Message-ID: <1547506835703-0.post@n3.nabble.com> (raw)
In-Reply-To: <5396e093-ed6b-5962-2ed5-337a0425160b@2ndquadrant.com>
References: <e1791b4c-df9c-be02-edc5-7c8874944be0@2ndquadrant.com>
	<23164510-3f59-3289-3b32-9c8643711a6c@gmail.com>
	<5396e093-ed6b-5962-2ed5-337a0425160b@2ndquadrant.com>

Tomas Vondra-4 wrote
> Hello Sergei,
> 
>> This patch correlates with my proposal
>> "add session information column to pg_stat_statements"
>> https://www.postgresql.org/message-id/3aa097d7-7c47-187b-5913-db8366cd4491%40gmail.com
>> They both address the problem to identify the factors that make
>> different execution plans for the same SQL statements. You are
>> interested in the current settings that affect the execution plan, I'm
>> concerned about historical data in pg_stat_statements. From my
>> experience the most often offending settings are
>> current_schemas/search_path and current_user. Please have in mind that
>> probably the same approach that you will use to extend explain plan
>> functionality will be eventually implemented to extend
>> pg_stat_statements.
> 
> Possibly, although I don't have an ambition to export the GUCs into
> pg_stat_statements in this patch. There's an issue with merging
> different values of GUCs in different executions of a statement, and
> it's unclear how to solve that.
> 
> [...]
> 
> -- 
> Tomas Vondra                  http://www.2ndQuadrant.com
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

This explain with GUCs feature can be included very easily for historical
data management in pg_store_plans or pg_stat_sql_plans extensions 
(that both use a planid based on the normalized plan text).

Regards
PAscal



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




view thread (40+ messages)  latest in thread

Message-ID: <1547506835703-0.post@n3.nabble.com>
Permalink:  ../1547506835703-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1547506835703-0.post@n3.nabble.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: legrand_legrand@hotmail.com
  Subject: Re: explain plans with information about (modified) gucs
  In-Reply-To: <1547506835703-0.post@n3.nabble.com>

* 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