PG_RENAMECLUSTER(1)
β¨ NAME β¨
okay so bestie, meet pg_renamecluster β the little glow-up artist that renames a PostgreSQL cluster π
like, it gives your cluster a whole new name and everything follows along.
πΈ SYNOPSIS πΈ
pg_renamecluster version oldname newname
π¦ DESCRIPTION π¦
So here's the tea β pg_renamecluster changes the name of a PostgreSQL cluster β and by "name" we mean the name of the config directory living in /etc/postgresql/version/, plus the data directory over in /var/lib/postgresql/version/. Both of them get the rebrand. β¨
Existing log files in /var/log/postgresql/ get renamed too, because leaving them with the old name would be, like, so not the vibe. π
To pull this off, the cluster is stopped and started for the operation β no sneaky background renaming here, she does it properly.
And the following postgresql.conf config options get updated so they point at the new path names π«Ά:
data_directoryhba_fileident_fileexternal_pid_filestats_temp_directorycluster_name
π OPTIONS π
None.
(yeah, fr fr β not a single flag. she just does the thing. iconic behavior honestly π)
π SEE ALSO π
pg_createcluster(8)pg_dropcluster(8)pg_lsclusters(1)pg_wrapper(1)
π AUTHOR π
Christoph Berg <myon@debian.org>
okay that's the whole page bestie, mwah π this one came from the Debian PostgreSQL infrastructure crew, dated 2026-07-28 β go rename something slayfully, and remember: stop, rename, start, periodt. πβ¨
π¦ where this page comes from
- ubuntu stonking: postgresql-common 293ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms