@@ -230,15 +230,12 @@ child page, as an ItemPointer. The right bound of the page is stored right
230
230
after the page header, before the PostingItem array.
231
231
232
232
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).
242
239
243
240
The item pointers are stored in a number of independent compressed posting
244
241
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
248
245
looking for, and read only that segment. Also, an update only needs to
249
246
re-encode the affected segment.
250
247
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
-
259
248
Posting List Compression
260
249
------------------------
261
250
0 commit comments