Re: Hot Standby (v9d)

Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>

From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2009-01-23T16:22:21Z
Lists: pgsql-hackers
> @@ -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