From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Shubham Barai <shubhambaraiss(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Borodin <amborodin86(at)gmail(dot)com>, Kevin Grittner <kgrittn(at)gmail(dot)com> |
Subject: | Re: GSoC 2017: weekly progress reports (week 6) |
Date: | 2017-09-30 20:17:22 |
Message-ID: | CAPpHfdt2gPiJ7bVTw0EuWbdSqx_yYixWi=UCGOms0AjSMKUotw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-www |
On Sat, Sep 30, 2017 at 6:12 PM, Shubham Barai <shubhambaraiss(at)gmail(dot)com>
wrote:
> I have made changes according to your suggestions. Please have a look at
> the updated patch.
> I am also considering your suggestions for my other patches also. But, I
> will need some time to
> make changes as I am currently busy doing my master's.
>
I don't understand why sometimes you call PredicateLockPage() only when
fast update is off. For example:
@@ -94,6 +101,9 @@ scanPostingTree(Relation index, GinScanEntry scanEntry,
> break; /* no more pages */
>
> buffer = ginStepRight(buffer, index, GIN_SHARE);
> +
> + if (!GinGetUseFastUpdate(index))
> + PredicateLockPage(index, BufferGetBlockNumber(buffer), snapshot);
> }
>
> UnlockReleaseBuffer(buffer);
But sometimes you call PredicateLockPage() unconditionally.
@@ -131,6 +141,8 @@ collectMatchBitmap(GinBtreeData *btree, GinBtreeStack
> *stack,
> attnum = scanEntry->attnum;
> attr = btree->ginstate->origTupdesc->attrs[attnum - 1];
>
> + PredicateLockPage(btree->index, stack->buffer, snapshot);
> +
> for (;;)
> {
> Page page;
As I understand, all page-level predicate locking should happen only when
fast update is off.
Also, despite general idea is described in README-SSI, in-code comments
would be useful.
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Nikolay Shaplov | 2017-09-30 20:18:35 | Re: [PATCH] Tests for reloptions |
Previous Message | Dmitry Dolgov | 2017-09-30 20:13:32 | Re: [PATCH] Generic type subscripting |
From | Date | Subject | |
---|---|---|---|
Next Message | Shubham Barai | 2017-10-01 08:53:58 | Re: GSoC 2017: weekly progress reports (week 6) |
Previous Message | Shubham Barai | 2017-09-30 15:12:43 | Re: GSoC 2017: weekly progress reports (week 6) |