Re: pgsql: Add deduplication to nbtree. - Mailing list pgsql-committers

From Peter Geoghegan
Subject Re: pgsql: Add deduplication to nbtree.
Date
Msg-id CAH2-Wzmpm6=smT9b75gLZ3-7ui=pBPLt46FdTa3TM=Zk3__=8Q@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add deduplication to nbtree.  (Andres Freund <andres@anarazel.de>)
Responses Re: pgsql: Add deduplication to nbtree.  (Andres Freund <andres@anarazel.de>)
List pgsql-committers
On Sun, Mar 29, 2020 at 3:15 PM Andres Freund <andres@anarazel.de> wrote:
> Is it perhaps possible to silence the warnign with somethign along the
> lines of
> Assert(nhtids + vacposting->ndeletedtids == BTreeTupleGetNPosting(origtuple))
> I don't know this code, but it looks like that'd have to be true?
> Perhaps that'd be enough to silence coverity too?

It would have to be true. It's a tautology. That is, the value of
nhtids comes from "vacposting->ndeletedtids" and
"BTreeTupleGetNPosting(origtuple)" anyway, and we don't mutate any of
that state in _bt_update_posting().

Wouldn't it at least be necessary to Assert() something about the
final tuple, and/or other work state?

-- 
Peter Geoghegan



pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Add deduplication to nbtree.
Next
From: Andres Freund
Date:
Subject: Re: pgsql: Add deduplication to nbtree.