aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2009-05-28 20:02:10 +0000
committerBruce Momjian <bruce@momjian.us>2009-05-28 20:02:10 +0000
commit400fb19a30fe35da91fb2ed68c5b28c0083ef880 (patch)
tree008fb82ec45da23cf6606ed0796b050a43b8133a
parent2e6107cb621d003dcab0df53ac8673ea67c4e467 (diff)
downloadpostgresql-400fb19a30fe35da91fb2ed68c5b28c0083ef880.tar.gz
postgresql-400fb19a30fe35da91fb2ed68c5b28c0083ef880.zip
Document that forking while having open libpq connections is not
advised.
-rw-r--r--doc/src/sgml/libpq.sgml12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 44b117e4cdb..85ba6dadd1d 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.288 2009/04/27 16:27:36 momjian Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.289 2009/05/28 20:02:10 momjian Exp $ -->
<chapter id="libpq">
<title><application>libpq</application> - C Library</title>
@@ -64,6 +64,16 @@
whether a connection was successfully made before queries are sent
via the connection object.
+ <warning>
+ <para>
+ On Unix, forking a process with open libpq connections can lead to
+ unpredictable results because the parent and child processes share
+ the same sockets and operating system resources. For this reason,
+ such usage is not recommended, though doing an <function>exec</> from
+ the child process to load a new executable is safe.
+ </para>
+ </warning>
+
<note>
<para>
On Windows, there is a way to improve performance if a single