Re: [PATCHES] Basic subtransaction facility

2004-04-29 Thread Alvaro Herrera
On Thu, Apr 29, 2004 at 06:42:31PM +0200, Manfred Koizar wrote: > On Wed, 28 Apr 2004 12:02:44 -0400, Alvaro Herrera > <[EMAIL PROTECTED]> wrote: > >In fact, I think we should mark ERROR as aborting the whole transaction > >tree, and create a new level which would abort the innermost > >subtransact

Re: [PATCHES] Basic subtransaction facility

2004-04-29 Thread Alvaro Herrera
On Thu, Apr 29, 2004 at 07:29:07PM +0200, Peter Eisentraut wrote: > Bruce Momjian wrote: > > I think his point was that there are some errors that should abort > > the outer transaction too. I think Alvaro mentioned out of memory, > > but that is a FATAL error. Alvaro, what error were you thinkin

Re: [PATCHES] Basic subtransaction facility

2004-04-29 Thread Alvaro Herrera
On Thu, Apr 29, 2004 at 02:42:23PM -0400, Tom Lane wrote: > In general I tend to agree with Manfred's point: if you have reason to > suspect global corruption of a backend's state then you should do FATAL > (or possibly PANIC). If you do not suspect this then you ought to just > ERROR. I do not

Re: [PATCHES] Basic subtransaction facility

2004-04-29 Thread Alvaro Herrera
On Thu, Apr 29, 2004 at 12:26:01AM -0400, Bruce Momjian wrote: > I don't understand your elog(ERROR) vs. ereport(ERROR) distinction. Was > that a typo? Nope. When Tom upgraded the error handling, he changed almost everything to ereport(), but in the places where there's a violation of expected

Re: [PATCHES] Basic subtransaction facility

2004-04-29 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Manfred Koizar wrote: >> Why? Subtransaction commit propagates an error state to the parent >> transaction. And if a subtransaction is rolled back the parent can >> continue cleanly no matter what was the reason for the subtrans abort. > I think his po

Re: [PATCHES] Basic subtransaction facility

2004-04-29 Thread Peter Eisentraut
Bruce Momjian wrote: > I think his point was that there are some errors that should abort > the outer transaction too. I think Alvaro mentioned out of memory, > but that is a FATAL error. Alvaro, what error were you thinking of > that should abort the outer transaction? Theoretically, if you abo

Re: [PATCHES] Basic subtransaction facility

2004-04-29 Thread Bruce Momjian
Manfred Koizar wrote: > On Wed, 28 Apr 2004 12:02:44 -0400, Alvaro Herrera > <[EMAIL PROTECTED]> wrote: > >In fact, I think we should mark ERROR as aborting the whole transaction > >tree, and create a new level which would abort the innermost > >subtransaction. We would then change whatever is app

Re: [PATCHES] Basic subtransaction facility

2004-04-29 Thread Manfred Koizar
On Wed, 28 Apr 2004 12:02:44 -0400, Alvaro Herrera <[EMAIL PROTECTED]> wrote: >In fact, I think we should mark ERROR as aborting the whole transaction >tree, and create a new level which would abort the innermost >subtransaction. We would then change whatever is appropiate to the new >elevel. Doi

Re: [PATCHES] Basic subtransaction facility

2004-04-28 Thread Bruce Momjian
Alvaro Herrera wrote: > On Mon, Apr 26, 2004 at 11:30:16PM -0400, Bruce Momjian wrote: > > > Alvaro, where are we on this patch. I think the suggestion was to > > throw FATAL rather than add a new error level. > > The assumption was that we would only want an additional level for > catching can

Re: [PATCHES] Basic subtransaction facility

2004-04-28 Thread Alvaro Herrera
On Mon, Apr 26, 2004 at 11:30:16PM -0400, Bruce Momjian wrote: > Alvaro, where are we on this patch. I think the suggestion was to > throw FATAL rather than add a new error level. The assumption was that we would only want an additional level for catching can't-happen conditions. ISTM this is

Re: [PATCHES] Basic subtransaction facility

