postgresql/src/fe_utils
Michael Paquier aeec3534cc 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:11 +09:00
..
.gitignore Move psql's psqlscan.l into src/fe_utils. 2016-03-24 20:28:47 -04:00
Makefile Move some code from src/bin/scripts to src/fe_utils to permit reuse. 2021-02-05 13:33:38 -05:00
archive.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
cancel.c Avoid calling gettext() in signal handlers. 2022-01-17 13:30:04 -05:00
conditional.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
connect_utils.c Move some code from src/bin/scripts to src/fe_utils to permit reuse. 2021-02-05 13:33:38 -05:00
mbprint.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
option_utils.c Move some code from src/bin/scripts to src/fe_utils to permit reuse. 2021-02-05 13:33:38 -05:00
parallel_slot.c Use correct connection for cancellation in frontend's parallel slots 2022-08-27 15:22:11 +09:00
print.c Clean up assorted failures under clang's -fsanitize=undefined checks. 2022-03-03 18:13:24 -05:00
psqlscan.l psql: Fix line continuation prompts for unbalanced parentheses 2021-04-29 09:04:31 +02:00
query_utils.c Move some code from src/bin/scripts to src/fe_utils to permit reuse. 2021-02-05 13:33:38 -05:00
recovery_gen.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
simple_list.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
string_utils.c Allow db.schema.table patterns, but complain about random garbage. 2022-04-20 11:39:44 -04:00