On Fri, 12 Feb 2010 13:33:01 +0100, Alex Brasetvik <a...@brasetvik.com> wrote: > > On Feb 11, 2010, at 18:58 , Faheem Mitha wrote: > >> sqlalchemy forks a process when it calls the db > > No, it does not.
> PostgreSQL forks a new backend process when a connection is established, however. It sounds like that's what you want. Do "SELECT pg_backend_pid()" to get the PID of the backend process serving your connection. > That and other stat functions are documented here: http://www.postgresql.org/docs/current/static/monitoring-stats.html I see. Thanks, that's very helpful. Does the pid/process stay the same across successive calls to text()? I'm guessing that successive calls to text() would take place within the same session, and therefore correspond to the same backend session. If not, how can I get it to return the pid before I start the actual query? In any case, I'll experiment with this. Regards, Faheem. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.