pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make detach-partition-concurrently-3 less timing-sensitive
Date: Tue, 25 May 2021 16:54:48 +0000
Message-ID: <E1llaKO-0002dr-Qt@gemulon.postgresql.org> (raw)

Make detach-partition-concurrently-3 less timing-sensitive

This recently added test has shown to be too sensitive to timing when
sending a cancel to a session waiting for a lock.

We fix this by running a no-op query in the blocked session immediately
after the cancel; this avoids the session that sent the cancel sending
another query immediately before the cancel has been reported.
Idea by Noah Misch.

With that fix, we sometimes see that the cancel error report is shown
only relative to the step that is cancelled, instead of together with
the step that sends the cancel.  To increase the probability that both
steps are shown togeter, add a 0.1s sleep to the cancel.  In normal
conditions this appears sufficient to silence most failures, but we'll
see that the slower buildfarm members say about it.

Reported-by: Takamichi Osumi <osumi.takamichi@fujitsu.com>
Discussion: https://postgr.es/m/OSBPR01MB4888C4ABA361C7E81094AC66ED269@OSBPR01MB4888.jpnprd01.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5e0b1aeb2dfed4f1eb7ac5154c1573885a70db41

Modified Files
--------------
.../expected/detach-partition-concurrently-3.out   | 162 ++++++++++++---------
.../specs/detach-partition-concurrently-3.spec     |  44 +++---
2 files changed, 115 insertions(+), 91 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1llaKO-0002dr-Qt@gemulon.postgresql.org>
Permalink:  ../E1llaKO-0002dr-Qt@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1llaKO-0002dr-Qt@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: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Make detach-partition-concurrently-3 less timing-sensitive
  In-Reply-To: <E1llaKO-0002dr-Qt@gemulon.postgresql.org>
  References: <E1llaKO-0002dr-Qt@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