On Thu, 2010-12-09 at 22:13 +0900, Fujii Masao wrote:
> When I created the conflict between recovery and many read-only
> transactions in the standby server for test purpose, I found that the
> keyword "waiting" disappeared from PS display for just a moment
> even though the conflict had not been resolved yet. This seems
> strange to me.
>
> This problem happens because ResolveRecoveryConflictWithVirtualXIDs
> resets PS display for each read-only transactions that recovery
> waits for. Why do we need to reset that each time even though
> the conflict has not been resolved yet? The attached patch
> suppresses such a needless reset. Comments?
The reset occurs at most each 500ms, so not much problem there.
But if it annoys you, it seems OK to change it. Don't see a reason to backpatch though?
> BTW, ResolveRecoveryConflictWithVirtualXIDs calls
> pgstat_report_waiting(), which is also needless since the startup
> process doesn't have the shared memory entry (i.e., MyBEEntry)
> for pg_stat_activity. The attached patch removes that call.
IIRC that wasn't added by me, so not sure why its there. Not harming anything either.
-- Simon Riggs http://www.2ndQuadrant.com/books/PostgreSQL Development, 24x7 Support, Training and Services