From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: nbtree: Demote minus infinity "can't happen" error.
Date: Tue, 10 Mar 2020 21:16:47 +0000
Message-ID: <E1jBmF5-0002BW-Gy@gemulon.postgresql.org> (raw)
nbtree: Demote minus infinity "can't happen" error.
Only a very basic logic bug in a _bt_insertonpg() caller could lead to a
violation of this invariant. Besides, any newitemoff used for an
internal page is sanitized using other "can't happen" errors in
_bt_getstackbuf() or its callers, before _bt_insertonpg() even gets
called.
Also, move the error/assertion from the insert-without-split path of
_bt_insertonpg() to the top of the same function. There is no reason
why this invariant only applies to insertions that happen to not result
in a page split; cover every insertion. The assertion naturally belongs
next to the existing generic assertions that document relatively
high-level invariants for the item being inserted.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d1e241c22602a5369b54e29b7430553445f6a52b
Modified Files
--------------
src/backend/access/nbtree/nbtinsert.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: pg@bowt.ie
Subject: Re: pgsql: nbtree: Demote minus infinity "can't happen" error.
In-Reply-To: <E1jBmF5-0002BW-Gy@gemulon.postgresql.org>
References: <E1jBmF5-0002BW-Gy@gemulon.postgresql.org>
* 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