Re: waiting for reload in tests - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: waiting for reload in tests
Date
Msg-id YnnB6hXzQ9b4kLWl@paquier.xyz
Whole thread Raw
In response to Re: waiting for reload in tests  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: waiting for reload in tests
List pgsql-hackers
On Mon, May 09, 2022 at 09:29:32PM -0400, Tom Lane wrote:
> Brute force way: s/reload/restart/

That was my first thought, as it can be tricky to make sure that all
the processes got the update because we don't publish such a state.

One thing I was also thinking about would be to update
pg_stat_activity.state_change when a reload is processed on top of its
current updates, then wait for it to be effective in all the processes
reported.  The field remains NULL for most non-backend processes,
which would be a compatibility change.

> Less brute force: wait for "SHOW variable-you-changed" to report the
> value you expect.

This method may still be unreliable in some processes like a logirep
launcher/receiver or just autovacuum, no?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: waiting for reload in tests
Next
From: Tom Lane
Date:
Subject: Re: waiting for reload in tests