Skip site navigation (1) Skip section navigation (2)

Re: Writeable CTEs and empty relations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Writeable CTEs and empty relations
Date: 2010-02-10 00:19:56
Message-ID: 1328.1265761196@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi> writes:
> On 2010-02-08 21:30 +0200, I wrote:
>> This doesn't exactly work anymore since we modify the snapshot after
>> calling ExecInitScan().  I'm not really familiar with this part of the
>> code, so I'm asking: is there a simple enough way around this?  Would
>> updating scan->rs_nblocks before scanning the first tuple be OK?

> I've looked at this some more, and the problem is a lot bigger than I
> originally thought.  We'd basically be forced to do another initscan()
> before starting a new scan after the snapshot changed.  One way to
> accomplish this would be that ExecutePlan() would leave a flag in EState
> whenever the scan nodes need to reinit.

> Does this sound completely unacceptable?

You still haven't explained why it's a good idea to change the snapshot
after the executor has started.  Right at the moment I'm prepared to
reject the patch on that ground alone.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Marko TiikkajaDate: 2010-02-10 00:25:19
Subject: Re: Writeable CTEs and empty relations
Previous:From: Robert HaasDate: 2010-02-10 00:18:42
Subject: Re: Some belated patch review for "Buffers" explain analyze patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group