Skip site navigation (1) Skip section navigation (2)

Re: Race-like failure in recovery/t/

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Race-like failure in recovery/t/
Date: 2017-07-02 21:10:31
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Álvaro Hernández TortosaDate: 2017-07-02 21:21:16
Subject: Re: Using postgres planner as standalone component
Previous:From: Tom LaneDate: 2017-07-02 20:40:49
Subject: Re: Race-like failure in recovery/t/

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group