pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix handling of empty uncompressed posting list pages in GIN
Date: Thu, 19 Jul 2018 18:12:00 +0000
Message-ID: <E1fgDPE-0004hw-6j@gemulon.postgresql.org> (raw)

Fix handling of empty uncompressed posting list pages in GIN

PostgreSQL 9.4 introduces posting list compression in GIN.  This feature
supports online upgrade, so that after pg_upgrade uncompressed posting
lists are compressed on-the-fly.  Underlying code appears to always
expect at least one item on uncompressed posting list page.  But there
could be completely empty pages, because VACUUM never deletes leftmost
and rightmost pages from posting trees.  This commit fixes that.

Reported-by: Sivasubramanian Ramasubramanian
Discussion: https://postgr.es/m/1531867212836.63354%40amazon.com
Author: Sivasubramanian Ramasubramanian, Alexander Korotkov
Backpatch-through: 9.4

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/309765fa1e317597bfd341fa99dfa97ea5722890

Modified Files
--------------
src/backend/access/gin/gindatapage.c | 20 ++++++++++++--------
src/backend/access/gin/ginxlog.c     | 27 +++++++++++++++++++++------
2 files changed, 33 insertions(+), 14 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1fgDPE-0004hw-6j@gemulon.postgresql.org>
Permalink:  ../E1fgDPE-0004hw-6j@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fgDPE-0004hw-6j@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: akorotkov@postgresql.org
  Subject: Re: pgsql: Fix handling of empty uncompressed posting list pages in GIN
  In-Reply-To: <E1fgDPE-0004hw-6j@gemulon.postgresql.org>
  References: <E1fgDPE-0004hw-6j@gemulon.postgresql.org>

* 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