diff options
author | Robert Haas <rhaas@postgresql.org> | 2015-11-06 00:31:03 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2015-11-06 00:31:46 -0500 |
commit | dde5f09fad3ac188a155e21667f76825f43a28c8 (patch) | |
tree | 5bb86f57fa6afc43b993c0398f7969bf59e91778 | |
parent | b23af458755ed90ae9164857e59d034bad75a672 (diff) | |
download | postgresql-dde5f09fad3ac188a155e21667f76825f43a28c8.tar.gz postgresql-dde5f09fad3ac188a155e21667f76825f43a28c8.zip |
Document interaction of bgworkers with LISTEN/NOTIFY.
Thomas Munro and Robert Haas, reviewed by Haribabu Kommi
-rw-r--r-- | doc/src/sgml/bgworker.sgml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/src/sgml/bgworker.sgml b/doc/src/sgml/bgworker.sgml index 505e362879a..5570ed045db 100644 --- a/doc/src/sgml/bgworker.sgml +++ b/doc/src/sgml/bgworker.sgml @@ -278,6 +278,18 @@ typedef struct BackgroundWorker </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. </para> |