REPACK and naming - Mailing list pgsql-hackers

From David G. Johnston
Subject REPACK and naming
Date
Msg-id CAKFQuwYbZ2c7viape0B+TAoa_t8WteNfu+RF8+3i=D1ZQZQFAg@mail.gmail.com
Whole thread Raw
In response to Re: REPACK and naming  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: REPACK and naming
List pgsql-hackers
On Wednesday, September 17, 2025, David Rowley <dgrowleyml@gmail.com> wrote:
On Thu, 18 Sept 2025 at 01:09, Robert Haas <robertmhaas@gmail.com> wrote:
> RETABLE just isn't a word. The code sometimes calls this a REWRITE of
> a table, which would be reasonable.

+1. I was reading this yesterday wondering why "REWRITE" didn't get a
mention.

Agreed.
 

The problem I have with REPACK is that "re" indicates that
something is being re-done that's been done before. If you're calling
REPACK for the first time on a table, that's not true.

As soon as you’ve written the first tuple you’ve begun “packing” the table - repack then is simply unpacking it and putting back the stuff you want to keep in possibly a structured way.

David J's "REBUILD" also seems ok.  In a green field, you could then
have "REBUILD TABLE ..." and "REBUILD INDEX ..."

Rebuild has some prior art apparently, which makes it appealing.  But I’m not a fan of the “shrink” usage the other products seem drawn to.

David J.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: New string-truncation warnings from GCC 15
Next
From: Bruce Momjian
Date:
Subject: Re: REPACK and naming