From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_rewind test race condition..? |
Date: | 2015-05-01 05:09:41 |
Message-ID: | 55430A95.8080808@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 04/29/2015 06:03 AM, Stephen Frost wrote:
> * Heikki Linnakangas (hlinnaka(at)iki(dot)fi) wrote:
>> --- a/src/backend/access/transam/xlog.c
>> +++ b/src/backend/access/transam/xlog.c
>> @@ -7173,7 +7173,10 @@ StartupXLOG(void)
>> * than is appropriate now that we're not in standby mode anymore.
>> */
>> if (fast_promoted)
>> + {
>> + sleep(5);
>> RequestCheckpoint(CHECKPOINT_FORCE);
>> + }
>> }
>>
>> The simplest fix would be to force a checkpoint in the regression
>> test, before running pg_rewind. It's a bit of a cop out, since you'd
>> still get the same issue when you tried to do the same thing in the
>> real world. It should be rare in practice - you'd not normally run
>> pg_rewind immediately after promoting the standby - but a better
>> error message at least would be nice..
>
> Forcing a checkpoint in the regression tests and then providing a better
> error message sounds reasonable to me. I agree that it's very unlikely
> to happen in the real world, even when you're bouncing between systems
> for upgrades, etc, you're unlikely to do it fast enough for this issue
> to exhibit itself, and a better error message would help any users who
> manage to run into this (perhaps during their own testing).
I've committed this simple fix for now.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2015-05-01 05:48:38 | Re: Faster setup_param_list() in plpgsql |
Previous Message | Tom Lane | 2015-05-01 04:19:20 | Re: BuildTupleFromCStrings Memory Documentation? |