Recalculating OldestXmin in a long-running vacuum

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Recalculating OldestXmin in a long-running vacuum
Date: 2007-01-16 11:12:57
Message-ID: 45ACB339.2050105@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hi,

It seems to me that we could easily reclaim a bit more dead tuples in a
vacuum by recalculating the OldestXmin every now and then. In a large
table with a constant stream of updates/deletes and concurrent vacuums,
this could make a big difference.

With the attached patch, OldestXmin is recalculated in a vacuum every
100 pages. That's a quite arbitrary number, but feels like a good one to me.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

Attachment Content-Type Size
vacuum_oldestxmin_refresh_v1.patch text/x-patch 2.6 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Dave Page 2007-01-16 11:32:09 pg_dumpall -f <filename> option
Previous Message Gurjeet Singh 2007-01-16 11:03:52 Re: [PATCHES] [HACKERS] [Fwd: Index Advisor]