public inbox for [email protected]  
help / color / mirror / Atom feed
pgsql: Relax assertion in finding correct GiST parent
6+ messages / 1 participants
[nested] [flat]

* pgsql: Relax assertion in finding correct GiST parent
@ 2025-04-04 11:04  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-04-04 11:04 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
Reviewed-by: Tender Wang <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7afca7edef751b8d7c0f5b6402ffcefc11c67fdd

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Relax assertion in finding correct GiST parent
@ 2025-04-04 11:04  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-04-04 11:04 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
Reviewed-by: Tender Wang <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]

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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Relax assertion in finding correct GiST parent
@ 2025-04-04 11:04  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-04-04 11:04 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
Reviewed-by: Tender Wang <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/41932139882e20724c6a0a8c0363b26211793c36

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Relax assertion in finding correct GiST parent
@ 2025-04-04 11:04  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-04-04 11:04 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
Reviewed-by: Tender Wang <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3c0fe75c412b26433f9b58dd629e41475861c56d

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Relax assertion in finding correct GiST parent
@ 2025-04-04 11:04  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-04-04 11:04 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
Reviewed-by: Tender Wang <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b92482dc3eff93dafe298a338c75de3177b5b105

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Relax assertion in finding correct GiST parent
@ 2025-04-04 11:04  Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2025-04-04 11:04 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
Reviewed-by: Tender Wang <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a749c6f18fbacd05f432cd29f9e7294033bc666f

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2025-04-04 11:04 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-04 11:04 pgsql: Relax assertion in finding correct GiST parent Heikki Linnakangas <[email protected]>
2025-04-04 11:04 pgsql: Relax assertion in finding correct GiST parent Heikki Linnakangas <[email protected]>
2025-04-04 11:04 pgsql: Relax assertion in finding correct GiST parent Heikki Linnakangas <[email protected]>
2025-04-04 11:04 pgsql: Relax assertion in finding correct GiST parent Heikki Linnakangas <[email protected]>
2025-04-04 11:04 pgsql: Relax assertion in finding correct GiST parent Heikki Linnakangas <[email protected]>
2025-04-04 11:04 pgsql: Relax assertion in finding correct GiST parent Heikki Linnakangas <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox