public inbox for [email protected]
help / color / mirror / Atom feedFrom: Steeve Boulanger <[email protected]>
To: Greg Sabino Mullane <[email protected]>
Cc: Ray O'Donnell <[email protected]>
Cc: Adrian Klaver <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?
Date: Mon, 25 Nov 2024 20:48:38 -0600
Message-ID: <CAAiSvx8-2MNZ=t1o_PU9R-Z84kL8c-nNGq4FMmdy9jc7z-M7FA@mail.gmail.com> (raw)
In-Reply-To: <CAKAnmmLnTkwgpbmjafjWcxci29Jn24nF8gqUp4kmbBv_YFASCQ@mail.gmail.com>
References: <CAAiSvx8_Z6QGey92dC+6Yona18KDMLWinfR5LOJsMgj-42XJtg@mail.gmail.com>
<[email protected]>
<CAAiSvx_vsiCmL3gBj+1hRpMxo=nOc3HUa+VaGO9_GfOXDWCsrQ@mail.gmail.com>
<[email protected]>
<CAAiSvx-pwz562KrTPdayK+qqRm9DxbrU1r9_Qkpm5BLh-1G+pA@mail.gmail.com>
<[email protected]>
<CAAiSvx_ZtM72ZO=uq56X=iJ=a17KcgB=07c5abyFnQ8vAses0Q@mail.gmail.com>
<[email protected]>
<CAAiSvx-JPJCGc_VR+YrUNo75pb0yrmB8Ng3zBOCf+Mksdo5JYg@mail.gmail.com>
<[email protected]>
<CAAiSvx9CangeS_yZ6RLXsXHBZSKmuRvrcB39DNSB_Ler3=OhTw@mail.gmail.com>
<01020193592431ad-0fedca70-38e9-4fd0-bf49-f5bbf628c76e-000000@eu-west-1.amazonses.com>
<CAAiSvx9HPJAXtTxyjs7uyJN+0NSBXGtwJiF15GSAjHdYwh4V7A@mail.gmail.com>
<CAKAnmmLnTkwgpbmjafjWcxci29Jn24nF8gqUp4kmbBv_YFASCQ@mail.gmail.com>
> As a superuser, rename pg_stat_reset inside one of the commonly affected
databases:
> alter function pg_stat_reset rename to
hey_stop_running_pg_stat_reset_already;
> Then see who starts complaining. Additionally, your server log will get
helpful entries like this:
Thanks for the tip Greg - that's very clever! I've done this just now,
and will check back tomorrow to see if there's any corresponding error
message.
NB: I hadn't originally realized that the system functions (ie pg_*) were
created for each database, so I had renamed only the one in the postgres
database, thinking it was global (ie I'll blame this on my Oracle days
;-)).
Now I renamed the function under one database that had been verified as
getting its stats reset on a daily basis. Hopefully tomorrow we'll get more
interesting info!
-Steeve
On Sat, Nov 23, 2024 at 11:50 AM Greg Sabino Mullane <[email protected]>
wrote:
> As a superuser, rename pg_stat_reset inside one of the commonly affected
> databases:
>
> alter function pg_stat_reset rename to
> hey_stop_running_pg_stat_reset_already;
>
> Then see who starts complaining. Additionally, your server log will get
> helpful entries like this:
>
> ERROR: function pg_stat_reset() does not exist
>
> Cheers,
> Greg
>
>
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why?
In-Reply-To: <CAAiSvx8-2MNZ=t1o_PU9R-Z84kL8c-nNGq4FMmdy9jc7z-M7FA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox