Re: implemention of calls to stored procs. - Mailing list pgsql-general

From Tom Lane
Subject Re: implemention of calls to stored procs.
Date
Msg-id 29545.1011744914@sss.pgh.pa.us
Whole thread Raw
In response to implemention of calls to stored procs.  (Nic Ferrier <nferrier@tapsellferrier.co.uk>)
List 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

pgsql-general by date:

Previous
From: Nic Ferrier
Date:
Subject: implemention of calls to stored procs.
Next
From: Doug McNaught
Date:
Subject: Re: implemention of calls to stored procs.