views:

44

answers:

1

I'd like to deploy my Django app (which uses postgresql as database) on lighttpd using FastCGI.
For postgresql i see that Django has 2 backends available 'postgresql_psycopg2' and 'postgresql'.
My question is that lighttpd being a threaded server are there any issues with any of this backends? Are they thread safe? And which one of them is better/recommended?
My questions comes because i read something (don't remember now where) that postgresql's driver for python isn't thread safe.

LE: After some more reading i just figured it out that the threading issue is present only when running manage.py method=threaded and not when running manage.py method=prefork as this is FastCGI process bound and not webserver bound(i.e: doesn't matter how the webserver is, threaded or process based but only how the fastcgi server is running)
Anyway in this case it seems it doesn't matter if it's threaded or prefosk as how Milen A. Radev answered postgresql_psycopg2 is thread safe.