Re: pgsql: Add deduplication to nbtree.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Add deduplication to nbtree.
Date: 2020-03-29 22:19:50
Message-ID: CAH2-Wzmpm6=smT9b75gLZ3-7ui=pBPLt46FdTa3TM=Zk3__=8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Sun, Mar 29, 2020 at 3:15 PM Andres Freund <andres(at)anarazel(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2020-03-29 22:41:50 Re: pgsql: Add deduplication to nbtree.
Previous Message Andres Freund 2020-03-29 22:15:44 Re: pgsql: Add deduplication to nbtree.