aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2020-08-03 13:04:42 -0700
committerPeter Geoghegan <pg@bowt.ie>2020-08-03 13:04:42 -0700
commita451b7d44249b8655db8d40476ace9f84d76ab88 (patch)
treecfdc9079c206988dd7672bfa93963f933c360b22 /src
parent9e496768b8a7303ea07888ea1baae8e2a57dda7b (diff)
downloadpostgresql-a451b7d44249b8655db8d40476ace9f84d76ab88.tar.gz
postgresql-a451b7d44249b8655db8d40476ace9f84d76ab88.zip
Add nbtree page deletion assertion.
Add a documenting assertion that's similar to the nearby assertion added by commit cd8c73a3. This conveys that the entire call to _bt_pagedel() does no work if it isn't possible to get a descent stack for the initial scanblkno page.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/nbtree/nbtpage.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index 70bac0052fc..53dff326808 100644
--- a/src/backend/access/nbtree/nbtpage.c
+++ b/src/backend/access/nbtree/nbtpage.c
@@ -1697,6 +1697,7 @@ _bt_pagedel(Relation rel, Buffer leafbuf, TransactionId *oldestBtpoXact)
if (_bt_leftsib_splitflag(rel, leftsib, leafblkno))
{
ReleaseBuffer(leafbuf);
+ Assert(ndeleted == 0);
return ndeleted;
}