Re: [HACKERS] pageinspect: Hash index support

Поиск
Список
Период
Сортировка
От Mithun Cy
Тема Re: [HACKERS] pageinspect: Hash index support
Дата
Msg-id CAD__Ouh9S-AX1bKJt78J+GSmgp1xB6orq+9+knMKPOT4sZ3V8A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] pageinspect: Hash index support  (Mithun Cy <mithun.cy@enterprisedb.com>)
Ответы Re: [HACKERS] pageinspect: Hash index support  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
>
> 7. I think it is not your bug, but probably a bug in Hash index
> itself; page flag is set to 66 (for below test); So the page is both
> LH_BUCKET_PAGE and LH_BITMAP_PAGE. Is not this a bug in hash index?
>
> I have inserted 3000 records. Hash index is on integer column.
> select hasho_flag FROM hash_page_stats(get_raw_page('i1', 1));
>  hasho_flag
> ------------
>          66
>

Here is the test for same. After insertion of 3000 records, I think at
first split we can see bucket page flag is set with LH_BITMAP_PAGE.

create table t1( ti int);
create index i1 on t1 using hash(ti);
postgres=# select hasho_flag from hash_page_stats(get_raw_page('i1', 1));hasho_flag
------------         2
postgres=# insert into t1 select generate_series(1, 1000);
INSERT 0 1000
postgres=# select hasho_flag from hash_page_stats(get_raw_page('i1', 1));hasho_flag
------------         2
(1 row)

postgres=# insert into t1 select generate_series(1, 1000);
INSERT 0 1000
postgres=# select hasho_flag from hash_page_stats(get_raw_page('i1', 1));hasho_flag
------------         2
(1 row)

postgres=# insert into t1 select generate_series(1, 1000);
INSERT 0 1000
postgres=# select hasho_flag from hash_page_stats(get_raw_page('i1', 1));hasho_flag
------------        66
(1 row)

I think If this is a bug then example given in pageinspect.sgml should
be changed in your patch after the bug fix.
+hasho_prevblkno | -1
+hasho_nextblkno | 8474
+hasho_bucket    | 0
+hasho_flag      | 66
+hasho_page_id   | 65408



-- 
Thanks and Regards
Mithun C Y
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] New SQL counter statistics view (pg_stat_sql)
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] pageinspect: Hash index support