Home > Archive > PostgreSQL Discussion > March 2005 > libpq usage in Samba









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author libpq usage in Samba
Fernando Schapachnik

2005-03-30, 9:41 am

I'm trying to figure out why Samba is failing at high loads if using Postgres as
a backend (7.3.9 in my setup). On startup in makes one connection only against
the database which is shared among all the Samba processes. In turn, each issue
a PQexec() over the same connection (a SELECT, actually). Is that a safe use? I
would think it is not, but not really sure. I mean, does libpq multiplex queries
and handle concurrency correctly in a such a scenario?

Thanks.


Fernando.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Doug McNaught

2005-03-30, 9:41 am

Fernando Schapachnik <fernando@mecon.gov.ar> writes:

> I'm trying to figure out why Samba is failing at high loads if using
> Postgres as a backend (7.3.9 in my setup). On startup in makes one
> connection only against the database which is shared among all the
> Samba processes. In turn, each issue a PQexec() over the same
> connection (a SELECT, actually). Is that a safe use? I would think
> it is not, but not really sure. I mean, does libpq multiplex queries
> and handle concurrency correctly in a such a scenario?


No, it doesn't. You need to figure out a way to have each Samba
process open its own connection.

-Doug

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com