Thread: newbie question: 'multithreading' longrunning postgres-queries from plpgsql-function.

Hi Group,


If a function (plpgsql in Postgres7.3) takes a long while to complete,
and only performs updates on tables, will other connections to the same
database just continue to function normally?

I understand that normal longrunning queries will run simultaniously,
but does that apply to plpgsql-functions too?

I need to know a little bit more about 'multithreading' in Postgres
before coding my application that way.
(I am not sure 'multithreading' is the right choice of words for the
describted situation.)

Thanks.

Regards,
Erwin


Normally how???  Will the database continue accepting
other connections?  Yes.  Can you expect reasonable
response times from requests on those other
connections?  It depends on the load of the db,
available system resources for the database, execution
plans, and other things.  PostgreSQL is a multi-user
database and so functions do get executed concurrently
(sort of) when called from different connections at
the same time.  Functions called within a transaction
get executed in order.

Thanks.

--- Erwin Moller <erwin@_removespam_dexus.nl> wrote:
> Hi Group,
>
>
> If a function (plpgsql in Postgres7.3) takes a long
> while to complete,
> and only performs updates on tables, will other
> connections to the same
> database just continue to function normally?
>
> I understand that normal longrunning queries will
> run simultaniously,
> but does that apply to plpgsql-functions too?
>
> I need to know a little bit more about
> 'multithreading' in Postgres
> before coding my application that way.
> (I am not sure 'multithreading' is the right choice
> of words for the
> describted situation.)
>
> Thanks.
>
> Regards,
> Erwin
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
majordomo@postgresql.org


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com