Make psql's qeury canceling test simple by using signal() routine of IPC::Run
Yugo Nagata <nagata@sraoss.co.jp>
From: Yugo NAGATA <nagata@sraoss.co.jp>
To: pgsql-hackers@postgresql.org
Date: 2023-08-10T03:59:35Z
Lists: pgsql-hackers
Attachments
- simple_psql_cancel_test.patch (text/x-diff) patch
Hello, Currently, the psql's test of query cancelling (src/bin/psql/t/020_cancel.pl) gets the PPID of a running psql by using "\!" meta command, and sends SIGINT to the process by using "kill". However, IPC::Run provides signal() routine that sends a signal to a running process, so I think we can rewrite the test using this routine to more simple fashion as attached patch. What do you think about it? Use of signal() is suggested by Fabien COELHO during the discussion of query cancelling of pgbench [1]. [1] https://www.postgresql.org/message-id/7691ade8-78-dd4-e26-135ccfbf0e9%40mines-paristech.fr Regards, Yugo Nagata -- Yugo NAGATA <nagata@sraoss.co.jp>
Commits
-
Switch psql's TAP test for query cancellation to use IPC::Run::signal()
- 522a31ac873d 17.0 landed
-
Skip psql's TAP test for query cancellation entirely on Windows
- 75b4f930d5db 15.5 landed
- 3f7b7d9df2dc 16.1 landed
- c53e288dba96 17.0 landed