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 1kIZPG-0004XK-72 for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Sep 2020 15:31:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kIZPE-0007lF-Vh for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Sep 2020 15:31:36 +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 1kIZPE-0007l7-85 for pgsql-bugs@lists.postgresql.org; Wed, 16 Sep 2020 15:31:36 +0000 Received: from mail.dalibo.com ([212.85.157.172]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIZP6-0006pI-M5 for pgsql-bugs@lists.postgresql.org; Wed, 16 Sep 2020 15:31:34 +0000 Received: from firost (larco.ioguix.net [82.66.0.6]) by mail.dalibo.com (Postfix) with ESMTPSA id D32D11FE06; Wed, 16 Sep 2020 17:31:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1600270284; bh=JEwkx0DK7Y9yErCNGIeppFmnswRztetYQ+6LQOqHKvQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Nfg3CMikmkO4Xz7XHQpzXt8/SdfRJ0WnmfTpHuLj9VRzYBEz453IHe2Ksw2JNhjA1 iL2LhcYW6CYsF9epcGmwnK5gzY+kp2NKmQfCtmPuYUfbRDj0S0CRsxEko2ARM9MHBk Z7olg3Y8LWuUQxhV3IIHZpGsNjFTioCkGEec2dZ8= Date: Wed, 16 Sep 2020 17:31:24 +0200 From: Jehan-Guillaume de Rorthais To: =?UTF-8?B?UkVDSFTDiQ==?= Marc Cc: pgsql-bugs@lists.postgresql.org Subject: Re: Inconsitancies in pg_stat_bgwriter and pg_stat_database returned values Message-ID: <20200916173124.297baa41@firost> In-Reply-To: <721986302.8509039.1600268805471.JavaMail.zimbra@meteo.fr> References: <721986302.8509039.1600268805471.JavaMail.zimbra@meteo.fr> Organization: Dalibo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 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,