Re: pg_subtrans keeps bloating up in the standby - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: pg_subtrans keeps bloating up in the standby
Date
Msg-id AANLkTi=ZBMXmT=SkGEYHdn=zad7i74S=P0OCSz6jMngG@mail.gmail.com
Whole thread Raw
In response to Re: pg_subtrans keeps bloating up in the standby  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Mon, Aug 30, 2010 at 6:18 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On Mon, 2010-08-30 at 09:59 +0300, Heikki Linnakangas wrote:
>
>> However, is it safe to use GetOldestXMin() during recovery? Or to put it
>> other way, is GetOldestXMin() functioning correctly during hot standby?
>> It only scans through the ProcArray, but not the known-assigned xids
>> array. That seems like an oversight that needs to be fixed.
>
> Patch to implement that attached.

The type of the value which KnownAssignedXidsGetOldestXmin returns should
be TransactionId rather than int?

Does caller of KnownAssignedXidsGetOldestXmin need to hold ProcArrayLock
in (at least) shared mode? If yes, it's helpful to add that note as a comment.

> Will then commit Fujii's patch.

Thanks.

Regards,

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


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: register/unregister standby Re: Synchronous replication
Next
From: Greg Stark
Date:
Subject: Re: cost_hashjoin