From: Fujii Masao <masao.fujii@gmail.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Fujii Masao <fujii@postgresql.org>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Add regression tests for multiple synchronous standbys.
Date: Fri, 15 Apr 2016 14:03:08 +0900
Message-ID: <CAHGQGwFr6gVi8VTA2__Vt3OcH3REhvuvYDWXHJDcin-CsxpROQ@mail.gmail.com> (raw)
In-Reply-To: <CAB7nPqRJEZoApRcSauFjGQ6H+CTic0b0tExXtX6LA90QXu-ZKQ@mail.gmail.com>
References: <E1aoRAY-0002oe-LK@gemulon.postgresql.org>
<CAB7nPqQ7cnYVpqQ-F9MQrS3YJ1bzQG_3DhBETiF9fRueTZYW9w@mail.gmail.com>
<CAHGQGwH6WR7+LR9TB=UfW4y58NQViH0Shf7q0knxoXYCKRgSdg@mail.gmail.com>
<CAB7nPqT6GGLwPzyPOR7BYVjYUkD=S2bA2QT6XhWB1WixWy+7BA@mail.gmail.com>
<CAD21AoCO+eDr6xZD4Hvk5VE-V9wLZ0VTOD8b6BqYKYHXc5_3iQ@mail.gmail.com>
<CAB7nPqQvLv5Bw+F8EdLF6nK8X=szq2R3EqtQ+5MiX5t=-jRNpw@mail.gmail.com>
<CAHGQGwFS+BhDjFV7qKurQAax_7Kg2Cr2wOQNMXkj6k-rkBYj=w@mail.gmail.com>
<CAB7nPqR6t1_hGpB0=9JuL1cxxzHvi46m4TbvjmhGQ4Xx4oWeJQ@mail.gmail.com>
<CAHGQGwH9G5i5OP+bsJVtkOHiJPt+EW-ZvvCez6_G2rkMMZTNRA@mail.gmail.com>
<CAB7nPqRJEZoApRcSauFjGQ6H+CTic0b0tExXtX6LA90QXu-ZKQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On Fri, Apr 15, 2016 at 1:12 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Fri, Apr 15, 2016 at 12:57 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> On Fri, Apr 15, 2016 at 12:39 PM, Michael Paquier
>> <michael.paquier@gmail.com> wrote:
>>> On Fri, Apr 15, 2016 at 12:16 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
>>>> On Thu, Apr 14, 2016 at 8:41 PM, Michael Paquier
>>>> <michael.paquier@gmail.com> wrote:
>>>>> On Thu, Apr 14, 2016 at 5:17 PM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>>>>>> On Thu, Apr 14, 2016 at 1:22 PM, Michael Paquier
>>>>>> <michael.paquier@gmail.com> wrote:
>>>>>>> Yes. I'd prefer avoid a hardcoded sleep and have something that relies
>>>>>>> on lookups of pg_stat_replication though, because there is no way to
>>>>>>> be sure that a sleep will ever be stable on heavily loaded machines,
>>>>>>> like the machines I am specialized in maintaining :)
>>>>>>> It kills a bit the purpose on having checks on pg_stat_replication as
>>>>>>> the validation tests are based on that, still I think that we had
>>>>>>> better base those checks on a loop that has a timeout, something like
>>>>>>> that in a subroutine:
>>>>>>> What do you think?
>>>>>>
>>>>>> Look good to me. +1.
>>>>
>>>> +1 from me.
>>>>
>>>>> And so here we go...
>>>>
>>>> + ok($test_passed, $msg);
>>>>
>>>> ISTM that this change prevents the test from outputting the difference
>>>> of expected and actual results when the test fails. Which would make
>>>> the diagnosis of the test failure more difficult, I'm afraid.
>>>
>>> Well, then, it is just a matter of saving the result in a variable
>>> defined out of the loop, and use is() for the test. This way, after
>>> the timeout it is possible to check if the expected result and the
>>> fetched result match properly or not. In other words see attached.
>>
>> The patch looks good to me.
>>
>> + my $timeout_max = 30;
>>
>> One comment is; isn't 30 (seconds) too large value for the timeout?
>> What about just, say, 5?
>
> hamster can become easily quite busy to be honest.
Okay, since the test would fail very rarely (I hope),
probably we can live with 30 seconds timeout (it happens
only when the test fails).
I pushed your latest patch. Thanks!
Regards,
--
Fujii Masao
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: masao.fujii@gmail.com, michael.paquier@gmail.com, sawada.mshk@gmail.com, fujii@postgresql.org, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Add regression tests for multiple synchronous standbys.
In-Reply-To: <CAHGQGwFr6gVi8VTA2__Vt3OcH3REhvuvYDWXHJDcin-CsxpROQ@mail.gmail.com>
References: <E1aoRAY-0002oe-LK@gemulon.postgresql.org> <CAB7nPqQ7cnYVpqQ-F9MQrS3YJ1bzQG_3DhBETiF9fRueTZYW9w@mail.gmail.com> <CAHGQGwH6WR7+LR9TB=UfW4y58NQViH0Shf7q0knxoXYCKRgSdg@mail.gmail.com> <CAB7nPqT6GGLwPzyPOR7BYVjYUkD=S2bA2QT6XhWB1WixWy+7BA@mail.gmail.com> <CAD21AoCO+eDr6xZD4Hvk5VE-V9wLZ0VTOD8b6BqYKYHXc5_3iQ@mail.gmail.com> <CAB7nPqQvLv5Bw+F8EdLF6nK8X=szq2R3EqtQ+5MiX5t=-jRNpw@mail.gmail.com> <CAHGQGwFS+BhDjFV7qKurQAax_7Kg2Cr2wOQNMXkj6k-rkBYj=w@mail.gmail.com> <CAB7nPqR6t1_hGpB0=9JuL1cxxzHvi46m4TbvjmhGQ4Xx4oWeJQ@mail.gmail.com> <CAHGQGwH9G5i5OP+bsJVtkOHiJPt+EW-ZvvCez6_G2rkMMZTNRA@mail.gmail.com> <CAB7nPqRJEZoApRcSauFjGQ6H+CTic0b0tExXtX6LA90QXu-ZKQ@mail.gmail.com> <CAHGQGwFr6gVi8VTA2__Vt3OcH3REhvuvYDWXHJDcin-CsxpROQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox