Re: The enormous s->childXids problem

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gregory Stark <gsstark(at)mit(dot)edu>, Theo Schlossnagle <jesus(at)omniti(dot)com>
Subject: Re: The enormous s->childXids problem
Date: 2006-09-29 20:09:36
Message-ID: 200609291609.37118.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Saturday 16 September 2006 20:34, Tom Lane wrote:
> Gregory Stark <gsstark(at)mit(dot)edu> writes:
> > Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> >> The real question is why does the subtransaction actually assign itself
> >> an XID --- a simple RETURN NEXT operation ought not do that, AFAICS.
> >
> > I suspect the answer to that is the same as the answer to what's actually
> > creating the subtransaction. plperl_return_next doesn't. I think
> > something must be doing an actual SPI query, not just a return next.
>
> The other question on the table is why it didn't respond to QueryCancel
> in a reasonable amount of time. I'd really like to see a complete test
> case for this problem ...
>

I think the plperl was a red herring. Once dbi-link grabs a recordset, the
rows are looped over, processed, and then inserted (based on some
conditionals) into another table. Those inserts are wrapped in a
begin....exception block, which, since it is in a loop, I suspect is creating
the large number of childXids in cases where there are a large number of
inserts. I haven't tested that theory, but it seems logical, and should be
easy enough to reproduce with a simple LOOP ... END LOOP in plpgsql.

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2006-09-29 20:14:46 Re: Per-database search_path
Previous Message Josh Berkus 2006-09-29 20:06:09 Re: Per-database search_path