Re: PS display and standby query conflict

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PS display and standby query conflict
Date: 2010-12-11 14:28:22
Message-ID: 1292077702.15918.68.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-12-11 14:37:06 Re: libpq changes for synchronous replication
Previous Message Florian Pflug 2010-12-11 14:17:44 Re: proposal: auxiliary functions for record type