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 1lBktp-0000dz-3I for pgsql-general@arkaria.postgresql.org; Mon, 15 Feb 2021 20:55:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lBktm-0003bn-VS for pgsql-general@arkaria.postgresql.org; Mon, 15 Feb 2021 20:55:14 +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 1lBktm-0003bg-OB for pgsql-general@lists.postgresql.org; Mon, 15 Feb 2021 20:55:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lBktk-00014c-Ju for pgsql-general@lists.postgresql.org; Mon, 15 Feb 2021 20:55:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 11FKtAdV2274378; Mon, 15 Feb 2021 15:55:10 -0500 From: Tom Lane To: Philip Semanchuk cc: PostgreSQL General Subject: Re: pg_stat_user_tables.n_mod_since_analyze persistence? In-reply-to: References: Comments: In-reply-to Philip Semanchuk message dated "Mon, 15 Feb 2021 11:57:55 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2274376.1613422510.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 15 Feb 2021 15:55:10 -0500 Message-ID: <2274377.1613422510@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Philip Semanchuk writes: > I saw some unexpected behavior that I'm trying to understand. I suspect = it might be a quirk specific to AWS Aurora and I'd like to confirm that. > When I restart my local Postgres instance (on my Mac), the values in pg_= stat_user_tables.n_mod_since_analyze are preserved. In other words, if tab= le foo had n_mod_since_analyze=3D33 before the reboot, it still has n_mod_= since_analyze=3D33 after the restart. = > When I restart an AWS Aurora instance, the values in pg_stat_user_tables= .n_mod_since_analyze all seem to be reset to 0. = > Can anyone confirm (or refute) that the behavior I see on my Mac (preser= vation of these values through a restart) is common & expected behavior? Yeah, in PG those stats would be preserved, at least as long as it's a clean shutdown. regards, tom lane