Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-14 Thread Itagaki Takahiro
Tom Lane t...@sss.pgh.pa.us wrote: 2. I do not understand the stuff with propagating counts into the top instrumentation node. That seems like it's going to double-count those counts. In any case it is 100% inconsistent to propagate only buffer counts that way and not any other resource

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-14 Thread Tom Lane
Itagaki Takahiro itagaki.takah...@oss.ntt.co.jp writes: Tom Lane t...@sss.pgh.pa.us wrote: 2. I do not understand the stuff with propagating counts into the top instrumentation node. It is required by contrib/pg_stat_statements. EXPLAIN wants per-node accumulation, but pg_stat_statements

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-14 Thread Robert Haas
On Wed, Oct 14, 2009 at 9:56 AM, Tom Lane t...@sss.pgh.pa.us wrote: Itagaki Takahiro itagaki.takah...@oss.ntt.co.jp writes: Tom Lane t...@sss.pgh.pa.us wrote: 2. I do not understand the stuff with propagating counts into the top instrumentation node. It is required by

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-14 Thread Itagaki Takahiro
Robert Haas robertmh...@gmail.com wrote: Well, you need to find another way or risk getting the patch rejected altogether. ?Those global variables are the weakest part of the whole design, and I'm not going to commit a patch that destabilizes the entire system for the sake of a debatable

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-14 Thread Robert Haas
2009/10/14 Itagaki Takahiro itagaki.takah...@oss.ntt.co.jp: Robert Haas robertmh...@gmail.com wrote: Well, you need to find another way or risk getting the patch rejected altogether. ?Those global variables are the weakest part of the whole design, and I'm not going to commit a patch that

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-14 Thread Itagaki Takahiro
Robert Haas robertmh...@gmail.com wrote: My (limited) experience is that it's usually better to get something incremental committed, even if it's not what you really want. You can always take another crack at the remaining issues later, but if the whole patch gets shot down then you are out

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-14 Thread Robert Haas
On Wed, Oct 14, 2009 at 9:38 PM, Itagaki Takahiro itagaki.takah...@oss.ntt.co.jp wrote: Robert Haas robertmh...@gmail.com wrote: My (limited) experience is that it's usually better to get something incremental committed, even if it's not what you really want.  You can always take another

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-13 Thread Tom Lane
Itagaki Takahiro itagaki.takah...@oss.ntt.co.jp writes: Here is an update version of buffer usage patch. I started to look at this patch, and I have a few comments: 1. I was expecting this patch to get rid of ShowBufferUsage() and friends altogether, instead of adding yet more static counters

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-04 Thread Robert Haas
On Wed, Sep 30, 2009 at 10:40 PM, Itagaki Takahiro itagaki.takah...@oss.ntt.co.jp wrote: Euler Taveira de Oliveira eu...@timbira.com wrote: But there are some confusions in postgres; ReadBufferCount and BufferHitCount are used for get and hit, but heap_blks_read and heap_blks_hit are used

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-04 Thread Itagaki Takahiro
Robert Haas robertmh...@gmail.com wrote: 1. I would suggest something like Blocks Read: %ld Hit: %ld Temp Read: %ld\n. See the way we handle output of sort type and space usage, for example. I have some questions: * Did you use single space and double spaces in your example

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-04 Thread Robert Haas
On Sun, Oct 4, 2009 at 11:22 PM, Itagaki Takahiro itagaki.takah...@oss.ntt.co.jp wrote: Robert Haas robertmh...@gmail.com wrote: 1. I would suggest something like Blocks Read: %ld  Hit:  %ld  Temp Read: %ld\n.  See the way we handle output of sort type and space usage, for example. I have

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-04 Thread Itagaki Takahiro
Here is an update version of buffer usage patch. * All buffers_* and bufs_* are renamed to blks_*. * 'disc' = 'disk' in documentation * Replace debug-log to Assert(). * Fix a bug in ResetLocalBufferUsage(). log_xxx_stats had not worked. Robert Haas robertmh...@gmail.com wrote: ?* Can I

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-01 Thread Euler Taveira de Oliveira
Itagaki Takahiro escreveu: I fixed the confusions of get, hit and read in your patch. Works for me. Will mark it ready for a committer. PS BTW, your patch (20091001112006.9c36.52131...@oss.ntt.co.jp) doesn't seem to be in archives.p.o. though I've received a copy from the server. -- Euler

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-01 Thread Alvaro Herrera
Euler Taveira de Oliveira wrote: Itagaki Takahiro escreveu: I fixed the confusions of get, hit and read in your patch. Works for me. Will mark it ready for a committer. PS BTW, your patch (20091001112006.9c36.52131...@oss.ntt.co.jp) doesn't seem to be in archives.p.o. though I've

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-10-01 Thread Alvaro Herrera
Alvaro Herrera wrote: Euler Taveira de Oliveira wrote: Itagaki Takahiro escreveu: I fixed the confusions of get, hit and read in your patch. Works for me. Will mark it ready for a committer. PS BTW, your patch (20091001112006.9c36.52131...@oss.ntt.co.jp) doesn't seem to be in

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-09-30 Thread Itagaki Takahiro
Euler Taveira de Oliveira eu...@timbira.com wrote: But there are some confusions in postgres; ReadBufferCount and BufferHitCount are used for get and hit, but heap_blks_read and heap_blks_hit are used for read and hit in pg_statio_all_tables. I see. :( I fixed the confusions of get, hit

[HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-09-28 Thread Euler Taveira de Oliveira
Hi Itagaki-san, I'm reviewing your patch. Your patch is in good shape. It applies cleanly. All of the things are built as intended (including the two contrib modules). It doesn't include docs but I wrote it. Basically, I produced another patch (that are attached) correcting some minor gripes;

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-09-28 Thread Itagaki Takahiro
Euler Taveira de Oliveira eu...@timbira.com wrote: I'm reviewing your patch. Your patch is in good shape. It applies cleanly. All of the things are built as intended (including the two contrib modules). It doesn't include docs but I wrote it. Basically, I produced another patch (that are

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-09-28 Thread Euler Taveira de Oliveira
Itagaki Takahiro escreveu: Thanks. Except choice of words, can I think the basic architecture of the patch is ok? The codes to handle global variables like ReadBufferCount and GlobalReadBufferCount could be rewrite in cleaner way if we could drop supports of

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements (review)

2009-09-28 Thread Tom Lane
Euler Taveira de Oliveira eu...@timbira.com writes: Itagaki Takahiro escreveu: Thanks. Except choice of words, can I think the basic architecture of the patch is ok? The codes to handle global variables like ReadBufferCount and GlobalReadBufferCount could be rewrite in cleaner way if we could

[HACKERS] Buffer usage in EXPLAIN and pg_stat_statements

2009-08-17 Thread Itagaki Takahiro
Here is a proposal to add buffer usage information to EXPLAIN and contrib/pg_stat_statements. We can retrieve new values 'gets', 'reads' and 'temp': - gets : total number of buffer pool access - reads : total number of data file access - temp : total number of temp file access

Re: [HACKERS] Buffer usage in EXPLAIN and pg_stat_statements

2009-08-17 Thread Pavel Stehule
2009/8/17 Itagaki Takahiro itagaki.takah...@oss.ntt.co.jp: Here is a proposal to add buffer usage information to EXPLAIN and contrib/pg_stat_statements. We can retrieve new values 'gets', 'reads' and 'temp':    - gets  : total number of buffer pool access    - reads : total number of data