Re: implemention of calls to stored procs.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nic Ferrier <nferrier(at)tapsellferrier(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: implemention of calls to stored procs.
Date: 2002-01-23 00:15:14
Message-ID: 29545.1011744914@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nic Ferrier <nferrier(at)tapsellferrier(dot)co(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-01-23 00:25:02 Re: detecting deadlocks
Previous Message Doug McNaught 2002-01-23 00:13:37 Re: implemention of calls to stored procs.