Thread: pgsql: Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics.
pgsql: Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics.
From
rhaas@postgresql.org (Robert Haas)
Date:
Log Message: ----------- Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics. This patch also removes buffer-usage statistics from the track_counts output, since this (or the global server statistics) is deemed to be a better interface to this information. Itagaki Takahiro, reviewed by Euler Taveira de Oliveira. Modified Files: -------------- pgsql/contrib/auto_explain: auto_explain.c (r1.9 -> r1.10) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/auto_explain/auto_explain.c?r1=1.9&r2=1.10) pgsql/contrib/pg_stat_statements: pg_stat_statements.c (r1.7 -> r1.8) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/pg_stat_statements/pg_stat_statements.c?r1=1.7&r2=1.8) pgsql/doc/src/sgml: auto-explain.sgml (r1.5 -> r1.6) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/auto-explain.sgml?r1=1.5&r2=1.6) pgsql/doc/src/sgml/ref: explain.sgml (r1.47 -> r1.48) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/explain.sgml?r1=1.47&r2=1.48) pgsql/src/backend/commands: copy.c (r1.318 -> r1.319) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/copy.c?r1=1.318&r2=1.319) explain.c (r1.195 -> r1.196) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/explain.c?r1=1.195&r2=1.196) tablecmds.c (r1.309 -> r1.310) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.309&r2=1.310) pgsql/src/backend/executor: execMain.c (r1.337 -> r1.338) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execMain.c?r1=1.337&r2=1.338) execProcnode.c (r1.68 -> r1.69) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execProcnode.c?r1=1.68&r2=1.69) functions.c (r1.137 -> r1.138) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/functions.c?r1=1.137&r2=1.138) instrument.c (r1.22 -> r1.23) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/instrument.c?r1=1.22&r2=1.23) spi.c (r1.211 -> r1.212) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/spi.c?r1=1.211&r2=1.212) pgsql/src/backend/storage/buffer: buf_init.c (r1.82 -> r1.83) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/buffer/buf_init.c?r1=1.82&r2=1.83) bufmgr.c (r1.252 -> r1.253) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/buffer/bufmgr.c?r1=1.252&r2=1.253) localbuf.c (r1.87 -> r1.88) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/buffer/localbuf.c?r1=1.87&r2=1.88) pgsql/src/backend/storage/file: buffile.c (r1.34 -> r1.35) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/file/buffile.c?r1=1.34&r2=1.35) pgsql/src/backend/tcop: postgres.c (r1.575 -> r1.576) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c?r1=1.575&r2=1.576) pquery.c (r1.132 -> r1.133) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/pquery.c?r1=1.132&r2=1.133) pgsql/src/include/commands: explain.h (r1.43 -> r1.44) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/explain.h?r1=1.43&r2=1.44) pgsql/src/include/executor: execdesc.h (r1.40 -> r1.41) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/execdesc.h?r1=1.40&r2=1.41) executor.h (r1.164 -> r1.165) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/executor.h?r1=1.164&r2=1.165) instrument.h (r1.20 -> r1.21) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/instrument.h?r1=1.20&r2=1.21) pgsql/src/include/nodes: execnodes.h (r1.213 -> r1.214) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/execnodes.h?r1=1.213&r2=1.214) pgsql/src/include/storage: buf_internals.h (r1.102 -> r1.103) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/buf_internals.h?r1=1.102&r2=1.103) bufmgr.h (r1.121 -> r1.122) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/bufmgr.h?r1=1.121&r2=1.122)
On Tue, 2009-12-15 at 04:57 +0000, Robert Haas wrote: > This patch also removes buffer-usage statistics from the track_counts > output, since this (or the global server statistics) is deemed to be a > better interface to this information. I hope anything being removed is documented, though I don't see that. Do you mean pg_statio_* tables no longer track heap_blocks* ? That is my understanding of what track_counts gives us. I think you mean log_*_stats, which is something else entirely. -- Simon Riggs www.2ndQuadrant.com
Re: pgsql: Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics.
From
Euler Taveira de Oliveira
Date:
Simon Riggs escreveu: > On Tue, 2009-12-15 at 04:57 +0000, Robert Haas wrote: >> This patch also removes buffer-usage statistics from the track_counts >> output, since this (or the global server statistics) is deemed to be a >> better interface to this information. > > I hope anything being removed is documented, though I don't see that. > That functionality isn't documented AFAIR. That's why Tom suggested to rip it out. > Do you mean pg_statio_* tables no longer track heap_blocks* ? That is my > understanding of what track_counts gives us. I think you mean > log_*_stats, which is something else entirely. > That's it! -- Euler Taveira de Oliveira http://www.timbira.com/
On Tue, Dec 15, 2009 at 1:32 PM, Simon Riggs <simon@2ndquadrant.com> wrote: > On Tue, 2009-12-15 at 04:57 +0000, Robert Haas wrote: >> This patch also removes buffer-usage statistics from the track_counts >> output, since this (or the global server statistics) is deemed to be a >> better interface to this information. > > I hope anything being removed is documented, though I don't see that. > Do you mean pg_statio_* tables no longer track heap_blocks* ? That is my > understanding of what track_counts gives us. I think you mean > log_*_stats, which is something else entirely. Oops. You're right, it's log_*_stats, rather than track_counts(). Unfortunately, the format of the log_*_stats output is not documented: we can't remove this from the list of things that log_*_stats is documented to print, because there is no such list. That might be worth correcting, but the lack of pre-existing documentation didn't seem like something this patch should try to fix. ...Robert