postgresql/src/fe_utils
Michael Paquier 44817d97bc Use correct connection for cancellation in frontend's parallel slots
While waiting for slots to become available in wait_on_slots() in
parallel_slot.c, the cancellation always relied on the first connection
in the set to do the job.  This could cause problems when this slot's
socket is gone as PQgetCancel() would return NULL in this case.  Rather
than always using the first connection, this changes the logic to use
the first valid connection for the cancellation.

Author: Ranier Vilela
Reviewed-by: Justin Pryzby
Discussion: https://postgr.es/m/CAEudQAokk1h_pUwGXsYS4oVOuf35s1O2o3TXGHpV8=AWikvgHA@mail.gmail.com
Backpatch-through: 14
2022-08-27 15:22:07 +09:00
..
.gitignore Move psql's psqlscan.l into src/fe_utils. 2016-03-24 20:28:47 -04:00
Makefile Update copyright for 2022 2022-01-07 19:04:57 -05:00
archive.c Improve frontend error logging style. 2022-04-08 14:55:14 -04:00
cancel.c Avoid calling gettext() in signal handlers. 2022-01-17 13:30:04 -05:00
conditional.c Allow pgbench to retry in some cases. 2022-03-23 19:05:45 +09:00
connect_utils.c Improve frontend error logging style. 2022-04-08 14:55:14 -04:00
mbprint.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
option_utils.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
parallel_slot.c Use correct connection for cancellation in frontend's parallel slots 2022-08-27 15:22:07 +09:00
print.c Remove extraneous blank lines before block-closing braces 2022-04-13 19:16:02 +02:00
psqlscan.l Reject trailing junk after numeric literals 2022-02-16 10:37:31 +01:00
query_utils.c Improve frontend error logging style. 2022-04-08 14:55:14 -04:00
recovery_gen.c Improve frontend error logging style. 2022-04-08 14:55:14 -04:00
simple_list.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
string_utils.c Fix minor memory leaks in psql's tab completion. 2022-07-22 10:53:26 -04:00