Re: Page Scan Mode in Hash Index

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Page Scan Mode in Hash Index
Date: 2017-09-20 11:45:20
Message-ID: CAA4eK1L7j7Mn0bT51RY3EuwRq9sHnGHe+Y+adyD6ApvtP5GVnA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 20, 2017 at 4:56 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Sep 20, 2017 at 7:19 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>> Page-at-a-time index vacuum as in _hash_vacuum_one_page doesn't matter
>>> because such an operation doesn't allow TIDs to be reused.
>>
>> Page-at-a-time index vacuum also allows TIDs to be reused but this is
>> done only for already marked dead items whereas vacuum can make the
>> non-dead entries to be removed. We don't have a problem with
>> page-at-a-time vacuum as it won't remove any items which the scan is
>> going to mark as dead.
>
> I don't think page-at-a-time index vacuum allows heap TIDs to be
> reused.
>

Right, I was thinking from the perspective of the index entry. Before
marking index entry as dead, we do check for heaptid. So, as heaptid
can't be reused via Page-at-a-time index vacuum, scan won't mark index
entry as dead.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-09-20 11:57:20 Re: [COMMITTERS] pgsql: Make WAL segment size configurable at initdb time.
Previous Message David Steele 2017-09-20 11:39:01 Re: Show backtrace when tap tests fail