From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: chris+postgresql@qwirx.com
Subject: pgstattuple() should not be used on hash indexes
Date: Mon, 08 Feb 2021 16:08:16 +0000
Message-ID: <161280049644.664.3414087059452030397@wrigleys.postgresql.org> (raw)
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/13/pgstattuple.html
Description:
pgstattuple works on some non-table relations, such as indexes. However it
does not work reliably on hash indexes. It works on some, but on others it
reports a scary warning: "index contains unexpected zero page at block,
Hint: Please REINDEX it."
The REINDEX works (makes it possible to use pgstattuple again), but as more
records are added to the index, the same error will eventually reoccur. The
problem is not with the index, but that pgstattuple doesn't support it
properly. You should use pgstathashindex instead.
See this post for more information:
https://www.postgresql.org/message-id/CAE9k0Pm8NWvPF2KCGVCpb6OivE%3DGdg-eQ_cLz7UMhxuDOq_1YQ%40mail.g...
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, chris+postgresql@qwirx.com
Subject: Re: pgstattuple() should not be used on hash indexes
In-Reply-To: <161280049644.664.3414087059452030397@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox