From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
Cc: | "R, Siva" <sivasubr(at)amazon(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Duplicate Item Pointers in Gin index |
Date: | 2018-02-22 01:26:22 |
Message-ID: | CAD21AoDXyqtYR=s6xNYu9LsNgagWW5a7rzfAk2_u_5AMYxejjA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Feb 22, 2018 at 8:28 AM, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> On Wed, Feb 21, 2018 at 3:02 PM, R, Siva <sivasubr(at)amazon(dot)com> wrote:
>> Did you mean pin on the metapage buffer during ginInsertCleanup and not lock
>> during addition of tuples to the accumulator? The exclusive lock on metapage
>> buffer is released after reading/locking head of pending list and before we
>> process pages/add tuples to the accumulator in ginInsertCleanup [1].
>
> AFAICT, nobody ever holds just a pin on the metapage as some kind of
> interlock (since nobody else ever acquires a "super exclusive lock" on
> the metapage -- if anybody else ever did that, then simply holding a
> pin might make sense as a way of blocking the "super exclusive" lock
> acquisition). Maybe you're thinking of the root page of posting trees?
>
> I think that Sawada-san simply means that holding an ExclusiveLock on
> the metapage makes writers block each other, and concurrent VACUUMs.
> At least, for as long as they're in ginInsertCleanup().
Yes, but I realized my previous mail was wrong, sorry. Insertion to
pending list doesn't acquire ExclusiveLock on metapage. So we can
insert tuples to pending list while cleaning up.
Regards,
--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2018-02-22 02:21:20 | Re: Hash Joins vs. Bloom Filters / take 2 |
Previous Message | Tomas Vondra | 2018-02-21 23:57:19 | Re: file cloning in pg_upgrade and CREATE DATABASE |