Re: pgsql: psql: Add test for query canceling - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: psql: Add test for query canceling
Date
Msg-id 42873.1629668436@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: psql: Add test for query canceling  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: psql: Improve portability of query cancel test
Next
From: Michael Paquier
Date:
Subject: pgsql: Fix backup manifests to generate correct WAL-Ranges across timel