pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgresql.org
Subject: Re: Race-like failure in recovery/t/009_twophase.pl
Date: Sun, 02 Jul 2017 17:10:31 -0400
Message-ID: <14837.1499029831@sss.pgh.pa.us> (raw)
In-Reply-To: <2588.1499028049@sss.pgh.pa.us>
References: <908.1498965681@sss.pgh.pa.us>
	<2588.1499028049@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (12+ messages)  latest in thread

Message-ID: <14837.1499029831@sss.pgh.pa.us>
Permalink:  ../14837.1499029831@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14837.1499029831@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: Race-like failure in recovery/t/009_twophase.pl
  In-Reply-To: <14837.1499029831@sss.pgh.pa.us>

* 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