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

From Tom Lane
Subject Re: waiting for reload in tests
Date
Msg-id 4016307.1652146172@sss.pgh.pa.us
Whole thread Raw
In response to waiting for reload in tests  (Andres Freund <andres@anarazel.de>)
Responses Re: waiting for reload in tests  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> In a couple tests I (IIRC others as well) had the problem that a config reload
> isn't actually synchronous. I.e. a sequence like

> $node_primary->reload;
> $node_primary->safe_psql('postgres',...)

> isn't actually guaranteed to observe the config as reloaded in the the
> safe_psql().

Brute force way: s/reload/restart/

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

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: waiting for reload in tests
Next
From: Michael Paquier
Date:
Subject: Re: waiting for reload in tests