Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tEEoD-006B6l-RL for pgsql-general@arkaria.postgresql.org; Thu, 21 Nov 2024 21:33:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tEEoC-001tJX-IZ for pgsql-general@arkaria.postgresql.org; Thu, 21 Nov 2024 21:33:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tEEoC-001tJP-74 for pgsql-general@lists.postgresql.org; Thu, 21 Nov 2024 21:33:52 +0000 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tEEoA-003AWY-9j for pgsql-general@postgresql.org; Thu, 21 Nov 2024 21:33:51 +0000 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-296252514c2so1323838fac.3 for ; Thu, 21 Nov 2024 13:33:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732224829; x=1732829629; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mghh+ZVHtKnnxxtUtDbW3aLwY8zjGOuANVMZvpaoAzA=; b=UXSjZihWzIojo0CTkNd1cqnUezPZDTLxxw0zPflPbO7LA8dEHQTwEzkI00Do4L5tBw VBzfDySwp3dm+S92trYP8b8j766NrQhSpjZYaAUXB8L84x2bEi1o3stcm55J21PwIKl9 SBcoVAAJ/IzGudcw/ufDBDJndYmUybjGjnrQWVfW1POY1dIbGSZTZZeQRTVccPH+2Z6p h04deulu+TvO0qzPG9YW6TDWhSPHy4EQ2YjIqxjdCJM0Jwhi6uEjrYIEz/84AHYORKX8 q19HE3IuN/Bbpi/j3XtKJhOBEfxMsDNY5hx/PAiXIel+wYrr2jBhHR+IS4ce+b18XBrd UrWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732224829; x=1732829629; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mghh+ZVHtKnnxxtUtDbW3aLwY8zjGOuANVMZvpaoAzA=; b=iQtzi+MtS+RU2P2GAxF891PnLh/E4TBJ7ZnkZY/6SF6kuvlleVheOvKc9QcFFsU2ZQ Z0SsL1FtTRslb7QRQY83Cww+iwcfoCV1qRg0sU33V13vaZeXTFAolTbsTdqPgUqCUMiA XildmaPI+xlLOxN9Art07NwU6qjOScYcQGJRcjIXoTJNqVOredCWcF912dnJkAYwhKKV 0YZ6oCeBHnuWqVMcyxtG3z2SeRHnoLReWm6vw1yFF4FsKy01r0PLif/SYBIbu8GS/G1t rlrdIMWBWrIri8EKwLwwg0t79EXSzn0WHTTwEGakhCoGnZ+3Kmt2ZoS+9wSOaFQDOGaL mNcA== X-Gm-Message-State: AOJu0Yw7n6/zNBr7yI6LX2FwxQh8c+0CKi139vgxCqJSIZZ1Xtd7qJJU GoUauINB8oXOp5jomBcjEGdUkD1xkRjXAF9NoXnGeHQ0RsDQ9iBZMY2eJdY4YSjYng4nUoK1TUd Ao8IBeoo+gjLFot4zuPYIvpC4CyoiGwv7 X-Gm-Gg: ASbGncv8kCxIkF4pWpwR0RX1H7If45lqZ0VAV+lAhxDaNxD16Chy7oA9jvMCfS+AVb/ NyFENbQ6g6oJ9qUZFH0zu/Rwm4SjcLZc= X-Google-Smtp-Source: AGHT+IFzzv0g46Qx9hJtJPA3j0zjjukiFxAIHh/zDUMIwlyE0yFfzXfT+SjuIEVg5QVMXl4E5QncshQtr1PkAYSsVhQ= X-Received: by 2002:a05:6870:ab15:b0:296:a888:8bc7 with SMTP id 586e51a60fabf-29720bc962emr555114fac.11.1732224828692; Thu, 21 Nov 2024 13:33:48 -0800 (PST) MIME-Version: 1.0 References: <6a157286-5948-48ac-bc50-7bb4e65ee5e5@aklaver.com> <38725031-5e80-46ee-b403-a92107b24c39@aklaver.com> <1e2db3f5-00f4-4ec2-800f-46136c2fad59@aklaver.com> In-Reply-To: From: Steeve Boulanger Date: Thu, 21 Nov 2024 15:33:36 -0600 Message-ID: Subject: Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why? To: Ron Johnson Cc: pgsql-general Content-Type: multipart/alternative; boundary="00000000000095dee3062773056c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000095dee3062773056c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Ron, > Also, "SELECT pg_postmaster_start_time();" to show the *real* Postgresql start time, instead of what you think it is. Yes you're right - I should have been more explicit. [local]:5432 postgres@postgres=3D# select current_timestamp - pg_postmaster_start_time() as uptime; uptime ------------------------- 15 days 10:03:44.048383 -Steeve On Thu, Nov 21, 2024 at 3:30=E2=80=AFPM Ron Johnson wrote: > On Thu, Nov 21, 2024 at 4:12=E2=80=AFPM Adrian Klaver > wrote: > >> On 11/21/24 12:57, Steeve Boulanger wrote: >> > >> > > Please reply to list also. >> > >> > My apologies - I thought I did a "Reply all", but apparently not. I'm = a >> > little bit of a noob with email distrib lists. >> > >> > > 1) What is log_min_error_statement set to? >> > >> > name | setting | pending_restart >> > -------------------------+---------+----------------- >> > log_min_error_statement | error | f >> > >> > > 2) Did you reload the server when changing?: >> > >> > yes - pg_reload_conf() >> >> All I can think to do is look at the logs around the stats_reset times >> for the databases and see if there is anything relevant. >> > > Also, "SELECT pg_postmaster_start_time();" to show the *real* Postgresql > start time, instead of what you think it is. > > -- > Death to , and butter sauce. > Don't boil me, I'm still alive. > lobster! > --00000000000095dee3062773056c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Ron,

> Also, "SELECT pg_p= ostmaster_start_time();" to show the=C2=A0real=C2=A0Postgresql = start time, instead of what you think it is.

Yes y= ou're right - I should have been more explicit.=C2=A0

[local]:5432 postgres@postgres=3D# select current_timestamp - pg_po= stmaster_start_time() as uptime;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uptim= e
-------------------------
=C2=A015 days 10:03:44.048383

-Steeve

On Thu, Nov 21, 2024 at 3:30=E2=80=AFPM Ron = Johnson <ronljohnsonjr@gmail.= com> wrote:
On Thu, Nov 21, 2024 at 4:12=E2=80=AFP= M Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 11/21/24 12:57, = Steeve Boulanger wrote:
>
>=C2=A0 > Please reply to list also.
>
> My apologies - I thought I did a "Reply all", but apparently= not. I'm a
> little bit of a noob with email distrib lists.
>
>=C2=A0 > 1) What is log_min_error_statement set to?
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 name =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 | setting | pending_restart
> -------------------------+---------+-----------------
>=C2=A0 =C2=A0log_min_error_statement | error =C2=A0 | f
>
>=C2=A0 > 2) Did you reload the server when changing?:
>
> yes - pg_reload_conf()

All I can think to do is look at the logs=C2=A0 around the stats_reset time= s
for the databases and see if there is anything relevant.
=C2=A0
Also, "SELECT pg_postmaster_start_time();" to= show the real=C2=A0Postgresql start time, instead of what you think= it is.

--=
Dea= th to <Redacted>, and butter sauce.
Don't boil me, I'm st= ill alive.
<Redacted> lobster!
--00000000000095dee3062773056c--