Re: [HACKERS] pg_subtrans keeps bloating up in the standby

2010-08-30 Thread Heikki Linnakangas
On 27/08/10 20:17, Fujii Masao wrote: Yes. StartupXLOG calls that before bgwriter is invoked. That is, we can ensure that StartupSUBTRANS has always been done before bgwriter performs a restartpoint. Hmm, the comment in CreateCheckpoint() isn't totally accurate either: * Truncate

Re: [HACKERS] pg_subtrans keeps bloating up in the standby

2010-08-30 Thread Simon Riggs
On Mon, 2010-08-30 at 09:59 +0300, Heikki Linnakangas wrote: On 27/08/10 20:17, Fujii Masao wrote: Yes. StartupXLOG calls that before bgwriter is invoked. That is, we can ensure that StartupSUBTRANS has always been done before bgwriter performs a restartpoint. Hmm, the comment in

Re: [HACKERS] pg_subtrans keeps bloating up in the standby

2010-08-30 Thread Simon Riggs
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

Re: [HACKERS] pg_subtrans keeps bloating up in the standby

2010-08-30 Thread Fujii Masao
On Mon, Aug 30, 2010 at 6:18 PM, Simon Riggs si...@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

[HACKERS] pg_subtrans keeps bloating up in the standby

2010-08-27 Thread Fujii Masao
Hi, I received the off-list email reporting that pg_subtrans keeps bloating up in the standby, from Harald (Thanks!). I investigated this issue and found that the standby doesn't truncate pg_subtrans at all even though HS keeps extending it. In the master, a checkpoint calls TruncateSUBTRANS()

Re: [HACKERS] pg_subtrans keeps bloating up in the standby

2010-08-27 Thread Heikki Linnakangas
On 27/08/10 16:39, Fujii Masao wrote: I received the off-list email reporting that pg_subtrans keeps bloating up in the standby, from Harald (Thanks!). I investigated this issue and found that the standby doesn't truncate pg_subtrans at all even though HS keeps extending it. In the master, a

Re: [HACKERS] pg_subtrans keeps bloating up in the standby

2010-08-27 Thread Fujii Masao
On Fri, Aug 27, 2010 at 11:25 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Hmm, agreed, seems like an oversight in hot standby. Before that, we didn't update pg_subtrans during recovery, so there was no point truncating it. But in hot standby, we do update it, so we need to

Re: [HACKERS] pg_subtrans keeps bloating up in the standby

2010-08-27 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: On Fri, Aug 27, 2010 at 11:25 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Hmm, agreed, seems like an oversight in hot standby. Before that, we didn't update pg_subtrans during recovery, so there was no point truncating it. But in

Re: [HACKERS] pg_subtrans keeps bloating up in the standby

2010-08-27 Thread Fujii Masao
On Sat, Aug 28, 2010 at 2:08 AM, Tom Lane t...@sss.pgh.pa.us wrote: Fujii Masao masao.fu...@gmail.com writes: On Fri, Aug 27, 2010 at 11:25 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Hmm, agreed, seems like an oversight in hot standby. Before that, we didn't update

Re: [HACKERS] pg_subtrans keeps bloating up in the standby

2010-08-27 Thread Josh Berkus
On 8/27/10 10:17 AM, Fujii Masao wrote: On Sat, Aug 28, 2010 at 2:08 AM, Tom Lane t...@sss.pgh.pa.us wrote: Fujii Masao masao.fu...@gmail.com writes: On Fri, Aug 27, 2010 at 11:25 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Hmm, agreed, seems like an oversight in hot

Re: [HACKERS] pg_subtrans keeps bloating up in the standby

2010-08-27 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: Should we hold off on RC1 for this issue? rc1 was already wrapped yesterday. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: