Re: "stored procedures" - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: "stored procedures"
Date
Msg-id BANLkTinWzBYA9tsS=f8T-2C7EBWv0pk2Yw@mail.gmail.com
Whole thread Raw
In response to Re: "stored procedures"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>> What about cancelling? Cancel the current running query, or the whole
>> procedure (I'm assuming the latter?  How would that work?
>
> Good question.  If you're imagining that the SP could decide to cancel a
> database request partway through, it seems even further afield from what
> could reasonably be done in a single-threaded backend.
>
> Maybe we should think about the SP controlling a second backend (or even
> multiple backends?) that's executing the "transactional" operations.
> dblink on steroids, as it were.

SP are executed in separate process in DB2 or in Oracle - but
sometimes there are significant overhead from interprocess
communication - it is reason, why collections are popular in PLSQL.

A spacial backend for SP is probably most simple solution - but there
can be performance problems :(

Regards

Pavel


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Patch for pg_upgrade to turn off autovacuum
Next
From: Greg Smith
Date:
Subject: Re: fsync reliability