Re: Static snapshot data - Mailing list pgsql-patches

From Tom Lane
Subject Re: Static snapshot data
Date
Msg-id 3848.1052536118@sss.pgh.pa.us
Whole thread Raw
In response to Static snapshot data  (Manfred Koizar <mkoi-pg@aon.at>)
Responses Re: Static snapshot data  (Manfred Koizar <mkoi-pg@aon.at>)
List pgsql-patches
Manfred Koizar <mkoi-pg@aon.at> writes:
> Up to now, SerializableSnapshot and QuerySnapshot are malloc'ed and
> free'd for every transaction or statement, respectively.  This patch
> puts these data structures into static memory, thus saving a few CPU
> cycles and two malloc calls per transaction or (in isolation level
> READ COMMITTED) per query.

I do not like this patch.  Two mallocs per transaction is an utterly
insignificant overhead.  And isn't the patch going in quite the wrong
direction for nested transactions?  The assumption that there's
never more than one QuerySnapshot seems to fly in the face of that...

            regards, tom lane


pgsql-patches by date:

Previous
From: Manfred Koizar
Date:
Subject: Static snapshot data
Next
From: Manfred Koizar
Date:
Subject: Re: Static snapshot data