On Mon, Jan 23, 2017 at 2:56 PM, Ashutosh Sharma <ashu.coe...@gmail.com> wrote:
> Hi,
>
> Please find the attached v4 patch rebased on a latest commitID in
> head. I had to rebase it as the following git commit has some changes
> in pgstatindex.c file due to which 'git apply' was failing.
>
I've looked at the patch. It looks good. However, I was wondering why
an exclusive lock for extension is necessary for reading the number
blocks in this case. Please refer to the following code.

+       /* Get the current relation length */
+       LockRelationForExtension(rel, ExclusiveLock);
+       nblocks = RelationGetNumberOfBlocks(rel);
+       UnlockRelationForExtension(rel, ExclusiveLock);

Apart from this, I've nothing else to add.

-- 
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to