@@ -1601,6 +1602,24 @@ BufferProcessRecoveryConflictsIfAny(volatile BufferDesc 
*bufHdr)
        {
                XLogRecPtr      bufLSN = BufferGetLSN(bufHdr);
+ /*
+                * If the buffer is recent we may need to cancel ourselves
+                * rather than risk returning a wrong answer. This test is
+                * too conservative, but it is correct.
+                *
+                * We only need to cancel the current subtransaction.
+                * Once we've handled the error then other subtransactions can
+                * continue processing. Note that we do *not* reset the
+                * BufferRecoveryConflictLSN at subcommit/abort, but we do
+                * reset it if we release our last remaining sbapshot.
+                * see SnapshotResetXmin()
+                *

Is it really enough to cancel just the current subtransaction? What if it's a serializable transaction?

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to