On 2012-11-30 16:09:15 -0500, Tom Lane wrote:
> Claudio Freire <klaussfreire@gmail.com> writes:
> > Without hot standby feedback, reporting queries are impossible. I've
> > experienced it. Cancellations make it impossible to finish any
> > decently complex reporting query.
>
> The original expectation was that slave-side cancels would be
> infrequent. Maybe there's some fixing/tuning to be done there.
I've mostly seen snapshot conflicts. Its hard to say anything more
precise because we don't log any additional information (its admittedly
not easy).
I think it would already help a lot if
ResolveRecoveryConflictWithSnapshot would log:
* the relfilenode (already passed)
* the removed xid
* the pid of the backend holding the oldest snapshot
* the oldest xid of that backend
Most of that should be easy to get.
But I don't think we really can expect a very low rate of conflicts if
the primary has few longrunning transactions but the standby does.
Greetings,
Andres Freund
--Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services