Re: opportunistic tuple freezing

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: opportunistic tuple freezing
Date: 2009-08-17 03:01:22
Message-ID: 407d949e0908162001i54922aa0ud53a3df716c23f39@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Looking at the patch I didn't like that duplicated the page scan in a
second function without refactoring out the first scan. I think this
comes from the usual noncommiter-itus of trying to modify the existing
code as little as possible. At least that's the problem I've had which
led to things like this. Instead try to figure how you would have
written it if you were writing it from scratch.

If it's convenient to have a function to handle the scan then use it
for both scans. You could have a flag that indicates it should abort
after the first freeze. I think it would be simpler to have a return
value indicating the oldest transaction found and then just call it
again if that's old enough for the opportunistic threshold.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vanek 2009-08-17 03:27:56 Re: build error
Previous Message Greg Stark 2009-08-17 02:43:47 Re: opportunistic tuple freezing