Re: Non-deterministic IndexTuple toast compression from index_form_tuple() + amcheck false positives

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Non-deterministic IndexTuple toast compression from index_form_tuple() + amcheck false positives
Date: 2019-01-14 21:31:21
Message-ID: 24596.1547501481@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> The heapallindexed enhancement that made it into Postgres 11 assumes
> that the representation of index tuples produced by index_form_tuple()
> (or all relevant index_form_tuple() callers) is deterministic: for
> every possible heap tuple input there must be a single possible
> (bitwise) output.

That assumption seems unbelievably fragile. How badly do things
break when it's violated?

Also, is the assumption just that a fixed source tuple will generate
identical index entries across repeated index_form_tuple attempts?
Or is it assuming that logically equal index entries will be bitwise
equal? The latter is broken on its face, because index_form_tuple()
doesn't try to hide differences in the toasting state of source
datums.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2019-01-14 21:46:32 Re: Non-deterministic IndexTuple toast compression from index_form_tuple() + amcheck false positives
Previous Message Tomas Vondra 2019-01-14 21:25:56 Re: COPY FROM WHEN condition