Re: "stored procedures"

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: "stored procedures"
Date: 2011-04-22 03:42:07
Message-ID: BANLkTinWzBYA9tsS=f8T-2C7EBWv0pk2Yw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2011-04-22 03:51:49 Re: fsync reliability
Previous Message Robert Haas 2011-04-22 01:38:47 Re: Patch for pg_upgrade to turn off autovacuum