Re: Temporary tables versus wraparound... again - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Temporary tables versus wraparound... again
Date
Msg-id CAM-w4HMnqsTSXqMBc-xGpvjPPGG-rKvYBS2MybOP7Ft1MvWKbQ@mail.gmail.com
Whole thread Raw
In response to Re: Temporary tables versus wraparound... again  (Greg Stark <stark@mit.edu>)
Responses Re: Temporary tables versus wraparound... again  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On Wed, 7 Dec 2022 at 22:02, Greg Stark <stark@mit.edu> wrote:
> > Seems like this should just be in
> > heapam_relation_nontransactional_truncate()?

So here I've done it that way. It is a bit of an unfortunate layering
since it means the heapam_handler is doing the catalog change but it
does seem inconvenient to pass relfrozenxid etc back up and have the
caller make the changes when there are no other changes to make.

Also, I'm not sure what changed but maybe there was some other commits
in vacuum.c in the meantime. I remember being frustrated previously
trying to reuse that code but now it works fine. So I was able to
reduce the copy-pasted code significantly.

(The tests are probably not worth committing, they're just here for my
own testing to be sure it's doing anything)

-- 
greg

Attachment

pgsql-hackers by date:

Previous
From: Ronan Dunklau
Date:
Subject: Re: Ordering behavior for aggregates
Next
From: Antonin Houska
Date:
Subject: Re: refactor ExecGrant_*() functions