mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Partially deduplicate interrupt handling for background processes.
Where possible, share signal handler code and main loop interrupt checking. This saves quite a bit of code and should simplify maintenance, too. This commit intends not to change the way anything works, even though that might allow more code to be unified. It does unify a bunch of individual variables into a ShutdownRequestPending flag that has is now used by a bunch of different process types, though. Patch by me, reviewed by Andres Freund and Daniel Gustafsson. Discussion: http://postgr.es/m/CA+TgmoZwDk=BguVDVa+qdA6SBKef=PKbaKDQALTC_9qoz1mJqg@mail.gmail.com
This commit is contained in:
@ -82,7 +82,6 @@ extern PGDLLIMPORT volatile sig_atomic_t InterruptPending;
|
||||
extern PGDLLIMPORT volatile sig_atomic_t QueryCancelPending;
|
||||
extern PGDLLIMPORT volatile sig_atomic_t ProcDiePending;
|
||||
extern PGDLLIMPORT volatile sig_atomic_t IdleInTransactionSessionTimeoutPending;
|
||||
extern PGDLLIMPORT volatile sig_atomic_t ConfigReloadPending;
|
||||
|
||||
extern PGDLLIMPORT volatile sig_atomic_t ClientConnectionLost;
|
||||
|
||||
@ -279,8 +278,6 @@ extern void restore_stack_base(pg_stack_base_t base);
|
||||
extern void check_stack_depth(void);
|
||||
extern bool stack_is_too_deep(void);
|
||||
|
||||
extern void PostgresSigHupHandler(SIGNAL_ARGS);
|
||||
|
||||
/* in tcop/utility.c */
|
||||
extern void PreventCommandIfReadOnly(const char *cmdname);
|
||||
extern void PreventCommandIfParallelMode(const char *cmdname);
|
||||
|
Reference in New Issue
Block a user