public inbox for [email protected]
help / color / mirror / Atom feedFrom: Japin Li <[email protected]>
To: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: Could not use index because of indcheckxmin is true
Date: Thu, 12 Oct 2023 23:31:26 +0800
Message-ID: <MEYP282MB166969CC0F50558A8E4AE486B6D3A@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <[email protected]>
References: <MEYP282MB16694E0A76DD574FE7A31BC8B6D3A@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
<[email protected]>
On Thu, 12 Oct 2023 at 22:30, Tom Lane <[email protected]> wrote:
> Japin Li <[email protected]> writes:
>> When I create an index using CREATE INDEX (without concurrently), I get
>> an index which indcheckxmin is true. According to the docs[1], it cannot
>> be used with indcheckxmin is ture, how can I fix this?
>
> There is nothing to fix; you just wait a little bit.
>
>>> indcheckxmin bool
>>> If true, queries must not use the index until the xmin of this pg_index
>>> row is below their TransactionXmin event horizon, because the table may
>>> contain broken HOT chains with incompatible rows that they can see
>
> Note the "until" clause. Once transactions that ran concurrently
> with the CREATE INDEX are done, the index is available for use.
> There is no need for anyone to clear the indcheckxmin flag, and
> AFAIR there is no code that does so.
>
Thanks for your explanation. After wait a moment, the index can be used.
--
Regrads,
Japin Li
view thread (3+ messages)
reply
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Could not use index because of indcheckxmin is true
In-Reply-To: <MEYP282MB166969CC0F50558A8E4AE486B6D3A@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox