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: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Rewrite, normal execution vs. EXPLAIN ANALYZE
Date: 2010-08-30 21:07:31
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

I looked at fixing this inconsistency by making all query list snapshot 
handling work like EXPLAIN ANALYZE's code does.  The only reason I went 
this way was that implementing wCTEs on top of this behaviour is a lot 

There were three places that needed fixing.  The SPI and portal logic 
changes were quite straightforward, but the SQL language function code 
previously didn't know what query trees of the execution_state list 
belonged to which query so there was no way to tell when we actually 
needed to take a new snapshot.  The approach I took was to change the 
representation of the SQL function cache to a list of execution_state 
lists, and grab a new snapshot between the lists.

The patch needs a bit more comments and some cleaning up, but I thought 
I'd get your input first.  Thoughts?

Marko Tiikkaja

Attachment: snapshot.patch
Description: text/plain (19.9 KB)

In response to


pgsql-hackers by date

Next:From: Marko TiikkajaDate: 2010-08-30 21:30:24
Subject: Re: Rewrite, normal execution vs. EXPLAIN ANALYZE
Previous:From: Pavel StehuleDate: 2010-08-30 19:41:50
Subject: Re: How to construct an exact plan

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