Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 45e67a2

Browse files
committed
Fix Gin README.
The README incorrectly claimed that GIN posting tree pages contain an array of uncompressed items in addition to compressed posting lists. Earlier versions of the GIN posting list compression patch worked that way, but not the one that was committed.
1 parent 80ce90b commit 45e67a2

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

src/backend/access/gin/README

+6-17
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,12 @@ child page, as an ItemPointer. The right bound of the page is stored right
230230
after the page header, before the PostingItem array.
231231

232232
Posting tree leaf pages also use the standard PageHeader and opaque struct,
233-
and the right bound of the page is stored right after the page header,
234-
but the page content comprises of 0-32 compressed posting lists, and an
235-
additional array of regular uncompressed item pointers. The compressed posting
236-
lists are stored one after each other, between page header and pd_lower. The
237-
uncompressed array is stored between pd_upper and pd_special. The space
238-
between pd_lower and pd_upper is unused, which allows full-page images of
239-
posting tree leaf pages to skip the unused space in middle (buffer_std = true
240-
in XLogRecData). For historical reasons, this does not apply to internal
241-
pages, or uncompressed leaf pages migrated from earlier versions.
233+
and the right bound of the page is stored right after the page header, but
234+
the page content comprises of a number of compressed posting lists. The
235+
compressed posting lists are stored one after each other, between page header
236+
and pd_lower. The space between pd_lower and pd_upper is unused, which allows
237+
full-page images of posting tree leaf pages to skip the unused space in middle
238+
(buffer_std = true in XLogRecData).
242239

243240
The item pointers are stored in a number of independent compressed posting
244241
lists (also called segments), instead of one big one, to make random access
@@ -248,14 +245,6 @@ multiple lists, you can first skip over to the list containing the item you're
248245
looking for, and read only that segment. Also, an update only needs to
249246
re-encode the affected segment.
250247

251-
The uncompressed items array is used for insertions, to avoid re-encoding
252-
a compressed list on every update. If there is room on a page, an insertion
253-
simply inserts the new item to the right place in the uncompressed array.
254-
When a page becomes full, it is rewritten, merging all the uncompressed items
255-
are into the compressed lists. When reading, the uncompressed array and the
256-
compressed lists are read in tandem, and merged into one stream of sorted
257-
item pointers.
258-
259248
Posting List Compression
260249
------------------------
261250

0 commit comments

Comments
 (0)