From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Dan Ports <drkp(at)csail(dot)mit(dot)edu> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | SSI implementation question |
Date: | 2011-10-19 16:56:58 |
Message-ID: | 18430.1319043418@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Is it really necessary for GetSerializableTransactionSnapshotInt to
acquire an empty SERIALIZABLEXACT before it acquires a snapshot?
If so, why? The proposed synchronized-snapshots feature will mean
that the allegedly-new snapshot actually was taken some time before,
so it seems to me that either this is not necessary or we cannot use
a synchronized snapshot in a serializable xact.
In the same vein, why is it necessary to be holding
SerializableXactHashLock (exclusively, yet) while acquiring the
snapshot? That seems rather bad from a concurrency standpoint, and
again it's going to be pretty meaningless if we're just installing a
pre-existing snapshot.
The reason these things came to mind is that I want to refactor the code
so that the SSI-specific work in GetSerializableTransactionSnapshotInt
is done by a function that is handed an already-taken snapshot, because
I cannot stomach what Joachim did to the APIs of GetSnapshotData and
allied functions. But refactor or no refactor, it seems like installing
a pre-existing snapshot may be breaking some assumptions here.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-10-19 17:02:34 | Re: synchronized snapshots |
Previous Message | Florian Pflug | 2011-10-19 16:44:08 | Re: synchronized snapshots |