> Hi, > > The cron.d script in postgresql common always gives the following > output: > > could not change directory to "/root" > > I believe this happens as the pg_maintenance script is run from the > /root directory and then changes user to the postgres user, which > cannot read it.
Yes, the pg_maintenance script is run as root, but changes to the postgres user before running vacuumdb, and for whatever reason that produces the error. A slight tweak to the cron.d file seems the simplest way to fix it: --- /etc/cron.d/postgresql-common.orig 2005-07-17 12:05:35.972625352 +0100 +++ /etc/cron.d/postgresql-common 2005-07-17 12:05:48.538632635 +0100 @@ -18,4 +18,4 @@ # If you do not run a 24/7 site, you may want to uncomment the next line # so as to do a regular VACUUM FULL. If you need 24/7 connectivity, save # VACUUM FULL for when you think you really need it. -10 3 * * Sun root /usr/sbin/pg_maintenance --full --analyze >/dev/null +10 3 * * Sun root cd / && /usr/sbin/pg_maintenance --full --analyze >/dev/null -- --- Geoff Richards -------------><-------------- http://ungwe.org/ --- "I tried to fling my shadow at the moon, The while my blood leapt with a wordless song." -- Theodore Roethke -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]