Re: Temporary tables versus wraparound... again

From: Greg Stark <stark(at)mit(dot)edu>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: 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-04-05 03:04:04
Message-ID: CAM-w4HNYq1M5t+kQyZHvE7SYtxGUYP8oNoxuHehT85AcR3at+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

So here's an updated patch.

I had to add a public method to multixact.c to expose the locally
calculated OldestMultiXactId. It's possible we could use something
even tighter (like the current next mxid since we're about to commit)
but I didn't see a point in going further and it would have become
more complex.

I also added a branch in heapam_handler.c in ..._set_new_filenode() of
temporary tables. It feels like a free win and it's more consistent.

I'm not 100% on the tableam abstraction -- it's possible all of this
change should have happened in heapam_handler somewhere? I don't think
so but it does feel weird to be touching it and also doing the same
thing elsewhere.

I think this has addressed all the questions now.

Attachment Content-Type Size
v6-0001-Add-warnings-when-old-temporary-tables-are-found-.patch text/x-patch 9.0 KB
v6-0003-Add-test-for-truncating-temp-tables-advancing-rel.patch text/x-patch 6.1 KB
v6-0002-Update-relfrozenxmin-when-truncating-temp-tables.patch text/x-patch 7.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-04-05 03:05:06 Re: shared-memory based stats collector - v69
Previous Message Peter Smith 2022-04-05 02:47:04 Re: Handle infinite recursion in logical replication setup