| From: | Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com> |
|---|---|
| To: | Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Add pgstathashindex() to get hash index table statistics. |
| Date: | 2017-01-23 15:58:32 |
| Message-ID: | CAGz5QC+3SrWf-=KjBvzcPdiSx71QVanNm709VNh=qboB8mPLoQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Jan 23, 2017 at 2:56 PM, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2017-01-23 16:06:01 | Re: Vacuum: allow usage of more than 1GB of work mem |
| Previous Message | Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?= | 2017-01-23 15:50:05 | Re: [PATCH] Add GUCs for predicate lock promotion thresholds |