Re: [HACKERS] Microvacuum support for Hash Index

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: [HACKERS] Microvacuum support for Hash Index
Дата
Msg-id CAA4eK1Ki=ztbYTK0TLEtmcNmGdQLPnjbp=zGSzc3iP_bT65vbA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Microvacuum support for Hash Index  (Ashutosh Sharma <ashu.coek88@gmail.com>)
Ответы Re: [HACKERS] Microvacuum support for Hash Index  (Ashutosh Sharma <ashu.coek88@gmail.com>)
Список pgsql-hackers
On Fri, Mar 17, 2017 at 12:27 PM, Ashutosh Sharma <ashu.coek88@gmail.com> wrote:
> On Fri, Mar 17, 2017 at 8:20 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> As I said in my previous e-mail, I think you need
>> to record clearing of this flag in WAL record XLOG_HASH_DELETE as you
>> are not doing this unconditionally and then during replay clear it
>> only when the WAL record indicates the same.
>
> Thank you so much for putting that point. I too think that we should
> record the flag status in the WAL record and clear it only when
> required during replay.
>

I think hashdesc.c needs an update (refer case XLOG_HASH_DELETE:).

- * flag. Clearing this flag is just a hint; replay won't redo this.
+ * flag. Clearing this flag is just a hint; replay will check the
+ * status of clear_dead_marking flag before redo it. */ if (tuples_removed && *tuples_removed > 0 &&
opaque->hasho_flag& LH_PAGE_HAS_DEAD_TUPLES)
 
+ { opaque->hasho_flag &= ~LH_PAGE_HAS_DEAD_TUPLES;
+ clear_dead_marking = true;
+ }


I feel the above comment is not required as you are logging this
action explicitly.

+ bool clear_dead_marking; /* TRUE if VACUUM clears

No need to write VACUUM explicitly, you can simply say "TRUE if this
operation clears ...".


-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: David Steele
Дата:
Сообщение: [HACKERS] Re: [BUGS] Problem in using pgbench's --connect(-C) and--rate=rate(-R rate) options together.
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables