pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Rushabh Lathia <rushabh.lathia@gmail.com>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Support parallel btree index builds.
Date: Tue, 06 Feb 2018 11:05:21 -0500
Message-ID: <15462.1517933121@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoZAYdoAMKZOEXJ-YDxqC-rZGOsRngGRfjnHiT-cJ9c_Pw@mail.gmail.com>
References: <E1ehgD1-0008TG-4S@gemulon.postgresql.org>
	<20180204174241.ca4n5x6xxjhc4rfa@alap3.anarazel.de>
	<18025.1517767905@sss.pgh.pa.us>
	<CA+TgmoYWxyRy+kLfsW+BVcHg5n3509gS7UcKSxTyUROHND796Q@mail.gmail.com>
	<6370.1517931972@sss.pgh.pa.us>
	<CA+TgmoZAYdoAMKZOEXJ-YDxqC-rZGOsRngGRfjnHiT-cJ9c_Pw@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Feb 6, 2018 at 10:46 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ... I, at least, don't have that understanding from looking
>> at the thread.  For one thing, Peter has not explained why this issue
>> appears now with parallel index build when it did not before; it's
>> not like logtape.c isn't old enough to vote.

> Yeah, he has actually.  In other cases, the buffer is guaranteed to
> have been filled at least once (and thus, from valgrind's point of
> view, is initialized) because if that weren't going to happen then we
> would have not have switched to a tape-sort in the first place.  You
> can't set work_mem smaller than 8kB.  But in the parallel case each
> worker must always produce a tape, so it can happen if a worker is
> unlucky enough to get only a very small slice of the data (because the
> other participants gobble it all up before that process really gets
> going).

Ah, I see.  So this is really a problem that's been latent all along,
but was never exposed in any previous use-case for logtape.c.

> But what I really need here is
> some input on an option you do like, not just a list of things you
> don't like.

I like the option of doing VALGRIND_MAKE_MEM_DEFINED on the tail
portion of the buffer before writing it.  That seems pretty tightly
tied to the behavior we're decreeing valid, whereas the suppression
is not.

			regards, tom lane




view thread (12+ messages)  latest in thread

Message-ID: <15462.1517933121@sss.pgh.pa.us>
Permalink:  ../15462.1517933121@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15462.1517933121@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, andres@anarazel.de, pg@bowt.ie, rushabh.lathia@gmail.com
  Subject: Re: pgsql: Support parallel btree index builds.
  In-Reply-To: <15462.1517933121@sss.pgh.pa.us>
  References: <E1ehgD1-0008TG-4S@gemulon.postgresql.org> <20180204174241.ca4n5x6xxjhc4rfa@alap3.anarazel.de> <18025.1517767905@sss.pgh.pa.us> <CA+TgmoYWxyRy+kLfsW+BVcHg5n3509gS7UcKSxTyUROHND796Q@mail.gmail.com> <6370.1517931972@sss.pgh.pa.us> <CA+TgmoZAYdoAMKZOEXJ-YDxqC-rZGOsRngGRfjnHiT-cJ9c_Pw@mail.gmail.com> <15462.1517933121@sss.pgh.pa.us>

* 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