Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-09-10 Thread Tatsuo Ishii
> On Sat, Jan 26, 2013 at 09:25:56AM +0900, Tatsuo Ishii wrote: >> Sorry for confusion. >> >> I knew an unamed portal only lasts until current transaction ends. I >> was confused in the case when no explicit transaction is used. >> >> At completion of each series of extended-query messages, th

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-09-10 Thread Amit Kapila
On Wed, Sep 11, 2013 at 2:06 AM, Bruce Momjian wrote: > On Sat, Jan 26, 2013 at 09:25:56AM +0900, Tatsuo Ishii wrote: >> Sorry for confusion. >> >> I knew an unamed portal only lasts until current transaction ends. I >> was confused in the case when no explicit transaction is used. >> >> At com

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-09-10 Thread David Johnston
Continuing my "novice interpretation" from before... Tatsuo Ishii-4 wrote > It would be nice if something like "unnamed portal will be destroyed > by a Sync message if you are in an explicit transaction" is in our > manual. I do not believe this to be true from what I've scanned. Inside an "imp

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-09-10 Thread David Johnston
Tatsuo Ishii-4 wrote > > From these statements, I would think #4 will fail in the following > sequence of commands because #3 closes transaction and it destroys > unnamed portal: 1)Parse/Bind creates unnamed portal, > 2)Parse/Bind/Execute creates named portal and executes, 3)Send Sync > message (b

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-09-10 Thread Bruce Momjian
On Sat, Jan 26, 2013 at 09:25:56AM +0900, Tatsuo Ishii wrote: > Sorry for confusion. > > I knew an unamed portal only lasts until current transaction ends. I > was confused in the case when no explicit transaction is used. > > At completion of each series of extended-query messages, the > fr

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-01-25 Thread Tatsuo Ishii
> On Fri, Jan 25, 2013 at 03:24:27PM -0500, Robert Haas wrote: >> On Fri, Jan 25, 2013 at 2:33 PM, Bruce Momjian wrote: >> > On Fri, Jan 25, 2013 at 02:02:39PM -0500, Robert Haas wrote: >> >> On Fri, Jan 25, 2013 at 1:28 PM, Bruce Momjian wrote: >> >> > On Mon, Oct 1, 2012 at 02:04:00PM +0900, T

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-01-25 Thread Bruce Momjian
On Fri, Jan 25, 2013 at 03:29:17PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > Oops, thanks. Here is the right paragraph, same issue: > > > If successfully created, a named portal object lasts till the end of the > > current transaction, unless explicitly destroyed. An unnamed po

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-01-25 Thread Tom Lane
Bruce Momjian writes: > Oops, thanks. Here is the right paragraph, same issue: > If successfully created, a named portal object lasts till the end of the > current transaction, unless explicitly destroyed. An unnamed portal is > destroyed at the end of the transaction, or as soon as

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-01-25 Thread Bruce Momjian
On Fri, Jan 25, 2013 at 03:24:27PM -0500, Robert Haas wrote: > On Fri, Jan 25, 2013 at 2:33 PM, Bruce Momjian wrote: > > On Fri, Jan 25, 2013 at 02:02:39PM -0500, Robert Haas wrote: > >> On Fri, Jan 25, 2013 at 1:28 PM, Bruce Momjian wrote: > >> > On Mon, Oct 1, 2012 at 02:04:00PM +0900, Tatsuo

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-01-25 Thread Robert Haas
On Fri, Jan 25, 2013 at 2:33 PM, Bruce Momjian wrote: > On Fri, Jan 25, 2013 at 02:02:39PM -0500, Robert Haas wrote: >> On Fri, Jan 25, 2013 at 1:28 PM, Bruce Momjian wrote: >> > On Mon, Oct 1, 2012 at 02:04:00PM +0900, Tatsuo Ishii wrote: >> >> > Tatsuo Ishii writes: >> >> >> From the manual:

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-01-25 Thread Bruce Momjian
On Fri, Jan 25, 2013 at 02:02:39PM -0500, Robert Haas wrote: > On Fri, Jan 25, 2013 at 1:28 PM, Bruce Momjian wrote: > > On Mon, Oct 1, 2012 at 02:04:00PM +0900, Tatsuo Ishii wrote: > >> > Tatsuo Ishii writes: > >> >> From the manual: > >> >> "An unnamed portal is destroyed at the end of the tra

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-01-25 Thread Robert Haas
On Fri, Jan 25, 2013 at 1:28 PM, Bruce Momjian wrote: > On Mon, Oct 1, 2012 at 02:04:00PM +0900, Tatsuo Ishii wrote: >> > Tatsuo Ishii writes: >> >> From the manual: >> >> "An unnamed portal is destroyed at the end of the transaction" >> > >> > Actually, all portals are destroyed at end of trans

Re: [HACKERS] Question regarding Sync message and unnamed portal

2013-01-25 Thread Bruce Momjian
On Mon, Oct 1, 2012 at 02:04:00PM +0900, Tatsuo Ishii wrote: > > Tatsuo Ishii writes: > >> From the manual: > >> "An unnamed portal is destroyed at the end of the transaction" > > > > Actually, all portals are destroyed at end of transaction (unless > > they're from holdable cursors). Named or

Re: [HACKERS] Question regarding Sync message and unnamed portal

2012-10-01 Thread Tom Lane
Tatsuo Ishii writes: >> The right thing to use if you're trying to interleave portal executions >> like that is Flush, not Sync. Sync mainly adds a protocol >> resynchronization point --- it's needed in case portal execution fails >> partway through. (In which case you'll have lost both portals

Re: [HACKERS] Question regarding Sync message and unnamed portal

2012-09-30 Thread Tatsuo Ishii
> Tatsuo Ishii writes: >> From the manual: >> "An unnamed portal is destroyed at the end of the transaction" > > Actually, all portals are destroyed at end of transaction (unless > they're from holdable cursors). Named or not doesn't enter into it. We need to fix the document then. >> From the

Re: [HACKERS] Question regarding Sync message and unnamed portal

2012-09-30 Thread Tom Lane
Tatsuo Ishii writes: > From the manual: > "An unnamed portal is destroyed at the end of the transaction" Actually, all portals are destroyed at end of transaction (unless they're from holdable cursors). Named or not doesn't enter into it. > From these statements, I would think #4 will fail in t

[HACKERS] Question regarding Sync message and unnamed portal

2012-09-30 Thread Tatsuo Ishii
>From the manual: "An unnamed portal is destroyed at the end of the transaction" "At completion of each series of extended-query messages, the frontend should issue a Sync message. This parameterless message causes the backend to close the current transaction if it's not inside a BEGIN/COMMIT tra