Re: pg_subtrans keeps bloating up in the standby

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, "Kolb, Harald (NSN - DE/Munich)" <harald(dot)kolb(at)nsn(dot)com>
Subject: Re: pg_subtrans keeps bloating up in the standby
Date: 2010-08-30 09:18:49
Message-ID: 1283159929.1800.1843.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

This is necessary since CreateCheckpoint is called during end of
recovery, though at that point there are still xids in KnownAssignedXids
since they aren't removed until slightly later. Not hugely important.

Also allows GetOldestXmin to be safely called elsewhere, such as Fujii's
earlier patch on this thread.

Any objections to commit to both head and 9.0?

Will then commit Fujii's patch.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Training and Services

Attachment Content-Type Size
kagetoldestxmin.patch text/x-patch 1.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-08-30 09:18:53 Re: Exposing the Xact commit order to the user
Previous Message Markus Wanner 2010-08-30 09:06:02 Re: bg worker: patch 1 of 6 - permanent process