pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix broken cleanup interlock for GIN pending list.
Date: Thu, 16 Nov 2017 20:29:07 +0000
Message-ID: <E1eFQmZ-0001nY-6B@gemulon.postgresql.org> (raw)

Fix broken cleanup interlock for GIN pending list.

The pending list must (for correctness) always be cleaned up by vacuum, and
should (for the avoidance of surprising behavior) always be cleaned up
by an explicit call to gin_clean_pending_list, but cleanup is optional
when inserting.  The old logic got this backward: cleanup was forced
if (stats == NULL), but that's going to be *false* when vacuuming and
*true* for inserts.

Masahiko Sawada, reviewed by me.

Discussion: http://postgr.es/m/CAD21AoBLUSyiYKnTYtSAbC+F=XDjiaBrOUEGK+zUXdQ8owfPKw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3b2787e1f8f1eeeb6bd9565288ab210262705b56

Modified Files
--------------
src/backend/access/gin/ginfast.c   | 14 +++++++++-----
src/backend/access/gin/ginvacuum.c |  6 +++---
src/include/access/gin_private.h   |  2 +-
3 files changed, 13 insertions(+), 9 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1eFQmZ-0001nY-6B@gemulon.postgresql.org>
Permalink:  ../E1eFQmZ-0001nY-6B@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eFQmZ-0001nY-6B@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: rhaas@postgresql.org
  Subject: Re: pgsql: Fix broken cleanup interlock for GIN pending list.
  In-Reply-To: <E1eFQmZ-0001nY-6B@gemulon.postgresql.org>
  References: <E1eFQmZ-0001nY-6B@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