Re: New gist vacuum. - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: New gist vacuum.
Date
Msg-id 9F56D93E-0ABF-44B2-A8F3-4B606D6F3F32@yandex-team.ru
Whole thread Raw
In response to Re: New gist vacuum.  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
List pgsql-hackers
Hi, Alexander!

Many thanks for looking into patches!
A little bit later I will provide answer in other branch of discussion.

15 янв. 2018 г., в 23:34, Alexander Korotkov <a.korotkov@postgrespro.ru> написал(а):

I do not know, should I register separate commitfest entry? The code is very close to main GiST VACUUM patch, but solves a bit different problem.

Yes, I think it deserves separate commitfest entry.  Despite it's related to GiST VACUUM, it's a separate fix.
Ok, done. https://commitfest.postgresql.org/17/1483
I've made small improvements to this patch: variable naming, formatting, comments.
Great, thanks!
BTW, do we really need to set shouldCount depending on whether we receive stats argument or not?  What if we always set shouldCount as in the first branch of "if"?
 
shouldCount = !heap_attisnull(rel->rd_indextuple, Anum_pg_index_indpred) ||
   info->estimated_count;
We do not need to count if we have exact count from heap and this index is not partial. ITSM that it is quite common case.

Best regards, Andrey Borodin.

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: ALTER TABLE ADD COLUMN fast default
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] taking stdbool.h into use