From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Race-like failure in recovery/t/009_twophase.pl |
Date: | 2017-07-03 01:58:05 |
Message-ID: | CAMsr+YFxVys4TxugwQFb2oCi-F9NJHnXi6-w19UwadPrX1hn+g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 3 July 2017 at 05:10, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I wrote:
>> Any ideas what's wrong there?
>
> Hah: the answer is that query_hash's split() call is broken.
> "man perlfunc" quoth
>
> split Splits the string EXPR into a list of strings and returns that
> list. By default, empty leading fields are preserved, and
> empty trailing ones are deleted.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> In the case at hand, the SQL query returns something like
> "|physical|||t|10338|||0/302B7E8" with normal timing, but with
> enough delay in there, you get "|physical|||t|11542|||" which
> triggers split's default behavior of ignoring the trailing empty
> fields. It looks like the way to get split to not do that is
> to pass it a "limit" of -1.
That's my bad.
(Insert dark muttering about Perl here).
Thanks for spotting it.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-07-03 02:10:09 | Re: PostgresNode::poll_query_until hacking |
Previous Message | Amit Langote | 2017-07-03 01:37:14 | Re: Typo in comment in xlog.c: ReadRecord |