Re: waiting for reload in tests

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: waiting for reload in tests
Date: 2022-05-10 01:29:32
Message-ID: 4016307.1652146172@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-05-10 01:37:46 Re: waiting for reload in tests
Previous Message Andres Freund 2022-05-10 01:26:57 waiting for reload in tests