On 7/24/10 12:37 AM +0300, Alvaro Herrera wrote:
Excerpts from Marko Tiikkaja's message of vie jul 23 14:13:18 -0400 2010:
On 7/23/2010 8:52 PM, David Fetter wrote:
On Thu, Jul 22, 2010 at 08:43:35PM +0300, Marko Tiikkaja wrote:
Did I misunderstand the code?  And if I didn't, why do we do this
differently?

You mentioned in IRC that this was in aid of getting wCTEs going.  How
are these things connected?

Currently, I'm trying to make wCTEs behave a bit like RULEs do.  But if
every rewrite product takes a new snapshot, wCTEs will behave very
unpredictably.

I don't think it's fair game to change the behavior of multiple-output
rules at this point.  However, I also think that it's unwise to base
wCTEs on the behavior of rules -- rules are widely considered broken and
unusable for nontrivial cases.

I don't want to change the behaviour either, but we have two different behaviours right now. We need to change at least the other.

wCTEs are not going to be based on any of the broken behaviour of rules, that's for sure. What I meant is expanding a single query into multiple queries and running the executor separately for all of them.

Also, I think that having a moving snapshot for the different parts of a
wCTE is going to mean they're unpredictable.  For predictable usage
you'll be forcing the user to always wrap them in SERIALIZABLE
transactions.

That is *not* what has been discussed for wCTEs. A wCTE will only modify the CID of the snapshot in any isolation mode.

In short I think a wCTE should only advance the CID, not get a whole new
snapshot.

Agreed.


Regards,
Marko Tiikkaja


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to