Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kInYk-00045O-Fa for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Sep 2020 06:38:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kInYi-000468-JF for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Sep 2020 06:38:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kInYi-000461-DC for pgsql-bugs@lists.postgresql.org; Thu, 17 Sep 2020 06:38:20 +0000 Received: from smtp-zimbra.meteo.fr ([137.129.16.22] helo=celebrian1.meteo.fr) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kInYb-0007ry-Aw for pgsql-bugs@lists.postgresql.org; Thu, 17 Sep 2020 06:38:19 +0000 Received: from localhost (localhost [127.0.0.1]) by celebrian1.meteo.fr (Postfix) with ESMTP id 296371C21D1; Thu, 17 Sep 2020 08:38:11 +0200 (CEST) Received: from celebrian1.meteo.fr ([127.0.0.1]) by localhost (celebrian1.meteo.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id usszU3J5ufnF; Thu, 17 Sep 2020 08:38:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by celebrian1.meteo.fr (Postfix) with ESMTP id 0C1331C21D9; Thu, 17 Sep 2020 08:38:11 +0200 (CEST) X-Virus-Scanned: amavisd-new at celebrian1.meteo.fr Received: from celebrian1.meteo.fr ([127.0.0.1]) by localhost (celebrian1.meteo.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 61L2KwQjBOaH; Thu, 17 Sep 2020 08:38:10 +0200 (CEST) Received: from zumba2.meteo.fr (zumba2 [172.31.9.198]) by celebrian1.meteo.fr (Postfix) with ESMTP id E89B01C21D1; Thu, 17 Sep 2020 08:38:10 +0200 (CEST) Date: Thu, 17 Sep 2020 08:38:10 +0200 (CEST) From: =?utf-8?Q?RECHT=C3=89?= Marc To: Jehan-Guillaume de Rorthais Cc: pgsql-bugs@lists.postgresql.org Message-ID: <746448376.8762238.1600324690698.JavaMail.zimbra@meteo.fr> In-Reply-To: <20200916173124.297baa41@firost> References: <721986302.8509039.1600268805471.JavaMail.zimbra@meteo.fr> <20200916173124.297baa41@firost> Subject: Re: Inconsitancies in pg_stat_bgwriter and pg_stat_database returned values MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.31.9.205] X-Mailer: Zimbra 8.7.11_GA_3822 (ZimbraWebClient - FF80 (Linux)/8.7.11_GA_3822) Thread-Topic: Inconsitancies in pg_stat_bgwriter and pg_stat_database returned values Thread-Index: SsO3uCHPHJN5NUHC4GvBHz72HO3gEQ== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, 16 Sep 2020 17:06:45 +0200 (CEST) RECHT=C3=89 Marc wrote: > Hello,=20 >=20 > On one particular PG12.3 instance (same behaviour with PG12.4) we are > experimenting occasional strange values in the above tables.=20 >=20 > For instance looping (10s. period) over this request:=20 >=20 > SELECT current_timestamp, checkpoints_timed,=20 > checkpoints_req,=20 > checkpoint_write_time,=20 > checkpoint_sync_time,=20 > buffers_checkpoint,=20 > buffers_clean,=20 > maxwritten_clean,=20 > buffers_backend,=20 > buffers_backend_fsync,=20 > buffers_alloc=20 > FROM pg_stat_bgwriter=20 >=20 > Gives: [...] > > One can see that some columns that are supposed to increase only are not > always. For instance checkpoints_timed suddenly jumps from 438 to 3291, t= hen > back to 438.=20 >=20 > We experiment the same issue in pg_stat_database.=20 ----- Mail original ----- De: "Jehan-Guillaume de Rorthais" =C3=80: "RECHT=C3=89 Marc" Cc: pgsql-bugs@lists.postgresql.org Envoy=C3=A9: Mercredi 16 Septembre 2020 17:31:24 Objet: Re: Inconsitancies in pg_stat_bgwriter and pg_stat_database returned= values The full row are different in your example, not just a few fields. It looks like mixed values from different instance. Could you share some more informations about the context and how to reprodu= ce it? Regards, Hello=20 Thanks a lot, you got it right: there are 2 instances on this machine and t= hey are both configured with: stats_temp_directory =3D '/dev/shm' We some time ago tried, stats_temp_directory =3D '/dev/shm/instance', but P= ostgreSQL ignored the subdirectory part and kept creating the temp file at = the FS root. As this is a temporary FS, one cannot in advance create the instance subdir= ectory as it is wiped out between reboots. Best regards