Re: [HACKERS] Proposal - asynchronous functions

2011-04-27 Thread Markus Wanner
On 04/26/2011 11:17 PM, Robert Haas wrote: IIRC, we kind of got stuck on the prerequisite wamalloc patch, and that sunk the whole thing. :-( Right, that prerequisite was the largest stumbling block. As I certainly mentioned back then, it should be possible to get rid of the imessages

Re: [HACKERS] Proposal - asynchronous functions

2011-04-27 Thread Sim Zacks
It sounds like there is interest in this feature, can it get added to the TODO list? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Merlin Moncure
On Tue, Apr 26, 2011 at 3:28 AM, Sim Zacks s...@compulab.co.il wrote: Asynchronous functions *Problem* Postgresql does not have support for asynchronous function calls. Well, there is asynchronous support from the client of course. Thus you can set up a asynchronous call back to the database

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Robert Haas
On Tue, Apr 26, 2011 at 3:28 AM, Sim Zacks s...@compulab.co.il wrote: Add an Async command for functions ( ASYNC my_func(var1,var2) ) and add an async optional keyword in trigger statements ( CREATE TRIGGER ... EXECUTE ASYNC trig_func() ). This should cause an internal session to be started

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: We've talked about a number of features that could benefit from some kind of worker process facility (e.g. logical replication, parallel query). So far no one has stepped forward to build such a facility, and I think without that this can't even

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Robert Haas
On Tue, Apr 26, 2011 at 8:32 AM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: We've talked about a number of features that could benefit from some kind of worker process facility (e.g. logical replication, parallel query).  So far no one has stepped

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Sim Zacks
On 04/26/2011 03:15 PM, Merlin Moncure wrote: On Tue, Apr 26, 2011 at 3:28 AM, Sim Zackss...@compulab.co.il wrote: Asynchronous functions *Problem* Postgresql does not have support for asynchronous function calls. Well, there is asynchronous support from the client of course. Thus you can

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Tue, Apr 26, 2011 at 8:32 AM, Stephen Frost sfr...@snowman.net wrote: Well, this specific thing could be done by just having PG close the client connection, not care that it's gone, and have an implied 'commit;' at the end.  I'm not saying

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Sim Zacks
On 04/26/2011 03:32 PM, Stephen Frost wrote: What I don't think we saw was any information about how, exactly, the OP was planning to implement this in the backend. Thanks, Stephen I'm at stage 1 of this proposal, meaning I know exactly what I want. I am checking with

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Sim Zacks
On 04/26/2011 04:22 PM, Stephen Frost wrote: * Robert Haas (robertmh...@gmail.com) wrote: On Tue, Apr 26, 2011 at 8:32 AM, Stephen Frostsfr...@snowman.net wrote: Well, this specific thing could be done by just having PG close the client connection, not care that it's gone, and have an

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread David Fetter
On Tue, Apr 26, 2011 at 04:17:48PM +0300, Sim Zacks wrote: On 04/26/2011 03:15 PM, Merlin Moncure wrote: On Tue, Apr 26, 2011 at 3:28 AM, Sim Zackss...@compulab.co.il wrote: Asynchronous functions *Problem* Postgresql does not have support for asynchronous function calls. Well, there is

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Robert Haas
On Tue, Apr 26, 2011 at 10:02 AM, David Fetter da...@fetter.org wrote: On Tue, Apr 26, 2011 at 04:17:48PM +0300, Sim Zacks wrote: On 04/26/2011 03:15 PM, Merlin Moncure wrote: On Tue, Apr 26, 2011 at 3:28 AM, Sim Zackss...@compulab.co.il  wrote: Asynchronous functions *Problem* Postgresql

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Merlin Moncure
On Tue, Apr 26, 2011 at 9:24 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Apr 26, 2011 at 10:02 AM, David Fetter da...@fetter.org wrote: On Tue, Apr 26, 2011 at 04:17:48PM +0300, Sim Zacks wrote: On 04/26/2011 03:15 PM, Merlin Moncure wrote: On Tue, Apr 26, 2011 at 3:28 AM, Sim

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Sim Zacks
On 04/26/2011 06:32 PM, Merlin Moncure wrote: On Tue, Apr 26, 2011 at 9:24 AM, Robert Haasrobertmh...@gmail.com wrote: On Tue, Apr 26, 2011 at 10:02 AM, David Fetterda...@fetter.org wrote: On Tue, Apr 26, 2011 at 04:17:48PM +0300, Sim Zacks wrote: On 04/26/2011 03:15 PM, Merlin Moncure

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Christopher Browne
On Tue, Apr 26, 2011 at 1:15 PM, Sim Zacks s...@compulab.co.il wrote: We have tried a similar approach, using plpythonu, by calling import pg and then creating a new connection to the database. This does give you an autonomous transaction, but not an asynchronous function. My use cases are

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Markus Wanner
Robert, On 04/26/2011 02:25 PM, Robert Haas wrote: We've talked about a number of features that could benefit from some kind of worker process facility (e.g. logical replication, parallel query). So far no one has stepped forward to build such a facility, and I think without that this can't

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Kevin Grittner
Markus Wanner mar...@bluegap.ch wrote: On 04/26/2011 02:25 PM, Robert Haas wrote: We've talked about a number of features that could benefit from some kind of worker process facility (e.g. logical replication, parallel query). So far no one has stepped forward to build such a facility, and I

Re: [HACKERS] Proposal - asynchronous functions

2011-04-26 Thread Robert Haas
On Apr 26, 2011, at 3:32 PM, Markus Wanner mar...@bluegap.ch wrote: Remember the bgworker patches extracted from Postgres-R? Oh, right. I should have remembered that. [ Interestingly enough, one of the complaints I heard back then (not necessarily from you) was that there's no user for