diff options
| author | Robert Haas | 2013-07-22 18:13:00 +0000 |
|---|---|---|
| committer | Robert Haas | 2013-07-22 19:15:22 +0000 |
| commit | 295f9bbf1d2d1e985471bd523c7c9bfd3d134759 (patch) | |
| tree | af73717f9704d781061ac6b1bc8d573d4de8ba3a /src | |
| parent | 15b9bdf4d46e5b2858c7666dd4a39040aa12e668 (diff) | |
Remove bgw_sighup and bgw_sigterm.
Per discussion on pgsql-hackers, these aren't really needed. Interim
versions of the background worker patch had the worker starting with
signals already unblocked, which would have made this necessary.
But the final version does not, so we don't really need it; and it
doesn't work well with the new facility for starting dynamic background
workers, so just rip it out.
Also per discussion on pgsql-hackers, back-patch this change to 9.3.
It's best to get the API break out of the way before we do an
official release of this facility, to avoid more pain for extension
authors later.
Diffstat (limited to 'src')
| -rw-r--r-- | src/backend/postmaster/postmaster.c | 12 | ||||
| -rw-r--r-- | src/include/postmaster/bgworker.h | 3 |
2 files changed, 2 insertions, 13 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index ec2677380bf..1e41a0e75ec 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -5434,16 +5434,8 @@ do_start_bgworker(void) pqsignal(SIGFPE, SIG_IGN); } - /* SIGTERM and SIGHUP are configurable */ - if (worker->bgw_sigterm) - pqsignal(SIGTERM, worker->bgw_sigterm); - else - pqsignal(SIGTERM, bgworker_die); - - if (worker->bgw_sighup) - pqsignal(SIGHUP, worker->bgw_sighup); - else - pqsignal(SIGHUP, SIG_IGN); + pqsignal(SIGTERM, bgworker_die); + pqsignal(SIGHUP, SIG_IGN); pqsignal(SIGQUIT, bgworker_quickdie); InitializeTimeouts(); /* establishes SIGALRM handler */ diff --git a/src/include/postmaster/bgworker.h b/src/include/postmaster/bgworker.h index 53167057e9a..e91e344eb67 100644 --- a/src/include/postmaster/bgworker.h +++ b/src/include/postmaster/bgworker.h @@ -53,7 +53,6 @@ typedef void (*bgworker_main_type) (void *main_arg); -typedef void (*bgworker_sighdlr_type) (SIGNAL_ARGS); /* * Points in time at which a bgworker can request to be started @@ -76,8 +75,6 @@ typedef struct BackgroundWorker int bgw_restart_time; /* in seconds, or BGW_NEVER_RESTART */ bgworker_main_type bgw_main; void *bgw_main_arg; - bgworker_sighdlr_type bgw_sighup; - bgworker_sighdlr_type bgw_sigterm; } BackgroundWorker; /* Register a new bgworker */ |
