Re: Indirect indexes - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Indirect indexes
Date
Msg-id CAPpHfdv6UGDBjkm+ZKQNZvD9+rQTqT5dCyWqjmBEwL3J6E_GgA@mail.gmail.com
Whole thread Raw
In response to Indirect indexes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Indirect indexes
Re: Indirect indexes
List pgsql-hackers
Hi, Alvaro!

Thank you for your proposal.  One question about vacuum excites me most.

On Tue, Oct 18, 2016 at 9:28 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Vacuuming presents an additional challenge: in order to remove index
items from an indirect index, it's critical to scan the PK index first
and collect the PK values that are being removed.  Then scan the
indirect index and remove any items that match the PK items removed.
This is a bit problematic because of the additional memory needed to
store the array of PK values.  I haven't implemented this yet.

Imagine another situation: PK column was not updated, but indirect indexed column was updated.
Thus, for single heap tuple we would have single PK tuple and two indirect index tuples (correct me if I'm wrong).
How are we going to delete old indirect index tuple?

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Indirect indexes
Next
From: Jeff Janes
Date:
Subject: "make check" and pg_hba.conf