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_directory
  • hba_file
  • ident_file
  • external_pid_file
  • stats_temp_directory
  • cluster_name

πŸ’– OPTIONS πŸ’–

None.

(yeah, fr fr β€” not a single flag. she just does the thing. iconic behavior honestly πŸ‘‘)


πŸ‘€ SEE ALSO πŸ‘€

🌈 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