aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2013-07-22 14:13:00 -0400
committerRobert Haas <rhaas@postgresql.org>2013-07-22 14:13:00 -0400
commitf40a318eeaed0c66fcb2ddd442006e54bf49c634 (patch)
treead7b6ddbadf0c36dd1171603ee4cb2da5a2e8f1c /doc/src
parent0518eceec3a1cc2b71da04e839f05f555fdd8567 (diff)
downloadpostgresql-f40a318eeaed0c66fcb2ddd442006e54bf49c634.tar.gz
postgresql-f40a318eeaed0c66fcb2ddd442006e54bf49c634.zip
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 'doc/src')
-rw-r--r--doc/src/sgml/bgworker.sgml16
1 files changed, 1 insertions, 15 deletions
diff --git a/doc/src/sgml/bgworker.sgml b/doc/src/sgml/bgworker.sgml
index 9d9b631ac1a..268e1cd2153 100644
--- a/doc/src/sgml/bgworker.sgml
+++ b/doc/src/sgml/bgworker.sgml
@@ -48,7 +48,6 @@
The structure <structname>BackgroundWorker</structname> is defined thus:
<programlisting>
typedef void (*bgworker_main_type)(void *main_arg);
-typedef void (*bgworker_sighdlr_type)(SIGNAL_ARGS);
typedef struct BackgroundWorker
{
char bgw_name[BGW_MAXLEN];
@@ -59,8 +58,6 @@ typedef struct BackgroundWorker
char bgw_library_name[BGW_MAXLEN]; /* only if bgw_main is NULL */
char bgw_function_name[BGW_MAXLEN]; /* only if bgw_main is NULL */
Datum bgw_main_arg;
- bgworker_sighdlr_type bgw_sighup;
- bgworker_sighdlr_type bgw_sigterm;
} BackgroundWorker;
</programlisting>
</para>
@@ -138,17 +135,6 @@ typedef struct BackgroundWorker
<structfield>bgw_main</structfield> is NULL.
</para>
- <para>
- <structfield>bgw_sighup</structfield> and <structfield>bgw_sigterm</> are
- pointers to functions that will be installed as signal handlers for the new
- process. If <structfield>bgw_sighup</> is NULL, then <literal>SIG_IGN</>
- is used; if <structfield>bgw_sigterm</> is NULL, a handler is installed that
- will terminate the process after logging a suitable message. These
- fields should not be used if <structfield>bgw_main</> is NULL; instead,
- the worker process should set its own signal handlers before calling
- <function>BackgroundWorkerUnblockSignals()</function>.
- </para>
-
<para>Once running, the process can connect to a database by calling
<function>BackgroundWorkerInitializeConnection(<parameter>char *dbname</parameter>, <parameter>char *username</parameter>)</function>.
This allows the process to run transactions and queries using the
@@ -163,7 +149,7 @@ typedef struct BackgroundWorker
<para>
Signals are initially blocked when control reaches the
<structfield>bgw_main</> function, and must be unblocked by it; this is to
- allow the process to further customize its signal handlers, if necessary.
+ allow the process to customize its signal handlers, if necessary.
Signals can be unblocked in the new process by calling
<function>BackgroundWorkerUnblockSignals</> and blocked by calling
<function>BackgroundWorkerBlockSignals</>.