Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Dmitry Ivanov <d(dot)ivanov(at)postgrespro(dot)ru>, Shubham Barai <shubhambaraiss(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Borodin <amborodin86(at)gmail(dot)com>, Kevin Grittner <kgrittn(at)gmail(dot)com>
Subject: Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)
Date: 2018-04-09 15:23:14
Message-ID: 0c8b3c0d-17a6-6406-bbe8-752cad2298db@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

Alvaro Herrera wrote:
> Heikki Linnakangas wrote:
>
>> Remember, the purpose of predicate locks is to lock key ranges, not physical
>> pages or tuples in the index. We use leaf pages as handy shortcut for "any
>> key value that would belong on this page", but it is just an implementation
>> detail.
>
> Hmm ... so, thinking about pending list locking, would it work to
> acquire locks on the posting tree's root of each item in the pending
> list, when the item is put in the pending list? (even if we insert the
> item in the pending list instead of its posting tree).

Items in pending list doesn't use posting tree or list, pending list is just
list of pair (ItemPointer to heap, entry) represented as IndexTuple. There is no
order in pending list, so Heikki suggests to lock metapage always instead of
locking whole relation if fastupdate=on. If fastupdate is off then insertion
process will not change metapage.

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-04-09 15:24:20 Re: Transform for pl/perl
Previous Message Andrey Borodin 2018-04-09 15:21:30 Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

Browse pgsql-www by date

  From Date Subject
Next Message Heikki Linnakangas 2018-04-09 17:22:39 Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)
Previous Message Andrey Borodin 2018-04-09 15:21:30 Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)