git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b23af45)
Document interaction of bgworkers with LISTEN/NOTIFY.
Fri, 6 Nov 2015 05:31:03 +0000 (00:31 -0500)
Fri, 6 Nov 2015 05:31:46 +0000 (00:31 -0500)
Thomas Munro and Robert Haas, reviewed by Haribabu Kommi


diff --git a/doc/src/sgml/bgworker.sgml b/doc/src/sgml/bgworker.sgml
index 505e362879ad10edd8c42633a39d00de61bbc83c..5570ed045dbc4e5e9bbc243261be1e8594e85216 100644 (file)
--- a/doc/src/sgml/bgworker.sgml
+++ b/doc/src/sgml/bgworker.sgml
@@ -277,6 +277,18 @@ typedef struct BackgroundWorker
<literal>BGWH_POSTMASTER_DIED</literal>.
</para>
+ <para>
+ If a background worker sends asynchronous notifications with the
+ <command>NOTIFY</command> command via the Server Programming Interface
+ (<acronym>SPI</acronym>), it should call
+ <function>ProcessCompletedNotifies</function> explicitly after committing
+ the enclosing transaction so that any notifications can be delivered. If a
+ background worker registers to receive asynchronous notifications with
+ the <command>LISTEN</command> through <acronym>SPI</acronym>, the worker
+ will log those notifications, but there is no programmatic way for the
+ worker to intercept and respond to those notifications.
+ </para>
+
<para>
The <filename>worker_spi</> contrib module contains a working example,
which demonstrates some useful techniques.
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /