Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmMgw-0007iU-32 for pgsql-admin@arkaria.postgresql.org; Mon, 28 Aug 2017 16:15:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dmMgv-0002QK-Ce for pgsql-admin@arkaria.postgresql.org; Mon, 28 Aug 2017 16:15:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dmMf3-0004fA-Fk for pgsql-admin@postgresql.org; Mon, 28 Aug 2017 16:13:13 +0000 Received: from 104-190-1-44.lightspeed.sndgca.sbcglobal.net ([104.190.1.44] helo=joeconway.com) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmMf0-0007ff-Ft for pgsql-admin@postgresql.org; Mon, 28 Aug 2017 16:13:13 +0000 Received: from [192.168.1.106] (account jconway@joeconway.com [192.168.1.106] verified) by joeconway.com (CommuniGate Pro SMTP 6.1.4) with ESMTPSA id 19036799; Mon, 28 Aug 2017 09:13:03 -0700 Subject: Re: Why is my table not autovacuuming? To: Don Seiler , Phil Frost Cc: pgsql-admin References: From: Joe Conway Openpgp: id=4EA5B4659ED59CC9538139A5332B7E68B699434A Message-ID: <73557173-6cdb-6318-c7a5-e531d385e397@joeconway.com> Date: Mon, 28 Aug 2017 09:13:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="suksnhRaU2UvDoCeGCG63tTEc3oEDhkCj" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --suksnhRaU2UvDoCeGCG63tTEc3oEDhkCj From: Joe Conway To: Don Seiler , Phil Frost Cc: pgsql-admin Message-ID: <73557173-6cdb-6318-c7a5-e531d385e397@joeconway.com> Subject: Re: [ADMIN] Why is my table not autovacuuming? References: In-Reply-To: Content-Language: en-US Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 08/28/2017 08:59 AM, Don Seiler wrote: > So the autovacuum daemon knows that there are 71M rows, even though > pg_stat_all_tables said only 170K? Is it using pg_class.reltuples? Is > pg_stat_all_tables not really a reliable source of stats information? See: file:///opt/src/pgsql-git/master/src/backend/postmaster/autovacuum.c * threshold =3D vac_base_thresh + vac_scale_factor * reltuples pg_stat_all_tables only shows information known by the stats collector, which only knows about activity since the last stats reset (which can happen, for example on "immediate" shutdown or server crash), not absolute numbers (although reltuples is only an estimate too). --=20 Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development --suksnhRaU2UvDoCeGCG63tTEc3oEDhkCj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJZpEEPAAoJEDfy90M199hl5IoP/02kK3wG5Bo9VaFrxLhmsrbU F/UboGblJHiQJpvDLdQe4EVsOHnXsJaN4ppRcQXi4vq8GwXzrs202y+csCtfKM6W IhtGu/cik7sstkyVwKO62s+OvwhUODxtEFPh1JdZRDQbA6UYqREnBWMa+Hdn6WJc FTzochaaMoVipUaWFLeQamOp5+6f2P06l3eqUUtm3k+2JS/al0yc1dvjR2vH0ucM 7E9cHhnJ1wxQniWvtnmNx2bN0hlDbE4J0qt/G+SeAnxmOX9HY5JB40xp4heh2YXR 8CqDUo+wdnidKlgaGBw8HGF2Md3Mfstpf0AJJIeBSxptOFMuotsPL0w3OUVD3kWG RysJwnUqwc9gpDtmr94DUp545TCXtxHx8G7aE3ViQ7Nhv/gCmtn31D4GmWEHLspV ExVEX/MREdDtl6CvLMVhK31AAXdPgqi/QJmWZD7GdHgfw0bcKeX79mQPkvV6Rn7S jIwxzbSxb/O9f7OUZ/MXBqZmgwD4nTPttfCA7o33b50TcOQfDcs4Y4DeAS9hAHA3 OquWZN2rlgyoRVa4jf1c1QW4EtLSLG64+Qqu5ZlLlxspRgNFi48Ys4nBi3Wxhs+O t/VuEe2cw2gRtSrei28B0DzQoqUfkivPVyuHNsPu2JSOV3EFSIj5bjRGvTumVVRg a+YcVBKQfWCXCkKobNYJ =kZYr -----END PGP SIGNATURE----- --suksnhRaU2UvDoCeGCG63tTEc3oEDhkCj--