Re: Timing-sensitive case in src/test/recovery TAP tests

Michael Paquier <michael.paquier@gmail.com>

From: Michael Paquier <michael.paquier@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Craig Ringer <craig@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-08-10T06:08:36Z
Lists: pgsql-hackers

Attachments

On Wed, Aug 9, 2017 at 3:39 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Michael Paquier <michael.paquier@gmail.com> writes:
>> On Tue, Aug 8, 2017 at 11:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Michael Paquier <michael.paquier@gmail.com> writes:
>>>> I got the same thought, wondering as well if get_slot_xmins should be
>>>> renamed check_slot_xmins with the is() tests moved inside it as well.
>>>> Not sure if that's worth the API ugliness though.
>
>>> Mmm, doesn't seem like that's worth doing, but I'm half tempted to merge
>>> wait_slot_xmins into get_slot_xmins so you can't skip it ...
>
>> Let's do that please. Merging both was my first feeling when
>> refactoring this test upthread. Should I send a patch?
>
> Sure, have at it.

And here you go.
-- 
Michael

Commits

  1. Simplify fetch-slot-xmins logic in recovery TAP tests.

  2. Fix yet another race condition in recovery/t/001_stream_rep.pl.

  3. Improve wait logic in TAP tests for streaming replication.