Re: Temporary tables versus wraparound... again

From: Greg Stark <stark(at)mit(dot)edu>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Noah Misch <noah(at)leadboat(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Temporary tables versus wraparound... again
Date: 2022-12-13 14:22:37
Message-ID: CAM-w4HMnqsTSXqMBc-xGpvjPPGG-rKvYBS2MybOP7Ft1MvWKbQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 7 Dec 2022 at 22:02, Greg Stark <stark(at)mit(dot)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 Content-Type Size
v8-0002-Update-relfrozenxmin-when-truncating-temp-tables.patch text/x-patch 7.0 KB
v8-0001-Add-warnings-when-old-temporary-tables-are-found-.patch text/x-patch 9.0 KB
v8-0003-Add-test-for-truncating-temp-tables-advancing-rel.patch text/x-patch 6.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2022-12-13 15:03:57 Re: refactor ExecGrant_*() functions
Previous Message Ronan Dunklau 2022-12-13 14:06:49 Re: Ordering behavior for aggregates