Re: [HACKERS] Portals and nested transactions

2004-07-14 Thread Zeugswetter Andreas SB SD
My answers: Q1: Should Portals successfully created within the failed subxact be closed? Or should they remain open? no for protocol level I can understand a yes to this one for sql level, because it will be hard to clean up by hand :-( But I like the analogy to hold cursors, so I would

Re: [HACKERS] Portals and nested transactions

2004-07-14 Thread Alvaro Herrera
On Tue, Jul 13, 2004 at 04:57:06PM -0400, Tom Lane wrote: I've been thinking about what to do with cursors in subtransactions. The problem really includes both cursors (created with DECLARE CURSOR) and portals (created with the V3-protocol Bind message) since they are the same kind of animal

Re: [HACKERS] Portals and nested transactions

2004-07-14 Thread Josh Berkus
Tom, As much as I can understand the arguments -- many of them performance-oriented -- for handling Portals non-transactionally, I simply don't see how we can do it and not create huge problems for anyone who uses both cursors and NTs together ... as those who use either are liable to do.

Re: [HACKERS] Portals and nested transactions

2004-07-14 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: On Tue, Jul 13, 2004 at 04:57:06PM -0400, Tom Lane wrote: I've been thinking about what to do with cursors in subtransactions. So within this proposal, a query executed by normal means will get its resources saved in the transaction ResourceOwner? No,

Re: [HACKERS] Portals and nested transactions

2004-07-14 Thread Mike Rylander
Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: On Tue, Jul 13, 2004 at 04:57:06PM -0400, Tom Lane wrote: I've been thinking about what to do with cursors in subtransactions. So within this proposal, a query executed by normal means will get its resources saved in the transaction

Re: [HACKERS] Portals and nested transactions

2004-07-14 Thread Mike Rylander
Mike Rylander wrote: Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: On Tue, Jul 13, 2004 at 04:57:06PM -0400, Tom Lane wrote: I've been thinking about what to do with cursors in subtransactions. So within this proposal, a query executed by normal means will get its resources

Re: [HACKERS] Portals and nested transactions

2004-07-14 Thread Oliver Jowett
Josh Berkus wrote: Tom, As much as I can understand the arguments -- many of them performance-oriented -- for handling Portals non-transactionally, I simply don't see how we can do it and not create huge problems for anyone who uses both cursors and NTs together ... as those who use either are

Re: [HACKERS] Portals and nested transactions

2004-07-14 Thread Oliver Jowett
Alvaro Herrera wrote: On the other hand, some people supported the idea that v3 Bind portals should behave nontransactionally, while DECLARE portals should behave transactionally. Maybe we could make that a property of the portal, or even a user-selectable property (where we would define a

Re: [HACKERS] Portals and nested transactions

2004-07-14 Thread Alvaro Herrera
On Wed, Jul 14, 2004 at 03:11:54PM -0400, Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: On Tue, Jul 13, 2004 at 04:57:06PM -0400, Tom Lane wrote: I've been thinking about what to do with cursors in subtransactions. So within this proposal, a query executed by normal means will

Re: [HACKERS] Portals and nested transactions

2004-07-14 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Do you want me to do the legwork for this to happen, or was your initial plan to do it yourself? Either way is OK with me ... I'm working on it, should have it done in a day or so. regards, tom lane

[HACKERS] Portals and nested transactions

2004-07-13 Thread Tom Lane
I've been thinking about what to do with cursors in subtransactions. The problem really includes both cursors (created with DECLARE CURSOR) and portals (created with the V3-protocol Bind message) since they are the same kind of animal internally, namely a Portal. In previous discussion I think