pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: GIN improvements part 1: additional information
Date: Fri, 04 Oct 2013 11:28:43 +0300
Message-ID: <524E7C3B.7060402@vmware.com> (raw)
In-Reply-To: <CAPpHfdutJEC9+6vWX579afZKzdHKCT2wzDkAEom1XmiXEwF3pw@mail.gmail.com>
References: <CAPpHfduxv-iL7aedwPW0W5fXrWGAKfxijWM63_hZujaCRxnmFQ@mail.gmail.com>
	<CAPpHfduQrtC4B+MC9_z3QB8oJsK1Ws-H8ivEsy_cmDnfoJqkeQ@mail.gmail.com>
	<CAPpHfdszEJhSynTPX6=tB3aKq1EA1JXpwx4xiFYM097K7PhQLA@mail.gmail.com>
	<CAPpHfdu8=5spaS7c9mxwH7bNMDR6n378fZCv6c2Y3YM7iE5KiQ@mail.gmail.com>
	<51CEA13C.8040103@vmware.com>
	<CAPpHfdutJEC9+6vWX579afZKzdHKCT2wzDkAEom1XmiXEwF3pw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Aside from the pg_upgrade discussion, here's an updated version of the 
patch, rebased over master. It also contains some other misc refactoring 
I've done while reading through the patch. I haven't tested this much, I 
may well have also broken something, but I wanted to post an update 
before the weekend.

Thinking about the page format, I think we should start using the 
pd_lower/upper pointers in the data page format. For a non-leaf page, 
pd_upper would always point to the beginning of the special area, and 
pd_lower would indicate the end of PostingItems. For a leaf page, 
pd_lower would indicate the end of the compressed posting list, and 
pd_upper would point to the "leaf-index" at the end of the page. That 
matches the standard page layout in the sense that the space between 
pd_lower and pd_upper is free, although the data stored in the non-free 
areas would be quite different. That would allow us to mark full-page 
images with buffer_std, allowing the "gap" to be left out. I think that 
would be a more natural way to keep track of the used/unused space on 
the page, anyway, compared to the current maxoff/endoffset field in the 
special area.

In the attached patch, I in fact already did that for data leaf pages, 
but didn't change the format of non-leaf pages yet. If we want to 
support pg_upgrade, we might want to refrain from changing the non-leaf 
format.

- Heikki

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

  [application/x-gzip] gin-packed-postinglists-8-heikki.patch.gz (22.0K, ../524E7C3B.7060402@vmware.com/2-gin-packed-postinglists-8-heikki.patch.gz)
  download

view thread (119+ messages)  latest in thread

Message-ID: <524E7C3B.7060402@vmware.com>
Permalink:  ../524E7C3B.7060402@vmware.com/
Also on:    postgresql.org/message-id/524E7C3B.7060402@vmware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: hlinnakangas@vmware.com, aekorotkov@gmail.com
  Subject: Re: GIN improvements part 1: additional information
  In-Reply-To: <524E7C3B.7060402@vmware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox