public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andres Freund <[email protected]>
To: Fujii Masao <[email protected]>
Cc: Kyotaro Horiguchi <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module
Date: Fri, 29 Apr 2022 12:18:15 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

Hi,

On 2020-12-16 18:12:39 +0900, Fujii Masao wrote:
> -	/* Wait to be signaled by UnpinBuffer() */
> +	/*
> +	 * Wait to be signaled by UnpinBuffer().
> +	 *
> +	 * We assume that only UnpinBuffer() and the timeout requests established
> +	 * above can wake us up here. WakeupRecovery() called by walreceiver or
> +	 * SIGHUP signal handler, etc cannot do that because it uses the different
> +	 * latch from that ProcWaitForSignal() waits on.
> +	 */
>  	ProcWaitForSignal(PG_WAIT_BUFFER_PIN);
>  
>  	/*

Isn't this comment bogus?  The latch could e.g. be set by
procsignal_sigusr1_handler(), which the startup process uses. Or it could
already be set, when entering ResolveRecoveryConflictWithBufferPin().

Why is it even relevant that we only get woken up by UnpinBuffer()?

Greetings,

Andres Freund






view thread (2+ messages)

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Use standard SIGHUP and SIGTERM handlers in autoprewarm module
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox