diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-12-02 15:32:54 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-12-02 15:32:54 +0000 |
commit | 8408f65252c23040e766b6a3ecde7bff390e2847 (patch) | |
tree | 4db202b3d10eab659e3d8c9805691523c9a5555e /doc/src | |
parent | e02ef267fc3d41cbba41b2bf404d18a936d28691 (diff) | |
download | postgresql-8408f65252c23040e766b6a3ecde7bff390e2847.tar.gz postgresql-8408f65252c23040e766b6a3ecde7bff390e2847.zip |
Rework libpq threaded SIGPIPE handling to avoid interference with
calling applications. This is done by blocking sigpipe in the libpq
thread and using sigpending/sigwait to possibily discard any sigpipe we
generated.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/libpq.sgml | 20 | ||||
-rw-r--r-- | doc/src/sgml/ref/copy.sgml | 3 |
2 files changed, 3 insertions, 20 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index c47c33d56e2..cfcc7c96562 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.169 2004/11/27 21:56:04 petere Exp $ +$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.170 2004/12/02 15:32:52 momjian Exp $ --> <chapter id="libpq"> @@ -3955,24 +3955,6 @@ which is thread-safe on all platforms. </para> <para> -<application>libpq</application> must ignore <literal>SIGPIPE</> signals -generated internally by <function>send()</> calls to backend processes. -When <productname>PostgreSQL</> is configured without -<literal>--enable-thread-safety</>, <application>libpq</> sets -<literal>SIGPIPE</> to <literal>SIG_IGN</> before each -<function>send()</> call and restores the original signal handler after -completion. When <literal>--enable-thread-safety</> is used, -<application>libpq</> installs its own <literal>SIGPIPE</> handler -before the first database connection. This handler uses thread-local -storage to determine if a <literal>SIGPIPE</> signal has been generated -by a libpq <function>send()</>. If an application wants to install -its own <literal>SIGPIPE</> signal handler, it should call -<function>PQinSend()</> to determine if it should ignore the -<literal>SIGPIPE</> signal. This function is available in both -thread-safe and non-thread-safe versions of <application>libpq</>. -</para> - -<para> If you experience problems with threaded applications, run the program in <filename>src/tools/thread</> to see if your platform has thread-unsafe functions. This program is run diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index d9a0130333f..96e0caecb87 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -1,8 +1,9 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.60 2004/11/27 21:56:05 petere Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.61 2004/12/02 15:32:53 momjian Exp $ PostgreSQL documentation --> + <refentry id="SQL-COPY"> <refmeta> <refentrytitle id="sql-copy-title">COPY</refentrytitle> |