From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Keep pg_stat_statements' query texts in a file, not in shared me |
Date: | 2014-01-27 20:38:03 |
Message-ID: | E1W7swV-0006xS-Iu@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Keep pg_stat_statements' query texts in a file, not in shared memory.
This change allows us to eliminate the previous limit on stored query
length, and it makes the shared-memory hash table very much smaller,
allowing more statements to be tracked. (The default value of
pg_stat_statements.max is therefore increased from 1000 to 5000.)
In typical scenarios, the hash table can be large enough to hold all the
statements commonly issued by an application, so that there is little
"churn" in the set of tracked statements, and thus little need to do I/O
to the file.
To further reduce the need for I/O to the query-texts file, add a way
to retrieve all the columns of the pg_stat_statements view except for
the query text column. This is probably not of much interest for human
use but it could be exploited by programs, which will prefer using the
queryid anyway.
Ordinarily, we'd need to bump the extension version number for the latter
change. But since we already advanced pg_stat_statements' version number
from 1.1 to 1.2 in the 9.4 development cycle, it seems all right to just
redefine what 1.2 means.
Peter Geoghegan, reviewed by Pavel Stehule
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/f0d6f20278b7c5c412ce40a9b86c6b31dc2fbfdd
Modified Files
--------------
.../pg_stat_statements--1.1--1.2.sql | 8 +-
.../pg_stat_statements/pg_stat_statements--1.2.sql | 8 +-
contrib/pg_stat_statements/pg_stat_statements.c | 1024 +++++++++++++++++---
doc/src/sgml/pgstatstatements.sgml | 80 +-
4 files changed, 929 insertions(+), 191 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | KONDO Mitsumasa | 2014-01-28 01:12:34 | Re: pgsql: Keep pg_stat_statements' query texts in a file, not in shared me |
Previous Message | Tom Lane | 2014-01-27 17:27:49 | Re: pgsql: Check dup2() results in syslogger |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-01-27 20:39:39 | Re: Storing pg_stat_statements query texts externally, pg_stat_statements in core |
Previous Message | Peter Geoghegan | 2014-01-27 20:35:58 | Re: ALTER TABLE lock strength reduction patch is unsafe |