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 1lC4ji-0001DT-AF for pgsql-general@arkaria.postgresql.org; Tue, 16 Feb 2021 18:06:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lC4jh-0007EG-8d for pgsql-general@arkaria.postgresql.org; Tue, 16 Feb 2021 18:06:09 +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 1lC4jg-0007C2-Pc for pgsql-general@lists.postgresql.org; Tue, 16 Feb 2021 18:06:08 +0000 Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lC4jc-0002ea-NI for pgsql-general@lists.postgresql.org; Tue, 16 Feb 2021 18:06:07 +0000 Received: by mail-qk1-x730.google.com with SMTP id m144so10238991qke.10 for ; Tue, 16 Feb 2021 10:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=americanefficient-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2NqY1Fj6d7qioN+lxpskuwchxgtffE2yXM/45CS9Dos=; b=FhJ0aM4MyzK4HB12g5//DU6C/jXp6tF3poArmK9CuuScbabxqAoz/a5IP+8KzGikcG bnZnFtlHUSTIUxY9RKLBGnMppJlBGLcTOe8kCZFGtbAYkbOUyBX0WGwZ+rB927eN98NS 1eO6VJCl9X+c3AVDskZxbmfhDEfBIsFHdo7iW3BegNCj5iz3PqA5ZaEC9Qq4lH/BET0l N1HVWpJx6iL8dNev1ExH+Zzo75nj0Q7KPaL6u4JnZbmNwUwTeGIbzUEquk/l7ieHxHoX KttXL/1UV/XZIOOrT5GjULHYIsBFtlSVEjm/pC0nH9s/8DS5L0VPsWm3J69ISaKrPJqh PmrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2NqY1Fj6d7qioN+lxpskuwchxgtffE2yXM/45CS9Dos=; b=EOfMj3kPcT80Ux3SWn8rh/pKCPWVeAxP/Ad48ojLwjZ4s6MpBNVumrEu3ZU2hAcY43 RntmHjBokVG0PkcyVWWfKk09YpdnbRCzUkpO0Fi0iXWRPZFSYW8FEmL0Rg422d1p+5F6 tpQWze3OeMkoo+TrwDMkHEzVY117SKiZa4+UMglLRZP+eT9GhFFBg+WZuQVmj7/IkSnv EKVBxxWjIJ5X1/GAVaSQQPZSLw7JQo11+sq83qSL/Anq83zlPBgBVRGKNKQp5sQmWhPK qmzXSGG6+/Lr13UKSd/tpnv4RYddx+Sg9QD9oUpuptXCSMrY9qKzbibF2emlEeVcw7Lh gzKw== X-Gm-Message-State: AOAM5332F6cqSgYTj/lCrZtlAyYOIkwX9BOFTDPVLkccij0u1CA9Gio8 mVWlDQBd+5qD0xDY/A6x5X01bg== X-Google-Smtp-Source: ABdhPJxbRi1BhU358B677TckZJmGi5V50qThpND87Qy42OOUAQAfoGC9qYAeeY1ZcRgH2dLplAmRaA== X-Received: by 2002:a37:4cd0:: with SMTP id z199mr8224071qka.164.1613498763048; Tue, 16 Feb 2021 10:06:03 -0800 (PST) Received: from [10.0.1.10] (cpe-98-26-29-163.nc.res.rr.com. [98.26.29.163]) by smtp.gmail.com with ESMTPSA id m21sm13669300qtq.52.2021.02.16.10.06.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Feb 2021 10:06:02 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: pg_stat_user_tables.n_mod_since_analyze persistence? From: Philip Semanchuk In-Reply-To: <2274377.1613422510@sss.pgh.pa.us> Date: Tue, 16 Feb 2021 13:06:01 -0500 Cc: PostgreSQL General Content-Transfer-Encoding: quoted-printable Message-Id: <298AB498-BC58-4657-B99F-48EB34C4CDB9@americanefficient.com> References: <2274377.1613422510@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3654.60.0.2.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Feb 15, 2021, at 3:55 PM, Tom Lane wrote: >=20 > 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. >=20 >> 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 table foo had n_mod_since_analyze=3D33 before the reboot, it still = has n_mod_since_analyze=3D33 after the restart.=20 >=20 >> 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.=20 >=20 >> Can anyone confirm (or refute) that the behavior I see on my Mac = (preservation of these values through a restart) is common & expected = behavior? >=20 > Yeah, in PG those stats would be preserved, at least as long as it's > a clean shutdown. Thanks, Tom. A colleague pointed me to a blog post by Michael Vitale = that confirms this bug on AWS and contains more detail: https://elephas.io/685-2/ Hope this helps someone else Philip=