REPACK and naming

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>, Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: REPACK and naming
Date: 2025-09-17 21:03:01
Message-ID: CAKFQuwYbZ2c7viape0B+TAoa_t8WteNfu+RF8+3i=D1ZQZQFAg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, September 17, 2025, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:

> On Thu, 18 Sept 2025 at 01:09, Robert Haas <robertmhaas(at)gmail(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2025-09-17 21:05:38 Re: REPACK and naming
Previous Message Tom Lane 2025-09-17 21:00:42 Re: New string-truncation warnings from GCC 15