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