Re: Segfault in backend CTE code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Phil Sorber <phil(at)omniti(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Segfault in backend CTE code
Date: 2012-01-28 22:59:38
Message-ID: 5050.1327791578@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Phil Sorber <phil(at)omniti(dot)com> writes:
> On Wed, Jan 25, 2012 at 5:13 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I played around with removing the optimization, but there are other
> pieces further down the line that are upset but having a ModifyTable
> node in the execution tree.

Hm, yeah, obviously this scenario has never been tested :-(. I have
applied a patch for it, and also done some work so that it will get
tested by the buildfarm in future. Thanks for the report!

> We changed our writable CTE queries to update/insert loops so this is
> no longer a blocker for us.

FWIW, that technique didn't really work anyway, as even with the patch
I observe that you get a "duplicate unique key" failure if two such
commands try to insert a new row concurrently. This is because neither
UPDATE subquery will see an as-yet-uncommitted inserted row.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2012-01-29 00:47:43 Re: BUG #6412: psql & fe-connect truncate passwords
Previous Message Andy Grimm 2012-01-28 22:54:52 Re: BUG #6412: psql & fe-connect truncate passwords