pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
Subject: Re: pgsql: Add deduplication to nbtree.
Date: Sun, 01 Mar 2020 17:14:03 -0500
Message-ID: <5838.1583100843@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH2-Wz=Tz_e8e39qTs3Mt78P6XD9s3u7TdOUVrYZg2eTEgfB0w@mail.gmail.com>
References: <E1j73sn-0003FQ-KO@gemulon.postgresql.org>
	<27003.1583087095@sss.pgh.pa.us>
	<CAH2-Wzn9_zQR9Q96JUyVBAdro52Ov6+bQ1zcE_FPxEVXGw-ebQ@mail.gmail.com>
	<29676.1583090977@sss.pgh.pa.us>
	<CAH2-WzmAufHiOku6AGiFD=81VQs5nYJ1L2YkhW1t+BH4CMsgRw@mail.gmail.com>
	<CAH2-Wz=Tz_e8e39qTs3Mt78P6XD9s3u7TdOUVrYZg2eTEgfB0w@mail.gmail.com>

Peter Geoghegan <pg@bowt.ie> writes:
> Attached patch shows how this could work. I prefer my original
> approach, but I can see the argument for doing it this way.

This does seem a bit duplicative ... and shouldn't both code paths
include a final "Assert(d == vacposting->ndeletedtids)"?  So maybe
we're better off just rejecting the Coverity complaint.

> If we keep my original approach, we should still add a new
> "ItemPointerIsValid(&itup->t_tid)" assertion that covers the plain
> tupe case in a way that mirrors the current "_bt_posting_valid(itup)"
> assert.

Another thing that maybe bears closer scrutiny is the size calculation.
It seems a bit confused as to whether the offset of the posting list
within the tuple, or the total tuple size, or both, needs to be
MAXALIGN'd.

			regards, tom lane





view thread (22+ messages)  latest in thread

Message-ID: <5838.1583100843@sss.pgh.pa.us>
Permalink:  ../5838.1583100843@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5838.1583100843@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pg@bowt.ie, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add deduplication to nbtree.
  In-Reply-To: <5838.1583100843@sss.pgh.pa.us>

* 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