[Klone-users] DB connections for users

Alex Effractor effractor at gmail.com
Fri Jun 19 06:34:52 EDT 2009


Sorry for previous message -- I sent it when it was not finished :)
So, my chilt_init hook looks like that:

 PGconn *conn;
 const char *conn_str = "...";

 int child_init()
 {
  conn = PQconnectdb(conn_str);
  info("conn = %p", conn);
  //Check connection
  return 0;
 }

 int child_term()
 {
  PQfinish(conn);
  return 0;
 }
When I print connection pointer value I found, that in all childs connection
pointers are equal. Does anybody know how I can create private connection
for each child? Or for each logined user(I already have login system and all
users info stored in session)?
Thanks, Alex.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20090619/75c72d47/attachment.htm


More information about the klone-users mailing list