Re: [HACKERS] Add pgstathashindex() to get hash index table statistics.

Поиск
Список
Период
Сортировка
От Kuntal Ghosh
Тема Re: [HACKERS] Add pgstathashindex() to get hash index table statistics.
Дата
Msg-id CAGz5QCJpySmvSfa3_b26rb_Q_dQ4dyrSCXZgaskY3ruLznYJpg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Add pgstathashindex() to get hash index table statistics.  (Ashutosh Sharma <ashu.coek88@gmail.com>)
Ответы Re: [HACKERS] Add pgstathashindex() to get hash index table statistics.  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Tue, Jan 24, 2017 at 10:09 AM, Ashutosh Sharma <ashu.coek88@gmail.com> wrote:
>> 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.
>
>
> Actually in my case I may not need to acquire ExclusiveLock just to
> get the number of pages in a relation. Infact I have already opened a
> relation using
> 'AccessShareLock' which should be enough to read a table length.
> Thanks for putting this point. I have corrected it in the attached v5
> patch.
I've checked the last attached patch and didn't find any issue. There
is no problem with patching and compilation. It also passed all
regression tests.
Nothing else to add from my side. I'm marking this 'Ready for commiter'.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Borodin
Дата:
Сообщение: Re: [HACKERS] Review: GIN non-intrusive vacuum of posting tree
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] Failure in commit_ts tap tests