public inbox for [email protected]
help / color / mirror / Atom feedFrom: jian he <[email protected]>
To: PostgreSQL-development <[email protected]>
Subject: bt_recheck_sibling_links contrib/amcheck/verify_nbtree.c
Date: Mon, 24 Jul 2023 22:06:34 +0800
Message-ID: <CACJufxH8D-4xw7Qq-uMFCStWATisSLuL+oYT54C3_dRLZh37Yw@mail.gmail.com> (raw)
hi.
I am confused with bt_recheck_sibling_links.
>
> ereport(ERROR,
> (errcode(ERRCODE_INDEX_CORRUPTED),
> errmsg("left link/right link pair in index \"%s\" not in agreement",
> RelationGetRelationName(state->rel)),
> errdetail_internal("Block=%u left block=%u left link from block=%u.",
> state->targetblock, leftcurrent,
> btpo_prev_from_target)));
should we put the above code into the branch {if (!state->readonly)} ?
I can understand it if put inside.
now the whole function be like:
if (!state->readonly)
{}
erreport{}.
---------------------------------------------------------------------------------
if (btpo_prev_from_target == leftcurrent)
{
/* Report split in left sibling, not target (or new target) */
ereport(DEBUG1,
(errcode(ERRCODE_INTERNAL_ERROR),
errmsg_internal("harmless concurrent page split detected in index \"%s\"",
RelationGetRelationName(state->rel)),
errdetail_internal("Block=%u new right sibling=%u original right sibling=%u.",
leftcurrent, newtargetblock,
state->targetblock)));
return;
}
only concurrency read case, (btpo_prev_from_target == leftcurrent)
will be true? If so, then I am confused with the ereport content.
view thread (2+ 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]
Subject: Re: bt_recheck_sibling_links contrib/amcheck/verify_nbtree.c
In-Reply-To: <CACJufxH8D-4xw7Qq-uMFCStWATisSLuL+oYT54C3_dRLZh37Yw@mail.gmail.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