PS display and standby query conflict - Mailing list pgsql-hackers

From Fujii Masao
Subject PS display and standby query conflict
Date
Msg-id AANLkTino4ZO9avx52igCNOuGJbCt9LOYNoKYeN8T0Et2@mail.gmail.com
Whole thread Raw
Responses Re: PS display and standby query conflict  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Hi,

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?

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.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [PERFORM] Slow BLOBs restoring
Next
From: Jie Li
Date:
Subject: Why percent_rank is so slower than rank?