From 6b093d9c4e2a64f5cb69ccb6f910be95d9ff784d Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 28 May 2009 20:02:10 +0000 Subject: [PATCH] Document that forking while having open libpq connections is not advised. --- doc/src/sgml/libpq.sgml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 209151b5d0..86affb0100 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -64,6 +64,16 @@ whether a connection was successfully made before queries are sent via the connection object. + + + 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 exec from + the child process to load a new executable is safe. + + + On Windows, there is a way to improve performance if a single -- 2.39.5