File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1- <!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.275 2009/01/10 20:14:30 momjian Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.276 2009/02/06 18:18:54 momjian Exp $ -->
22
33<chapter id="libpq">
44 <title><application>libpq</application> - C Library</title>
6363 The <function>PQstatus</> function should be called to check
6464 whether a connection was successfully made before queries are sent
6565 via the connection object.
66+
67+ <note>
68+ <para>
69+ On Windows, there is a way to improve performance if a single
70+ database connection is repeated started and shutdown. Internally,
71+ libpq calls WSAStartup() and WSACleanup() for connection startup
72+ and shutdown, respectively. WSAStartup() increments an internal
73+ Windows library reference count which is decremented by WSACleanup().
74+ When the reference count is just one, calling WSACleanup() frees
75+ all resources and all DLLs are unloaded. This is an expensive
76+ operation. To avoid this, an application can manually call
77+ WSAStartup() so resources will not be freed when the last database
78+ connection is closed.
79+ </para>
80+ </note>
6681
6782 <variablelist>
6883 <varlistentry>
You can’t perform that action at this time.
0 commit comments