2004-04-27 Thread Bruce Momjian
[ Tom will review.] Description from previous patch added to patched queue too. Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours. -

Re: [PATCHES] Basic subtransaction facility

2004-04-27 Thread Alvaro Herrera
On Mon, Apr 26, 2004 at 11:30:16PM -0400, Bruce Momjian wrote: > > Alvaro, where are we on this patch. I think the suggestion was to > throw FATAL rather than add a new error level. > > Is this ready to be applied? I forgot to verify if it worked correctly with #undef SUBTRANSACTIONS --- it di

Re: [PATCHES] Basic subtransaction facility

2004-04-27 Thread Alvaro Herrera
I wrote ten seconds ago: > This version does. This patch includes both patches I > posted and a few more changes, and does the following: I mean this one. -- Alvaro Herrera () "¿Qué importan los años? Lo que realmente importa es comprobar que a fin de cuentas la mejor edad de la vida es estar

Re: [PATCHES] Basic subtransaction facility

2004-04-26 Thread Bruce Momjian
Alvaro, where are we on this patch. I think the suggestion was to throw FATAL rather than add a new error level. Is this ready to be applied? --- Alvaro Herrera wrote: > On Mon, Apr 19, 2004 at 11:13:35AM -0400, Alvaro He

Re: [PATCHES] Basic subtransaction facility

2004-04-20 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > I'm thinking that I'll to add a new elog level to signal a can't-happen > condition within the transaction machinery, which would abort the whole > transaction tree (more than ERROR) but would not take the whole backend > down (less than FATAL). What sh

Re: [PATCHES] Basic subtransaction facility

2004-04-19 Thread Alvaro Herrera
On Mon, Apr 19, 2004 at 11:13:35AM -0400, Alvaro Herrera wrote: > I noticed that I sent an old version because of a system crash (the > *one* time I don't review vi -r differences it bites me ... argh). It > has several obvious mistakes. Please do not waste your time reviewing > that; I'll submi

Re: [PATCHES] Basic subtransaction facility

2004-04-19 Thread Bruce Momjian
Patch withdrawn by author. --- Alvaro Herrera wrote: > Hackers, > > Here is a very preliminar patch that allows the user to say "BEGIN" > inside a transaction and have the system react accordingly. This is > only a modific

Re: [PATCHES] Basic subtransaction facility

2004-04-19 Thread Alvaro Herrera
On Sun, Apr 18, 2004 at 11:29:05AM -0400, Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > If you want. When not #defined, the behavior is the same as the current > > code, so it shouldn't affect anything. However I posted mainly so > > people could comment on the modifications, a

Re: [PATCHES] Basic subtransaction facility

2004-04-18 Thread Bruce Momjian
Added to queue until Tom's review and/or application. Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours.

Re: [PATCHES] Basic subtransaction facility

2004-04-18 Thread Bruce Momjian
Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > If you want. When not #defined, the behavior is the same as the current > > code, so it shouldn't affect anything. However I posted mainly so > > people could comment on the modifications, and maybe Heikki Linnakangas > > could see

Re: [PATCHES] Basic subtransaction facility

2004-04-18 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > If you want. When not #defined, the behavior is the same as the current > code, so it shouldn't affect anything. However I posted mainly so > people could comment on the modifications, and maybe Heikki Linnakangas > could see how it affects his two pha

Re: [PATCHES] Basic subtransaction facility

2004-04-17 Thread Alvaro Herrera
On Sat, Apr 17, 2004 at 10:03:40AM -0400, Bruce Momjian wrote: > Do you want this applied? If you want. When not #defined, the behavior is the same as the current code, so it shouldn't affect anything. However I posted mainly so people could comment on the modifications, and maybe Heikki Linnak

Re: [PATCHES] Basic subtransaction facility

2004-04-17 Thread Bruce Momjian
Do you want this applied? --- Alvaro Herrera wrote: > Hackers, > > Here is a very preliminar patch that allows the user to say "BEGIN" > inside a transaction and have the system react accordingly. This is > only a modifica