Re: [PATCH] Prevent repeated deadlock-check signals in standby buffer pin waits - Mailing list pgsql-hackers

From JoongHyuk Shin
Subject Re: [PATCH] Prevent repeated deadlock-check signals in standby buffer pin waits
Date
Msg-id CACSdjfM1Pb-kKf9=8eQ+6qnX-SNk_Cz7naZ2QRHk=y_wh2d59w@mail.gmail.com
Whole thread
In response to Re: [PATCH] Prevent repeated deadlock-check signals in standby buffer pin waits  (Xuneng Zhou <xunengzhou@gmail.com>)
Responses Re: [PATCH] Prevent repeated deadlock-check signals in standby buffer pin waits
List pgsql-hackers
Hi Henson,

Thanks for the careful read.

Both timeouts can be set in a single SIGALRM, since handle_sig_alarm() fires
every timeout that is already due. The if/else order is deliberate. The delay
timeout is checked first because the cancel supersedes the deadlock check, so
the both-set case resolves to the cancel, and no defensive branch is needed.

You're right about the coverage too. Only the delay > deadlock_timeout regime
is exercised today, and -1 is the one where the second wait has no startup-side
timer to fall back on. This patch will be rebased on top of the deadlock-detector
fix that lands first, and I'll add a -1 regime test as part of that rebase.

--
JH Shin

pgsql-hackers by date:

Previous
From: Pavlo Golub
Date:
Subject: Re[2]: [PATCH v5] pg_stat_statements: Add last_execution_start column
Next
From: Henson Choi
Date:
Subject: Re: Row pattern recognition