Hi! Gordon Haverland [2005-06-08 17:36 -0600]: > Package: postgresql > Version: 7.5.4 > Severity: normal > File: postgres > > On this system, /var/lib/postgres is a mount point for putting > a partition devoted to postgres. The stuff in postgresql.postinst > which tries to rmdir that directory fails. Fine, I tried to > minimially quote out the rmdir stuff from the .postinst, and reran > apt-get, and it still was generating the same problem. So, I commented > out some more stuff. Now I get an error on pg_createcluster. > Sure, I could try and manually patch it some more, but I think it > might be time to file this bugreport. You probably have a more > elegant way to fix things. I do have a little amount of new data > in the dbase here, but I can replace it if need by. Losing the > database doesn't concern me too much.
Hmm, that is really odd. There is code that checks whether
/var/lib/postgres and /var/lib/postgresql/<version>/<cluster> (the
"canonical" location of cluster data directories) are on the same
partition:
mkdir -p /var/lib/postgresql/7.4/$CLUSTER
if ln "$PGDATA/PG_VERSION" /var/lib/postgresql/7.4/$CLUSTER 2>/dev/null; then
[move the cluster to the new location]
else
[leave it in the old location and remove the new directory again]
fi
The ln tries to make a hardlink between the old and new directory,
which only works on the same device.
The only place where I attempt to rmdir /var/lib/postgres is much
later:
# remove obsolete stuff
rm -rf /var/lib/postgres/dumpall /var/lib/postgres/.bash_profile
rmdir -p --ignore-fail-on-non-empty /var/lib/postgres
But that's just for cleaning up a bit.
So which command failed exactly?
Please also send me the output of pg_lsclusters.
Thanks,
Martin
--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org
signature.asc
Description: Digital signature

