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 1tEq0T-00A3r8-1f for pgsql-general@arkaria.postgresql.org; Sat, 23 Nov 2024 13:17:01 +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 1tEq0R-000k0b-G2 for pgsql-general@arkaria.postgresql.org; Sat, 23 Nov 2024 13:16:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tEq0R-000k0T-4f for pgsql-general@lists.postgresql.org; Sat, 23 Nov 2024 13:16:59 +0000 Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tEq0O-003NTN-Kq for pgsql-general@postgresql.org; Sat, 23 Nov 2024 13:16:57 +0000 Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-2969ae2c99fso1800087fac.3 for ; Sat, 23 Nov 2024 05:16:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732367816; x=1732972616; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yeHXwmbymVTTOUqGRfS5zYyPB6VdxUjux+Es8dMZTHg=; b=Gzot4EdJo4hi3iTnif3PCO+Wf3Jwjothsrf62txY3dopZaKKKwBDaSXYLMumXo44HN Ajwk/kDiVOmyIHwVjWxwW32gG5atfOL7BtmhJRFowv9p8/tMRK9ou77iZaPGdF8557KZ b5teT/Gk493SAOsJr4xRFQfasOqvxSza1QYFgjT2qBuVOUypXRD4ktzI4QvroYTc07dC BKdPGYGSpV4nUUXCFwSeEde/6jBp+U5h3M7YLoCCjjvUNUiEhhFMe+g+J2aPI65pN7ZH CkSclkpuOVPwzaIammeukQ35ob0Q2bU5cjCt7T0/4rLTl5tGzlIYPke5RiIMHgi90M9e kEwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732367816; x=1732972616; h=content-transfer-encoding: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=yeHXwmbymVTTOUqGRfS5zYyPB6VdxUjux+Es8dMZTHg=; b=gT9704UIsZ3r98hkXHkp/QKv+4Zjb3z6Ej2ekPqg6yuH01IWmG9yBP92qjGcoXNaPB uDhG9wkyAjC+HThkvglfV3JjaU0hqW9WSJ7EFkEN1Yif/Fgggc69qLO7/5BseogilfcX K8SkZbQNQgDQPsQOL/N8i+6AwYudd/UVhTgJiXvLIbsJH+a7JNjoLcW1+PJesHv9oD8O PJVrhhnBhltZli8acu+VmDfTdBwp2CzbpN1iOYHv/VrnzIZoH4SqMuB8jDzFDdypKVoH RV/Z5Nj7RUvv3JdcTiZwDoQXVswwGdbwIcGvmdUdXBYIscE8fnYieFOgjgHNDxQ/xbG3 tOFg== X-Forwarded-Encrypted: i=1; AJvYcCXrRShtRlnHgX57T8PgbGpOTeBEATJsEV3ZkNjLs1uTr5n/iXGHergKi5Cr9lypNGxEaXlAYRBfJWV0FttY@postgresql.org X-Gm-Message-State: AOJu0Yz1vdx3DETh3GsrDdeXE8TFcPd5k7slE3mEhpzTlV7nJX/HXWwX It4phKkcyjK36J6fwrPBUAyghyXe6o2Tg0EP7KJaDNFqWn3H+ezUy0xbeVXlC5AQR6zKAUEyyH8 l1rAAAXCV90FXkUuFb/TA5T3qbUagydLg X-Gm-Gg: ASbGncsPuvmrNhM3Gf56BXczM6P82ICrTZv4KJoyfvXksDwLjfl5vTiVPobNFcL3ywQ NWdrKoSksjvEqkXwju6Txeo7RHX1Kq3o= X-Google-Smtp-Source: AGHT+IEPEmtcCWledqcZ9bfT1mBfOy141G2JP8FxXUqeQ2C8tHkaUN1u7wdjcdMZZaSltN10JQXtLU3pVQBIuUA0eks= X-Received: by 2002:a05:6870:6124:b0:288:62c8:fd4b with SMTP id 586e51a60fabf-29720dcd91emr5241377fac.28.1732367815981; Sat, 23 Nov 2024 05:16:55 -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> <1270021b-c5b5-4ca8-b48d-7dfb163bb6f7@aklaver.com> <9a0d0e80-13e1-421a-9d84-da000fe4433a@aklaver.com> <01020193592431ad-0fedca70-38e9-4fd0-bf49-f5bbf628c76e-000000@eu-west-1.amazonses.com> In-Reply-To: <01020193592431ad-0fedca70-38e9-4fd0-bf49-f5bbf628c76e-000000@eu-west-1.amazonses.com> From: Steeve Boulanger Date: Sat, 23 Nov 2024 07:16:44 -0600 Message-ID: Subject: Re: Database stats ( pg_stat_database.stats_reset ) get reset on daily basis - why? To: "Ray O'Donnell" Cc: Adrian Klaver , pgsql-general Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > 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=C3=A1inte" 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. On Sat, Nov 23, 2024 at 7:09=E2=80=AFAM Ray O'Donnell wr= ote: > > On 23/11/2024 13:06, Steeve Boulanger wrote: > > > > The above is some garden variety select? > > Not 100% sure what the expression "garden variety select" means lol, but = I'll take a guess that it means an "select from an in-house application" .= . and yes it is. > > > Here (Ireland) we sometimes say "common-or-garden variety".... It means a= normal, everyday variety. :-) > > Ray. > > > > > -Steeve > > On Fri, Nov 22, 2024 at 11:18=E2=80=AFAM Adrian Klaver wrote: >> >> On 11/21/24 15:50, Steeve Boulanger wrote: >> > > 1) Do the 77 share some trait the other 80 don't. >> > >> > No pattern found yet .. but still verifying a few things >> > >> > > 2) Do the OS system logs reveal anything? >> > >> > Nothing found in syslog >> > >> > > 3) What was happening in the databases just prior to the time the s= tats >> > reset? >> > >> > Here's an example (log extracts) for a stats reset occurrence: >> > >> > select datname, stats_reset, now()-stats_reset as since_reset >> > from pg_stat_database >> > where ( now()-stats_reset ) < interval '1 day' >> > order by 3 limit 1; >> > >> > datname | stats_reset | since_reset >> > ----------------+-------------------------------+----------------- >> > MyDB | *2024-11-21 13:48:34.332*785+00 | 00:00:22.266304 >> > >> > <--LOGS--> >> > 2024-11-21 13:48:34.324 UTC pid=3D[322035][2] db=3D[MyDB] usr=3D[user= 1] >> > client=3D[host1] app=3D[[unknown]]LOG: connection authorized: user=3Du= ser1 >> > database=3DMyDB applicatio >> > n_name=3Dapp1 <..> >> >> What is the [2] referring to? >> >> > >> > <.. no calls at "2024-11-21 13:48:34.332" - WHY?? ..> >> >> My guess is the difference in time it takes to log the action and set >> the log timestamp. Whereas the stats_reset value is the timestamp when >> the stats system actually did the reset. >> >> > >> > 2024-11-21 13:48:34.336 UTC pid=3D[322035][3] db=3D[MyDB] usr=3D[user= 1] >> > client=3D[host1] app=3D[app1]LOG: duration: 1.071 ms parse : >> > SELECT <..> >> >> The above is some garden variety select? >> >> >> >> -- >> Adrian Klaver >> adrian.klaver@aklaver.com >> > > > -- > Raymond O'Donnell // Galway // Ireland > ray@rodonnell.ie