Don't wake up to check trigger file if none is configured - Mailing list pgsql-hackers

From Jeff Janes
Subject Don't wake up to check trigger file if none is configured
Date
Msg-id CAMkU=1y4fJ8YvKpkuw=yTOLAW9_86vyrt2ggMuUBPKOV_zYh-g@mail.gmail.com
Whole thread Raw
Responses Re: Don't wake up to check trigger file if none is configured
Re: Don't wake up to check trigger file if none is configured
List pgsql-hackers
A streaming replica waiting on WAL from the master will wake up every 5 seconds to check for a trigger file.  This is pointless if no trigger file has been configured.

The attached patch suppresses the timeout when there is no trigger file configured.

A minor thing to be sure, but there was a campaign a couple years ago to remove such spurious wake-ups, so maybe this change is worthwhile.

I noticed that the existing codebase does not have a consensus on what to pass to WaitLatch for the timeout when the timeout isn't relevant. I picked 0, but -1L also has precedent.

Cheers,

Jeff

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Centralize use of PG_INTXX_MIN/MAX for integer limits
Next
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] pgbench - allow to store select results intovariables