pg_createcluster on an existing data directory: symlink config files instead of moving them

Bug #1392057 reported by Nick Sloan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql-common (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

My release is 14.04. postgresql-common is 154.

When running pg_createcluster to create a cluster for which the data directory already exists, pg_createcluster copies, and then deletes the configuration files from the data directory. The deleting seems unnecessary, and it seems like a symlink would be better suited here. At the very least, I see no reason to delete the originals.

Specifically, this is a glaring flaw if I have established a database on a different partition from my Ubuntu installation and I want to wipe and reinstall Ubuntu while migrating this data. This is simple in theory, but deleting the config files from the data directory creates a frustrating barrier if I want to do this more than once.

Revision history for this message
Martin Pitt (pitti) wrote :

That's the documented behaviour of pg_createcluster, and it tells you what happens too. I'll definitively not just copy the file and leave the original, that would be utterly confusing and prone to getting out of sync. A symlink could work though.

Changed in postgresql-common (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
summary: - pg_createcluster on an existing data directory can't be repeated
+ pg_createcluster on an existing data directory: symlink config files
+ instead of moving them
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.