Re: Hot Standby Feedback should default to on in 9.3+ - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Hot Standby Feedback should default to on in 9.3+
Date
Msg-id 20121201002545.GE27243@awork2.anarazel.de
Whole thread Raw
In response to Re: Hot Standby Feedback should default to on in 9.3+  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Hot Standby Feedback should default to on in 9.3+
Next
From: Bruce Momjian
Date:
Subject: Re: Use of fsync; was Re: Pg_upgrade speed for many tables