403Webshell
Server IP : 104.21.25.180  /  Your IP : 162.159.115.41
Web Server : Apache/2.4.37
System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64
User : ricodeal ( 1046)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/postgresql-docs/html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/postgresql-docs/html/libpq-threading.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>33.19. Behavior in Threaded Programs</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="[email protected]" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="libpq-ssl.html" title="33.18. SSL Support" /><link rel="next" href="libpq-build.html" title="33.20. Building libpq Programs" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">33.19. Behavior in Threaded Programs</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="libpq-ssl.html" title="33.18. SSL Support">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="libpq.html" title="Chapter 33. libpq - C Library">Up</a></td><th width="60%" align="center">Chapter 33. <span xmlns="http://www.w3.org/1999/xhtml" class="application">libpq</span> - C Library</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 10.23 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="libpq-build.html" title="33.20. Building libpq Programs">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="LIBPQ-THREADING"><div class="titlepage"><div><div><h2 class="title" style="clear: both">33.19. Behavior in Threaded Programs</h2></div></div></div><a id="id-1.7.3.26.2" class="indexterm"></a><p>   <span class="application">libpq</span> is reentrant and thread-safe by default.
   You might need to use special compiler command-line
   options when you compile your application code.  Refer to your
   system's documentation for information about how to build
   thread-enabled applications, or look in
   <code class="filename">src/Makefile.global</code> for <code class="literal">PTHREAD_CFLAGS</code>
   and <code class="literal">PTHREAD_LIBS</code>.  This function allows the querying of
   <span class="application">libpq</span>'s thread-safe status:
  </p><div class="variablelist"><dl class="variablelist"><dt id="LIBPQ-PQISTHREADSAFE"><span class="term">     <code class="function">PQisthreadsafe</code>
     <a id="id-1.7.3.26.4.1.1.2" class="indexterm"></a>
    </span></dt><dd><p>      Returns the thread safety status of the
      <span class="application">libpq</span> library.
</p><pre class="synopsis">int PQisthreadsafe();</pre><p>
     </p><p>      Returns 1 if the <span class="application">libpq</span> is thread-safe
      and 0 if it is not.
     </p></dd></dl></div><p>   One thread restriction is that no two threads attempt to manipulate
   the same <code class="structname">PGconn</code> object at the same time. In particular,
   you cannot issue concurrent commands from different threads through
   the same connection object. (If you need to run concurrent commands,
   use multiple connections.)
  </p><p>   <code class="structname">PGresult</code> objects are normally read-only after creation,
   and so can be passed around freely between threads.  However, if you use
   any of the <code class="structname">PGresult</code>-modifying functions described in
   <a class="xref" href="libpq-misc.html" title="33.11. Miscellaneous Functions">Section 33.11</a> or <a class="xref" href="libpq-events.html" title="33.13. Event System">Section 33.13</a>, it's up
   to you to avoid concurrent operations on the same <code class="structname">PGresult</code>,
   too.
  </p><p>   The deprecated functions <code class="function">PQrequestCancel</code> and
   <code class="function">PQoidStatus</code> are not thread-safe and should not be
   used in multithread programs.  <code class="function">PQrequestCancel</code>
   can be replaced by <code class="function">PQcancel</code>.
   <code class="function">PQoidStatus</code> can be replaced by
   <code class="function">PQoidValue</code>.
  </p><p>   If you are using Kerberos inside your application (in addition to inside
   <span class="application">libpq</span>), you will need to do locking around
   Kerberos calls because Kerberos functions are not thread-safe.  See
   function <code class="function">PQregisterThreadLock</code> in the
   <span class="application">libpq</span> source code for a way to do cooperative
   locking between <span class="application">libpq</span> and your application.
  </p></div><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navfooter"><hr></hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="libpq-ssl.html" title="33.18. SSL Support">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="libpq.html" title="Chapter 33. libpq - C Library">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="libpq-build.html" title="33.20. Building libpq Programs">Next</a></td></tr><tr><td width="40%" align="left" valign="top">33.18. SSL Support </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 10.23 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 33.20. Building <span xmlns="http://www.w3.org/1999/xhtml" class="application">libpq</span> Programs</td></tr></table></div></body></html>

Youez - 2016 - github.com/yon3zu
LinuXploit