Re: Static snapshot data

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Static snapshot data
Date: 2003-05-12 06:53:02
Message-ID: aafubv0p0crua74qcv02m642k9diefb10j@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Fri, 09 May 2003 23:08:38 -0400, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-05-12 10:04:44 Re: SET CONSTRAINTS not schema-aware
Previous Message Sailesh Krishnamurthy 2003-05-12 06:08:24 Re: compliling postgresql

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-05-12 13:40:37 Re: Static snapshot data
Previous Message alex avriette 2003-05-12 02:55:46 patch src/bin/psql/help.c