Re: pgsql: psql: Add test for query canceling

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: psql: Add test for query canceling
Date: 2021-08-22 21:40:36
Message-ID: 42873.1629668436@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

I see that c818c25f4 worked around sidewinder's issue with
this test, but wrasse is still unhappy. I was able to
duplicate the problem on wrasse's host, so I ran it under
truss to see if I could see what's happening.

What the truss log shows is that the Perl script successfully
reads psql.pid and issues kill(SIGINT) to the correct process
... but very shortly thereafter it issues kill(SIGTERM) to the
same process, so of course psql goes belly-up and doesn't
complete the test.

I suppose this is some undocumented interaction between IPC::Run
and the SIGALRM signal handler. I stand by the recommendation
that you need to not use a signal handler here.

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2021-08-23 02:10:36 pgsql: Fix backup manifests to generate correct WAL-Ranges across timel
Previous Message Peter Eisentraut 2021-08-22 16:52:05 pgsql: psql: Improve portability of query cancel test