pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Add isolationtester spec for old heapam.c bug
Date: Mon, 29 Feb 2016 16:42:09 -0300
Message-ID: <20160229194209.GA296525@alvherre.pgsql> (raw)
In-Reply-To: <17574.1456769322@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > Tom Lane wrote:
> >> guaibasaurus is not a particularly slow machine, and it's not using any
> >> special build flags AFAICT.  So I'm not sure what to make of this case,
> >> except that it proves the timing problem can manifest on normal builds.
> 
> > Hmm, I suppose I could fix this by using three different advisory locks
> > rather than a single one.  (My assumption is that the timing dependency
> > is the order in which the backends are awakened when the advisory lock
> > is released.)  I would release the locks one by one rather than all
> > together.
> 
> Sounds plausible.

Pushed.  We'll see how they behave now.

> You would probably need several seconds' pg_sleep() in between the
> lock releases to ensure that even on slow/overloaded machines, there's
> enough time for all wakened backends to do what they're supposed to
> do.

I don't really like sleeps in tests, because instead of 0.01 seconds in
the normal case it now takes 10.01 seconds.  But fixing it is more
trouble than it's probably worth, so I added 5s sleeps.

If someone wants to get rid of that idle time (i.e. have a mechanism
that causes it to stop sleeping when the update is done) I would be
happy to give it a look.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (6+ messages)

Message-ID: <20160229194209.GA296525@alvherre.pgsql>
Permalink:  ../20160229194209.GA296525@alvherre.pgsql/
Also on:    postgresql.org/message-id/20160229194209.GA296525@alvherre.pgsql

 · 

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: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Add isolationtester spec for old heapam.c bug
  In-Reply-To: <20160229194209.GA296525@alvherre.pgsql>
  References: <17574.1456769322@sss.pgh.pa.us> <20160229194209.GA296525@alvherre.pgsql>

* 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