aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2018-04-22 14:03:36 +0200
committerMagnus Hagander <magnus@hagander.net>2018-04-22 14:03:36 +0200
commit9cad926eb876a30d58a5b39789098da83a6ef91c (patch)
treefe6a93d99803a42c48611d94173db0b66c25e919
parenta66c03f698f876646b9ef9d5d599e8a6d0ff2e88 (diff)
downloadpostgresql-9cad926eb876a30d58a5b39789098da83a6ef91c.tar.gz
postgresql-9cad926eb876a30d58a5b39789098da83a6ef91c.zip
Add missing documentation for BGWORKER_BYPASS_ALLOWCONN
This was missed in eed1ce72e1593d3e8b7461d7744808d4d6bf402b. Reported by Michael Paquier
-rw-r--r--doc/src/sgml/bgworker.sgml8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/src/sgml/bgworker.sgml b/doc/src/sgml/bgworker.sgml
index ac71fb2c41f..bc5a52584b9 100644
--- a/doc/src/sgml/bgworker.sgml
+++ b/doc/src/sgml/bgworker.sgml
@@ -189,15 +189,17 @@ typedef struct BackgroundWorker
</para>
<para>Once running, the process can connect to a database by calling
- <function>BackgroundWorkerInitializeConnection(<parameter>char *dbname</parameter>, <parameter>char *username</parameter>)</function> or
- <function>BackgroundWorkerInitializeConnectionByOid(<parameter>Oid dboid</parameter>, <parameter>Oid useroid</parameter>)</function>.
+ <function>BackgroundWorkerInitializeConnection(<parameter>char *dbname</parameter>, <parameter>char *username</parameter>, <parameter>uint32 flags</parameter>)</function> or
+ <function>BackgroundWorkerInitializeConnectionByOid(<parameter>Oid dboid</parameter>, <parameter>Oid useroid</parameter>, <parameter>uint32 flags</parameter>)</function>.
This allows the process to run transactions and queries using the
<literal>SPI</literal> interface. If <varname>dbname</varname> is NULL or
<varname>dboid</varname> is <literal>InvalidOid</literal>, the session is not connected
to any particular database, but shared catalogs can be accessed.
If <varname>username</varname> is NULL or <varname>useroid</varname> is
<literal>InvalidOid</literal>, the process will run as the superuser created
- during <command>initdb</command>.
+ during <command>initdb</command>. If <literal>BGWORKER_BYPASS_ALLOWCONN</literal>
+ is specified as <varname>flags</varname> it is possible to bypass the restriction
+ to connect to databases not allowing user connections.
A background worker can only call one of these two functions, and only
once. It is not possible to switch databases.
</para>