pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Change default of pg_stat_statements.track_planning to off.
Date: Fri, 03 Jul 2020 02:37:40 +0000
Message-ID: <E1jrBa8-0005tT-GD@gemulon.postgresql.org> (raw)

Change default of pg_stat_statements.track_planning to off.

Since v13 pg_stat_statements is allowed to track the planning time of
statements when track_planning option is enabled. Its default was on.

But this feature could cause more terrible spinlock contentions in
pg_stat_statements. As a result of this, Robins Tharakan reported that
v13 beta1 showed ~45% performance drop at high DB connection counts
(when compared with v12.3) during fully-cached SELECT-only test using
pgbench.

To avoid this performance regression by the default setting,
this commit changes default of pg_stat_statements.track_planning to off.

Back-patch to v13 where pg_stat_statements.track_planning was introduced.

Reported-by: Robins Tharakan
Author: Fujii Masao
Reviewed-by: Julien Rouhaud
Discussion: https://postgr.es/m/2895b53b033c47ccb22972b589050dd9@EX13D05UWC001.ant.amazon.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8d459762b10372e48845a49b305f4e1e165fe173

Modified Files
--------------
.../pg_stat_statements/expected/pg_stat_statements.out  |  1 +
contrib/pg_stat_statements/pg_stat_statements.c         |  2 +-
contrib/pg_stat_statements/sql/pg_stat_statements.sql   |  1 +
doc/src/sgml/pgstatstatements.sgml                      | 17 +++++++++++++++--
4 files changed, 18 insertions(+), 3 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1jrBa8-0005tT-GD@gemulon.postgresql.org>
Permalink:  ../E1jrBa8-0005tT-GD@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jrBa8-0005tT-GD@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: fujii@postgresql.org
  Subject: Re: pgsql: Change default of pg_stat_statements.track_planning to off.
  In-Reply-To: <E1jrBa8-0005tT-GD@gemulon.postgresql.org>
  References: <E1jrBa8-0005tT-GD@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