Re: [HACKERS] TIME QUALIFICATION - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] TIME QUALIFICATION
Date
Msg-id 36C0EEBB.6849527B@krs.ru
Whole thread Raw
In response to Re: [HACKERS] TIME QUALIFICATION  (jwieck@debis.com (Jan Wieck))
Responses Re: [HACKERS] TIME QUALIFICATION
List pgsql-hackers
Jan Wieck wrote:
> 
> > And so for deffered rules rewrite system will:
> >
> > 1. set t2' RTE snapshot pointer to NULL - this will guarantee
> >    that snapshot of execution time (commit or set immediate time)
> >    will be used;
> > 2. set t1' RTE snapshot pointer to current QuerySnapshot
> >    (and increment its refcount).
> 
>     At parse/rewrite time there is no actual  snapshot.  And  for
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Oh, you're right. This is true for prepared plans.

>     SPI  prepared plan, the snapshot to use will be different for
>     each execution.  The RTE cannot hold the snapshot itself.  It
>     could  only tell, which of all the snapshots created during a
>     transaction to use for it.
> 
...
> 
>     Maybe  I'm  not  able  to  explain exactly enough what I have
>     vaguely in mind how it could work. But  after  you've  helped
>     not  to forget prepared plans I think I have all the odds and
>     ends to build it.
> 
>     I'll hack around a little.   Then  let's  discuss  the  final
>     details while having a prototype to look at.

Ok. If you feel that QueryIds is easier way to go then do it.
In any case some preprocessing of plan tree just before execution
will be required.
BTW, why not use CommandIds ?

Vadim


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: NEXTSTEP porting problems
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] Keywords