Re: timeouts in PostgresNode::psql

From: ilmari(at)ilmari(dot)org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=)
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: timeouts in PostgresNode::psql
Date: 2017-02-28 09:12:51
Message-ID: d8jo9xm65m4.fsf@dalvik.ping.uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:

> On Mon, Feb 27, 2017 at 11:28 AM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
>
>> Still needs applying to pg9.6 and pg10.
>
> I did not understand at first what you meant, but after looking at the
> commit message of the patch things are clear:
> Newer Perl or IPC::Run versions default to appending the filename to string
> exceptions, e.g. the exception
> psql timed out
> is thrown as
> psql timed out at /usr/share/perl5/vendor_perl/IPC/Run.pm line 2961.
>
> And that's good to know, I can see as well that the patch is on the CF app:
> https://commitfest.postgresql.org/13/
> And that it has been marked as ready for committer.

That was me reviewing it, but the email to the list bounced, because the
commitfest app (or the python email.message module, depending on who you
feel like blaming) doesn't handle non-ASCII characters in structured
headers correctly. In my case, it generated the header

From: =?utf-8?q?Dagfinn_Ilmari_Manns=C3=A5ker_=3Cilmari=40ilmari=2Eorg=3E?=\n\n

when it should have been

From: =?utf-8?q?Dagfinn_Ilmari_Manns=C3=A5ker?= <ilmari(at)ilmari(dot)org>

Anyway, my rewview was as follows:

Tested by copying the timeout example from the PostgresNode docs into a
test file and adding an assertion that the variable passed to the
'timed_out' parameter gets set. Without the patch the test script dies
when the timeout occurs, with the patch the test passes.

PostgresNode itself could do with some tests (nothing in the actual
tests seems to use the timeout functionality), but that's for another
patch.

--
"I use RMS as a guide in the same way that a boat captain would use
a lighthouse. It's good to know where it is, but you generally
don't want to find yourself in the same spot." - Tollef Fog Heen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vinayak 2017-02-28 09:24:57 ANALYZE command progress checker
Previous Message Kyotaro HORIGUCHI 2017-02-28 08:34:02 Re: Radix tree for character conversion