Re: BUG #5566: High levels of savepoint nesting trigger stack overflow in AssignTransactionId - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #5566: High levels of savepoint nesting trigger stack overflow in AssignTransactionId
Date
Msg-id 1279563717-sup-737@alvh.no-ip.org
Whole thread Raw
In response to Re: BUG #5566: High levels of savepoint nesting trigger stack overflow in AssignTransactionId  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
Excerpts from Andres Freund's message of lun jul 19 13:58:30 -0400 2010:
> Hi,
>
> On Monday 19 July 2010 19:57:13 Alvaro Herrera wrote:
> > Excerpts from Andres Freund's message of lun jul 19 11:58:06 -0400 2010:
> > > On Monday 19 July 2010 17:26:25 Hans van Kranenburg wrote:
> > > > When issuing an update statement in a transaction with ~30800 levels of
> > > > savepoint nesting, (which is insane, but possible), postgresql
> > > > segfaults due to a stack overflow in the AssignTransactionId function,
> > > > which recursively assign transaction ids to parent transactions.
> > >
> > > It seems easy enough to throw a check_stack_depth() in there - survives
> > > make check here.
> >
> > I wonder if it would work to deal with the problem non-recursively
> > instead.  We don't impose subxact depth restrictions elsewhere, why
> > start now?
> It looks trivial enough, but whats the point?

Avoid imposing unnecessary restrictions.

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #5566: High levels of savepoint nesting trigger stack overflow in AssignTransactionId
Next
From: Andres Freund
Date:
Subject: Re: BUG #5566: High levels of savepoint nesting trigger stack overflow in AssignTransactionId