Re: GIN pageinspect functions
От | Jeff Janes |
---|---|
Тема | Re: GIN pageinspect functions |
Дата | |
Msg-id | CAMkU=1xvzQxTAiYNM2PWJ6snMTPh3u3Ammbwss7mvAShS2Ohww@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: GIN pageinspect functions (Heikki Linnakangas <hlinnakangas@vmware.com>) |
Ответы |
Re: [HACKERS] GIN pageinspect functions
|
Список | pgsql-hackers |
On Fri, Nov 21, 2014 at 2:04 AM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:
On 11/20/2014 05:52 AM, Michael Paquier wrote:On Wed, Nov 19, 2014 at 7:01 AM, Peter Geoghegan <pg@heroku.com> wrote:On Tue, Nov 4, 2014 at 7:26 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:1. Documentation seems to be missing, other API's exposed
via pageinspect are documented at:
http://www.postgresql.org/docs/devel/static/pageinspect.htmlDone.2.I actually liked more gin_metapage_info, a name similar to the
+CREATE FUNCTION gin_metapage(IN page bytea,
+ OUT pending_head bigint,
+ OUT pending_tail bigint,
+ OUT version int4)
+AS 'MODULE_PATHNAME', 'gin_metapage'
+LANGUAGE C STRICT;
a. Isn't it better to name the function as gin_metap(..) similar to
existing function bt_metap(..)?
newly-introduced brin indexes.b. Can this function have a similar signature as bt_metap() which meansThat's mostly a matter of taste but I think we should definitely pass
it should take input as relname?
a raw page to it as it is now. This has the advantage to add an extra
check if the page passed is really a meta page of not, something
useful for development.3. Can gin_dataleafpage() API have similar name and signature asWhat about gin_leafpage_items then?
API bt_page_items() exposed for btree?
The signature of bt_page_items() isn't a good example to follow. It existed before the get_raw_page() function, and the other functions that are designed to work with that, was added. gin_leafpage_items() name seems fine to me.
When I call gin_leafpage_items on a {leaf} page, I get the ERROR:
ERROR: input page is not a compressed GIN data leaf page
DETAIL: Flags 0002, expected 0083
I'm don't know why it won't work on an uncompressed leaf page (or for that matter, why my index pages are not compressed), but the docs should probably note the restriction.
Cheers,
Jeff
Вложения
В списке pgsql-hackers по дате отправления: