Re: BUG #5095: pg_statio_xxx_sequences does not work

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Akira Kurosawa" <kurosawa-akira(at)mxc(dot)nes(dot)nec(dot)co(dot)jp>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5095: pg_statio_xxx_sequences does not work
Date: 2009-10-02 22:53:27
Message-ID: 17378.1254524007@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Akira Kurosawa" <kurosawa-akira(at)mxc(dot)nes(dot)nec(dot)co(dot)jp> writes:
> This problem happens because "pgstat_info" was not initialized in the
> function
> "pgstat_initstats" when relkind = 'S'. (pgstat_info = NULL).

Looks like my oversight :-(. Patch applied, thanks for the report!

Interestingly, it seems that this causes nextval() to consistently
increment the sequence's blocks-read or blocks-hit count, which
according to my testing it did not always do pre-8.3. The commit
message for the patch that created this bug mentions

And fix a few
corner cases in which counts might be missed because the relation's
pgstat_info pointer hadn't been set.

so I guess this is a side-effect of that.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2009-10-03 01:01:54 Re: BUG #5089: not supported plpsql
Previous Message Robert Haas 2009-10-02 21:29:26 Re: BUG #5090: erro