PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID15801
PG Version11.1
OSlinux
Opened2019-05-13 07:15:47+00
Reported byzhang lian zhuang
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      15801
Logged by:          zhang lian zhuang
Email address:      (redacted)
PostgreSQL version: 11.1
Operating system:   linux
Description:        

pg_stat_reset_single_table_counters/pg_stat_reset_single_function_counters
only update pg_stat_database column stats_reset.
stat_reset shuld update when all the column is reset.

sample:
drop database if exists lzzhang_db;
create database lzzhang_db;
\c lzzhang_db

create table lzzhang_tab(id int);
insert into lzzhang_tab values(1);
insert into lzzhang_tab values(1);

select tup_fetched, stats_reset from pg_stat_database where
datname='lzzhang_db';
select pg_sleep(1);

select pg_stat_reset_single_table_counters('lzzhang_tab'::regclass::oid);
select tup_fetched, stats_reset from pg_stat_database where
datname='lzzhang_db';

result:
 tup_fetched |          stats_reset          
-------------+-------------------------------
         514 | 2019-05-12 03:22:55.702753+08
(1 row)
 tup_fetched |          stats_reset          
-------------+-------------------------------
         710 | 2019-05-12 03:22:56.729336+08
(1 row)
tup_fetched is not reset。

Messages

DateAuthorSubject
2019-05-13 07:15:47+00PG Bug reporting formBUG #15801: pg_stat_database update stats_reset only by pg_stat_reset
2019-05-13 08:20:26+00Michael PaquierRe: BUG #15801: pg_stat_database update stats_reset only by pg_stat_reset
2019-05-13 08:23:54+00Kuntal GhoshRe: BUG #15801: pg_stat_database update stats_reset only by pg_stat_reset
2019-05-13 08:51:42+00Kuntal GhoshRe: Re: BUG #15801: pg_stat_database update stats_reset only by pg_stat_reset