Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita886090

Browse files
committed
doc: Add WaitForBackgroundWorkerShutdown() to bgw docs.
Commit924bcf4 added WaitForBackgroundWorkerShutdown, but didn'tadd it to the documentation. Fix that and two small spelling errors inthe WaitForBackgroundWorkerStartup paragraph.Author: Daniel GustafssonDiscussion:https://postgr.es/m/C8738949-0350-4999-A1DA-26E209FF248D@yesql.se
1 parent8c438fc commita886090

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

‎doc/src/sgml/bgworker.sgml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,24 @@ typedef struct BackgroundWorker
259259
<function>WaitForBackgroundWorkerStartup(<parameter>BackgroundWorkerHandle
260260
*handle</parameter>, <parameter>pid_t *</parameter>)</function> function.
261261
This function will block until the postmaster has attempted to start the
262-
background worker, or until the postmaster dies. If the backgroundrunner
263-
is running, the return value will <literal>BGWH_STARTED</literal>, and
262+
background worker, or until the postmaster dies. If the backgroundworker
263+
is running, the return value willbe<literal>BGWH_STARTED</literal>, and
264264
the PID will be written to the provided address. Otherwise, the return
265265
value will be <literal>BGWH_STOPPED</literal> or
266266
<literal>BGWH_POSTMASTER_DIED</literal>.
267267
</para>
268268

269+
<para>
270+
A process can also wait for a background worker to shut down, by using the
271+
<function>WaitForBackgroundWorkerShutdown(<parameter>BackgroundWorkerHandle
272+
*handle</parameter>)</function> function and passing the
273+
<type>BackgroundWorkerHandle *</type> obtained at registration. This
274+
function will block until the background worker exits, or postmaster dies.
275+
When the background worker exits, the return value is
276+
<literal>BGWH_STOPPED</literal>, if postmaster dies it will return
277+
<literal>BGWH_POSTMASTER_DIED</literal>.
278+
</para>
279+
269280
<para>
270281
If a background worker sends asynchronous notifications with the
271282
<command>NOTIFY</command> command via the Server Programming Interface

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp