<div>Hi,<br></div><div>I have a question about DB connections. Is it real to make connection for each logined user or for each child? Now I create a new DB connection in child_init() hook:</div><div> </div><div>PGconn *conn;<br>
</div><div></div><div> int child_init()<br> { <br>conn = PQconnectdb(conn_str);<br>         return 0;<br> }<br></div><div></div><div><br></div><div> int pg_connect()<br> {<br>         if(conn)<br>                 PQreset(conn);<br>         else<br>                 conn = PQconnectdb(conn_str);<br>
<br>         if(conn && PQstatus(conn) == CONNECTION_OK)<br>         {<br>                 info("Connected to PostgreSQL. Server version %d", <br>                         PQserverVersion(conn));<br>                 info("conn = %p", conn);<br>                 return 0;<br>
        }<br> <br>         pg_finish();<br>         err("Connection to PostgreSQL failed");<br>         return 1;<br> }<br><br></div>