Re: Hot Standby (v9d) - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Hot Standby (v9d)
Date
Msg-id 4979EEBD.5060108@enterprisedb.com
Whole thread Raw
In response to Re: Hot Standby (v9d)  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Hot Standby (v9d)  (Simon Riggs <simon@2ndQuadrant.com>)
List 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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: autovacuum and reloptions
Next
From: Hannu Krosing
Date:
Subject: Re: Controlling hot standby