Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.

Anastasia Lubennikova <a.lubennikova@postgrespro.ru>

From: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Юрий Соколов <funny.falcon@gmail.com>
Date: 2020-02-20T15:38:22Z
Lists: pgsql-hackers
On 19.02.2020 22:16, Peter Geoghegan wrote:
> On Wed, Feb 19, 2020 at 8:14 AM Anastasia Lubennikova
> <a.lubennikova@postgrespro.ru> wrote:
>> Thank you for this work. I've looked through the patches and they seem
>> to be ready for commit.
>> I haven't yet read recent documentation and readme changes, so maybe
>> I'll send some more feedback tomorrow.

The only thing I found is a typo in the comment

+  int      nhtids;      /* Number of heap TIDs in nhtids array */

s/nhtids/htids

I don't think this patch really needs more nitpicking )

>
>> In my opinion, this message is too specific for default behavior. It
>> exposes internal details without explanation and may look to user like
>> something went wrong.
> You're probably right about that. I just wish that there was some way
> of showing the same information that was discoverable, and didn't
> require the use of pageinspect. If I make it a DEBUG1 message, then it
> cannot really be documented.

User can discover this with a complex query to pg_index and pg_opclass.
To simplify this, we can probably wrap this into function or some field 
in pg_indexes.
Anyway, I would wait for feedback from pre-release testers.




Commits

  1. Teach pageinspect about nbtree deduplication.

  2. Doc: Fix deduplicate_items index term.

  3. Revise BTP_HAS_GARBAGE nbtree VACUUM comments.

  4. Remove unneeded "pin scan" nbtree VACUUM code.

  5. Cleanup code in reloptions.h regarding reloption handling

  6. Catch invalid typlens in a couple of places

  7. Compute XID horizon for page level index vacuum on primary.

  8. Make heap TID a tiebreaker nbtree index column.

  9. Avoid pin scan for replay of XLOG_BTREE_VACUUM in all cases

  10. Revert buggy optimization of index scans

  11. Restructure index access method API to hide most of it at the C level.

  12. Reduce pinning and buffer content locking for btree scans.

  13. Avoid scanning nulls at the beginning of a btree index scan.