From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: pgstatindex vs. !indisready
Date: Sun, 01 Oct 2023 16:37:25 -0400
Message-ID: <1867127.1696192645@sss.pgh.pa.us> (raw)
In-Reply-To: <20231001195309.a3@google.com>
References: <20231001195309.a3@google.com>
Noah Misch <noah@leadboat.com> writes:
> Running pgstatindex on some !indisready indexes fails with "ERROR: XX001:
> could not read block 0 in file". This reproduces it:
> ...
> Since XX001 = ERRCODE_DATA_CORRUPTED appears in the "can't-happen" class, it's
> not a good fit for this scenario. I propose to have pgstatindex fail early on
> !indisready indexes.
+1
> We could go a step further and also fail on
> indisready&&!indisvalid indexes, which are complete enough to accept inserts
> but not complete enough to answer queries. I don't see a reason to do that,
> but maybe someone else will.
Hmm. Seems like the numbers pgstatindex would produce for a
not-yet-complete index would be rather irrelevant, even if the case
doesn't risk any outright problems. I'd be inclined to be
conservative and insist on indisvalid being true too.
regards, tom lane
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, noah@leadboat.com
Subject: Re: pgstatindex vs. !indisready
In-Reply-To: <1867127.1696192645@sss.pgh.pa.us>
* 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