pgsql: Relax assertion in finding correct GiST parent - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Relax assertion in finding correct GiST parent
Date
Msg-id E1u0eqv-002cd3-1U@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Relax assertion in finding correct GiST parent

Commit 28d3c2ddcf introduced an assertion that if the memorized
downlink location in the insertion stack isn't valid, the parent's
LSN should've changed too. Turns out that was too strict. In
gistFindCorrectParent(), if we walk right, we update the parent's
block number and clear its memorized 'downlinkoffnum'. That triggered
the assertion on next call to gistFindCorrectParent(), if the parent
needed to be split too. Relax the assertion, so that it's OK if
downlinkOffnum is InvalidOffsetNumber.

Backpatch to v13-, all supported versions. The assertion was added in
commit 28d3c2ddcf in v12.

Reported-by: Alexander Lakhin <exclusion@gmail.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Discussion: https://www.postgresql.org/message-id/18396-03cac9beb2f7aac3@postgresql.org

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6526d07948c58fd83a71a902bea8caa793c9c4b8

Modified Files
--------------
src/backend/access/gist/gist.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Fujii Masao
Date:
Subject: pgsql: Allow "COPY table TO" command to copy rows from materialized vie
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: docs: Clarify that NULL arg to set_config() means reset to defau