Re: Combine Prune and Freeze records emitted by vacuum - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Combine Prune and Freeze records emitted by vacuum
Date
Msg-id b08f8096-bf33-44ef-a0ee-4bd6ad2949ee@iki.fi
Whole thread Raw
In response to Re: Combine Prune and Freeze records emitted by vacuum  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Combine Prune and Freeze records emitted by vacuum
List pgsql-hackers
On 02/04/2024 16:11, Heikki Linnakangas wrote:
> On 01/04/2024 20:22, Melanie Plageman wrote:
>> Review for 0003-0006 (I didn't have any new thoughts on 0002). I know
>> you didn't modify them much/at all, but I noticed some things in my code
>> that could be better.
> 
> Ok, here's what I have now. I made a lot of small comment changes here
> and there, and some minor local refactorings, but nothing major. I lost
> track of all the individual changes I'm afraid, so I'm afraid you'll
> have to just diff against the previous version if you want to see what's
> changed. I hope I didn't break anything.
> 
> I'm pretty happy with this now. I will skim through it one more time
> later today or tomorrow, and commit. Please review once more if you have
> a chance.
> 
>> This probably doesn't belong here. I noticed spgdoinsert.c had a static
>> function for sorting OffsetNumbers, but I didn't see anything general
>> purpose anywhere else.
> 
> I copied the spgdoinsert.c implementation to vacuumlazy.c as is. Would
> be nice to have just one copy of this in some common place, but I also
> wasn't sure where to put it.

One more version, with two small fixes:

1. I fumbled the offsetnumber-cmp function at the last minute so that it 
didn't compile. Fixed. that

2. On VACUUM on an unlogged or temp table, the logic always thought that 
we would be generating an FPI, causing it to always freeze when it 
could. But of course, you never generate FPIs on an unlogged table. 
Fixed that. (Perhaps we should indeed freeze more aggressively on an 
unlogged table, but changing the heuristic is out of scope for this patch.)

Off-list, Melanie reported that there is a small regression with the 
benchmark script she posted yesterday, after all, but I'm not able to 
reproduce that.

-- 
Heikki Linnakangas
Neon (https://neon.tech)

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: remaining sql/json patches
Next
From: "David E. Wheeler"
Date:
Subject: Re: RFC: Additional Directory for Extensions