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

Re: Rewrite, normal execution vs. EXPLAIN ANALYZE

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Rewrite, normal execution vs. EXPLAIN ANALYZE
Date: 2010-07-23 21:44:21
Message-ID: 4C4A0D35.4020806@cs.helsinki.fi (view raw or flat)
Thread:
Lists: pgsql-hackers
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


In response to

Responses

pgsql-hackers by date

Next:From: Marko TiikkajaDate: 2010-07-23 21:48:25
Subject: Re: Rewrite, normal execution vs. EXPLAIN ANALYZE
Previous:From: Kevin GrittnerDate: 2010-07-23 21:42:21
Subject: Re: Rewrite, normal execution vs. EXPLAIN ANALYZE

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