Re: BUG #5095: pg_statio_xxx_sequences does not work - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5095: pg_statio_xxx_sequences does not work
Date
Msg-id 17378.1254524007@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5095: pg_statio_xxx_sequences does not work  ("Akira Kurosawa" <kurosawa-akira@mxc.nes.nec.co.jp>)
List pgsql-bugs
"Akira Kurosawa" <kurosawa-akira@mxc.nes.nec.co.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

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #5090: erro
Next
From: Robert Haas
Date:
Subject: Re: BUG #5089: not supported plpsql