Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 400fb19

Browse files
committed
Document that forking while having open libpq connections is not
advised.
1 parent 2e6107c commit 400fb19

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

doc/src/sgml/libpq.sgml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.288 2009/04/27 16:27:36 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.289 2009/05/28 20:02:10 momjian Exp $ -->
22

33
<chapter id="libpq">
44
<title><application>libpq</application> - C Library</title>
@@ -64,6 +64,16 @@
6464
whether a connection was successfully made before queries are sent
6565
via the connection object.
6666

67+
<warning>
68+
<para>
69+
On Unix, forking a process with open libpq connections can lead to
70+
unpredictable results because the parent and child processes share
71+
the same sockets and operating system resources. For this reason,
72+
such usage is not recommended, though doing an <function>exec</> from
73+
the child process to load a new executable is safe.
74+
</para>
75+
</warning>
76+
6777
<note>
6878
<para>
6979
On Windows, there is a way to improve performance if a single

0 commit comments

Comments
 (0)