pgsql: Introduce the REPACK command - Mailing list pgsql-committers

From Álvaro Herrera
Subject pgsql: Introduce the REPACK command
Date
Msg-id E1w02Gv-003Lnl-1j@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Introduce the REPACK command

REPACK absorbs the functionality of VACUUM FULL and CLUSTER in a single
command.  Because this functionality is completely different from
regular VACUUM, having it separate from VACUUM makes it easier for users
to understand; as for CLUSTER, the term is heavily overloaded in the
IT world and even in Postgres itself, so it's good that we can avoid it.

We retain those older commands, but de-emphasize them in the
documentation, in favor of REPACK; the difference between VACUUM FULL
and CLUSTER (namely, the fact that tuples are written in a specific
ordering) is neatly absorbed as two different modes of REPACK.

This allows us to introduce further functionality in the future that
works regardless of whether an ordering is being applied, such as (and
especially) a concurrent mode.

Author: Antonin Houska <ah@cybertec.at>
Reviewed-by: Mihail Nikalayeu <mihailnikalayeu@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Robert Treat <rob@xzilla.net>
Reviewed-by: Euler Taveira <euler@eulerto.com>
Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
Reviewed-by: jian he <jian.universality@gmail.com>
Discussion: https://postgr.es/m/82651.1720540558@antos
Discussion: https://postgr.es/m/202507262156.sb455angijk6@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ac58465e0618941842439eb3f5a2cf8bebd5a3f1

Modified Files
--------------
doc/src/sgml/monitoring.sgml             | 226 +++++++-
doc/src/sgml/ref/allfiles.sgml           |   1 +
doc/src/sgml/ref/cluster.sgml            |  99 +---
doc/src/sgml/ref/repack.sgml             | 330 ++++++++++++
doc/src/sgml/ref/vacuum.sgml             |  33 +-
doc/src/sgml/reference.sgml              |   1 +
src/backend/access/heap/heapam_handler.c |  32 +-
src/backend/catalog/index.c              |   2 +-
src/backend/catalog/system_views.sql     |  29 +-
src/backend/commands/cluster.c           | 889 ++++++++++++++++++++-----------
src/backend/commands/vacuum.c            |   6 +-
src/backend/parser/gram.y                |  86 ++-
src/backend/tcop/utility.c               |  29 +-
src/backend/utils/adt/pgstatfuncs.c      |   4 +-
src/bin/psql/tab-complete.in.c           |  43 +-
src/include/catalog/catversion.h         |   2 +-
src/include/commands/cluster.h           |   8 +-
src/include/commands/progress.h          |  50 +-
src/include/nodes/parsenodes.h           |  35 +-
src/include/parser/kwlist.h              |   1 +
src/include/tcop/cmdtaglist.h            |   1 +
src/include/utils/backend_progress.h     |   2 +-
src/test/regress/expected/cluster.out    | 137 ++++-
src/test/regress/expected/rules.out      |  72 ++-
src/test/regress/sql/cluster.sql         |  72 ++-
src/tools/pgindent/typedefs.list         |   2 +
26 files changed, 1650 insertions(+), 542 deletions(-)


pgsql-committers by date:

Previous
From: Masahiko Sawada
Date:
Subject: pgsql: Fix grammar in short description of effective_wal_level.
Next
From: Melanie Plageman
Date:
Subject: pgsql: Use the newest to-be-frozen xid as the conflict horizon for free