Re: [HACKERS] WAL Consistency checking for hash indexes

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: [HACKERS] WAL Consistency checking for hash indexes
Дата
Msg-id CAA4eK1KZRD7OVoKKvbUVgHeSFdrSbN0RmKpa6m_8FQK1mCsXqg@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] WAL Consistency checking for hash indexes  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Ответы Re: [HACKERS] WAL Consistency checking for hash indexes  (Robert Haas <robertmhaas@gmail.com>)
Re: [HACKERS] WAL Consistency checking for hash indexes  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Список pgsql-hackers
On Tue, Feb 28, 2017 at 11:06 AM, Kuntal Ghosh
<kuntalghosh.2007@gmail.com> wrote:
> Hello everyone,
>
> I've attached a patch which implements WAL consistency checking for
> hash indexes. This feature is going to be useful for developing and
> testing of WAL logging for hash index.
>

I think it is better if you base your patch on (Microvacuum support
for hash index - https://commitfest.postgresql.org/13/835/).

1.
There are some hints which we might want to mask that are used in that
patch.  For ex, I think you need to take care of Dead marking at page
level. Refer below code in patch "Microvacuum support for hash index".
+ if (killedsomething)
+ {
+ opaque->hasho_flag |= LH_PAGE_HAS_DEAD_TUPLES;


2.
+ else if ((opaque->hasho_flag & LH_BUCKET_PAGE) ||
+ (opaque->hasho_flag & LH_OVERFLOW_PAGE))
+ {
+ /*
+ * In btree bucket and overflow pages, it is possible to modify the
+ * LP_FLAGS without emitting any WAL record. Hence, mask the line
+ * pointer flags.
+ * See hashgettuple() for details.
+ */
+ mask_lp_flags(page);
+ }

Again, this mechanism is also modified by patch "Microvacuum support
for hash index", so above changes needs to be adjusted accordingly.
Comment referring to btree is wrong, you need to refer hash.

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



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] PATCH: pageinspect / add page_checksum and bt_page_items(bytea)
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] Print correct startup cost for the group aggregate.