Re: Static snapshot data - Mailing list pgsql-patches

From Manfred Koizar
Subject Re: Static snapshot data
Date
Msg-id aafubv0p0crua74qcv02m642k9diefb10j@4ax.com
Whole thread Raw
In response to Re: Static snapshot data  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Static snapshot data  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Fri, 09 May 2003 23:08:38 -0400, Tom Lane <tgl@sss.pgh.pa.us>
wrote:
>I do not like this patch.

That's not a surprise, but ...

>Two mallocs per transaction is an utterly insignificant overhead.

2002-05-25 you said: "a cycle saved is a cycle earned."

More importantly the patch makes it clearer that there is always at
most one instance of SerializableSnapshotData and [current]
QuerySnapshotData.

>And isn't the patch going in quite the wrong
>direction for nested transactions?

Our (Alvaro's and my) current understanding is that snapshots are not
influenced by nested transactions.

ad SerializableSnapshot:  A subtransaction operates in the context of
the main transaction.  We do not want to see different snapshots at
different nesting levels.

>  The assumption that there's
>never more than one QuerySnapshot seems to fly in the face of that...

ad QuerySnapshot:  If there is a need for a query snapshot stack, then
it is not because of nested transactions but due to queries invoking
functions containing queries ...  This is currently handled by
CopyQuerySnapshot(), AFAIK.

Servus
 Manfred


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Static snapshot data
Next
From: Tom Lane
Date:
Subject: Re: Static snapshot data