mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-03 05:16:49 +02:00
0da096d78e
We shouldn't be doing non-trivial work in signal handlers in general, and in this case the handler could reach unsafe code and corrupt state. It also clobbered its own "reason" code. Move all recovery conflict decision logic into the next CHECK_FOR_INTERRUPTS(), and have the signal handler just set flags and the latch, following the standard pattern. Since there are several different "reasons", use a separate flag for each. With this refactoring, the recovery conflict system no longer piggy-backs on top of the regular query cancelation mechanism, but instead raises an error directly if it decides that is necessary. It still needs to respect QueryCancelHoldoffCount, because otherwise the FEBE protocol might get out of sync (see commit |
||
---|---|---|
.. | ||
cmdtag.c | ||
dest.c | ||
fastpath.c | ||
Makefile | ||
meson.build | ||
postgres.c | ||
pquery.c | ||
utility.c |