Re: implemention of calls to stored procs.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nic Ferrier <nferrier@tapsellferrier.co.uk>
Cc: pgsql-general@postgresql.org
Date: 2002-01-23T00:15:14Z
Lists: pgsql-general
Nic Ferrier <nferrier@tapsellferrier.co.uk> writes: > From what I udnerstand of the architecture it seems that the SPI API > is inherently single threaded. The entire backend is inherently single-threaded. > If not, am I right? Can only one user supplied proc be running at once > across the whole postgres engine? What do you consider "the whole engine"? Each connection has its own backend process. Also, SPI is recursive even though not thread-safe: it's possible for an SPI-executed query to call a function that performs another SPI query. regards, tom lane