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 1kIZ1Q-0003Fd-VR for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Sep 2020 15:07:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kIZ1N-0004md-8t for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Sep 2020 15:06:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIZ1N-0004mW-2q for pgsql-bugs@lists.postgresql.org; Wed, 16 Sep 2020 15:06:57 +0000 Received: from smtp-zimbra.meteo.fr ([137.129.16.22] helo=celebrian2.meteo.fr) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIZ1E-0006cx-CG for pgsql-bugs@lists.postgresql.org; Wed, 16 Sep 2020 15:06:55 +0000 Received: from localhost (localhost [127.0.0.1]) by celebrian2.meteo.fr (Postfix) with ESMTP id EF30F4854E for ; Wed, 16 Sep 2020 17:06:45 +0200 (CEST) Received: from celebrian2.meteo.fr ([127.0.0.1]) by localhost (celebrian2.meteo.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id slHOls0_bsA9 for ; Wed, 16 Sep 2020 17:06:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by celebrian2.meteo.fr (Postfix) with ESMTP id D5AE148554 for ; Wed, 16 Sep 2020 17:06:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at celebrian2.meteo.fr Received: from celebrian2.meteo.fr ([127.0.0.1]) by localhost (celebrian2.meteo.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wJxAoiJBxVQl for ; Wed, 16 Sep 2020 17:06:45 +0200 (CEST) Received: from zumba2.meteo.fr (zumba2 [172.31.9.198]) by celebrian2.meteo.fr (Postfix) with ESMTP id BC9314854E for ; Wed, 16 Sep 2020 17:06:45 +0200 (CEST) Date: Wed, 16 Sep 2020 17:06:45 +0200 (CEST) From: =?utf-8?Q?RECHT=C3=89?= Marc To: pgsql-bugs@lists.postgresql.org Message-ID: <721986302.8509039.1600268805471.JavaMail.zimbra@meteo.fr> Subject: 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: 7bit X-Originating-IP: [172.31.9.205] X-Mailer: Zimbra 8.7.11_GA_3822 (ZimbraWebClient - FF80 (Linux)/8.7.11_GA_3822) Thread-Index: E3QcPZYjakbPHAaWHs9Cjbu0piVHZQ== Thread-Topic: Inconsitancies in pg_stat_bgwriter and pg_stat_database returned values List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, On one particular PG12.3 instance (same behaviour with PG12.4) we are experimenting occasional strange values in the above tables. For instance looping (10s. period) over this request: SELECT current_timestamp, checkpoints_timed, checkpoints_req, checkpoint_write_time, checkpoint_sync_time, buffers_checkpoint, buffers_clean, maxwritten_clean, buffers_backend, buffers_backend_fsync, buffers_alloc FROM pg_stat_bgwriter Gives: 020-09-16 13:41:39.781609+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:41:49.815612+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:41:59.851812+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:42:09.89053+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:42:19.923291+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:42:29.959282+00,3291,227,1278516493,26327,66708986,1743379,16800,253585756,0,59080296 2020-09-16 13:42:39.98198+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:42:50.028727+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:43:00.067928+00,3291,227,1278516493,26327,66709285,1743379,16800,253585756,0,59080296 2020-09-16 13:43:10.090266+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:43:20.140272+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:43:30.170372+00,3291,227,1278516493,26327,66709585,1743379,16800,253585756,0,59080296 2020-09-16 13:43:40.204747+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:43:50.239374+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:44:00.26905+00,3291,227,1278516493,26327,66709884,1743379,16800,253585756,0,59080296 2020-09-16 13:44:10.314927+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:44:20.351091+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:44:30.408797+00,3291,227,1278516493,26327,66710184,1743379,16800,253585756,0,59080296 2020-09-16 13:44:40.44833+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 2020-09-16 13:44:50.484298+00,438,2,10095976,0,611207,870625,8695,612255,0,39028850 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, then back to 438. We experiment the same issue in pg_stat_database. Thanks