Re: Writeable CTEs and empty relations

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Writeable CTEs and empty relations
Date: 2010-02-09 22:49:07
Message-ID: 4B71E663.1020200@cs.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

Regards,
Marko Tiikkaja

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2010-02-09 23:01:14 Re: Listen / Notify - what to do when the queue is full
Previous Message Robert Haas 2010-02-09 22:42:45 Re: Some belated patch review for "Buffers" explain analyze patch