On Wed, Jan 15, 2014 at 8:23 PM, Peter Geoghegan <[email protected]> wrote:
> I have an idea of what I could do to fix this, but I don't have time
> to make sure that my hunch is correct.
It might just be a matter of:
@@ -186,6 +186,13 @@ ExecLockHeapTupleForUpdateSpec(EState *estate,
switch (test)
{
case HeapTupleInvisible:
+ /*
+ * Tuple may have originated from this command, in
which case it's
+ * already locked
+ */
+ if
(TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetRawXmin(tuple.t_data))
&&
+ HeapTupleHeaderGetCmin(tuple.t_data) ==
estate->es_output_cid)
+ return true;
/* Tuple became invisible; try again */
if (IsolationUsesXactSnapshot())
ereport(ERROR,
--
Peter Geoghegan
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers