Re: Recalculating OldestXmin in a long-running vacuum - Mailing list pgsql-patches

From Heikki Linnakangas
Subject Re: Recalculating OldestXmin in a long-running vacuum
Date
Msg-id 45AD17AE.5050603@enterprisedb.com
Whole thread Raw
In response to Re: Recalculating OldestXmin in a long-running vacuum  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Recalculating OldestXmin in a long-running vacuum
List pgsql-patches
Tom Lane wrote:
> Heikki Linnakangas <heikki@enterprisedb.com> writes:
>> 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.
>
> Doesn't this break relfrozenxid maintenance?

Not AFAICS. relfrozenxid is nowadays updated with FreezeLimit.

> In any case I'd like to
> see some evidence of significant real-world benefit before adding such
> a conceptual wart ...

I've asked our testers to do a TPC-C run with and without the
patch. I'm not expecting it to make a huge difference there, but if
you're using a big cost delay, it could make quite a difference for such
a simple thing.

> The procarray.c change scares me as well; I'm pretty sure the original
> coding was intentional.

Well, it didn't make much difference before, since OldestXmin was always
calculated early in the transaction.

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


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Recalculating OldestXmin in a long-running vacuum
Next
From: Neil Conway
Date:
Subject: Re: TODO improvements