Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?

From: Steeve Boulanger <sboulanger29(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: "Ray O'Donnell" <ray(at)rodonnell(dot)ie>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?
Date: 2024-11-24 00:20:28
Message-ID: CAAiSvx-=6He5yKjqGZbZ_4BusMdNH4JRhSzY2xjriSAA=sPRFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Apologies for the late reply.

> I'm guessing shutting down Netdata did not stop the resets?

There was a hiccup yesterday, so I had to redo the test and wait until
today to see if there were any stats resets ... and NONE today!!

reset_status | cnt
--------------------+-----
reset before today | 100
no reset | 57
reset today | 0

This is quite interesting, and a little unexpected... but in order to
confirm this theory, I have done the following just now:

1) Restart Netdata service
2) rename the "pg_stat_reset()" function , as you suggested in another
post - very clever btw! :-)

Now let's wait until tomorrow to see if we have any stats reset and/or some
relevant errors in the PG logs!

Quick note: I did do a quick check in any user functions for any
"pg_stat_reset" calls , but didn't find any. With that said, we have 150+
databases in our cluster, so perhaps I missed something. I also did a grep
on the netdata directories, but nothing as well.

-Steeve

On Sat, Nov 23, 2024 at 10:19 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 11/23/24 05:16, Steeve Boulanger wrote:
> >> Here (Ireland) we sometimes say "common-or-garden variety".... It means
> a normal, everyday variety. :-)
> >
> > I'm afraid that my Irish dialect is limited to "sláinte" only ;-) In
> > any case, thanks for taking the time to help with this issue. I'm
> > still investigating, but I think that calling the "ghostbusters" is
> > moving up the list now lol.
>
> I'm guessing shutting down Netdata did not stop the resets?
>
> You might try setting log_min_messages to info to see if that catches
> anything.
>
>
> >
> >
> > On Sat, Nov 23, 2024 at 7:09 AM Ray O'Donnell <ray(at)rodonnell(dot)ie> wrote:
> >>
> >> On 23/11/2024 13:06, Steeve Boulanger wrote:
> >>
> >>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-11-24 00:28:28 Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?
Previous Message Bruce Momjian 2024-11-23 21:39:07 Re: CVE-2024-10979 Vulnerability Impact on PostgreSQL 11.10