Package: postgresql-common Re: Stefan De Wachter 2015-07-05 <CAGiaxKR=1P++-PSotM5ExnugiOerQ=V8Wt=mfmd7fk8g-ha...@mail.gmail.com> > Thank you very much for your email. The symlink /etc/postgresql/9.4/main/log > points to /data/postgresql/log, which is the log directory I set up in > postgresql.conf. When I was messing around with the pg_ctlcluster script, I > found that an error was generated which said exactly that (it's a > directory, not a file), but that error message was redirected to /dev/null. > So what you see on the console is just something saying startup failed, but > nothing more informative. > > The question, then, is why the symlink is pointing to a directory in the > first place, and why it worked before but not after the upgrade. Digging > through my notes, I *think* that I originally set up the cluster using the > command > > pg_createcluster -d /data/postgresql/db --logfile /data/postgresql/log 9.4 > main
Hi Stefan, you should point this to a real file (and set up logrotate style rotation). When pointing --logfile to a directory I get this here: $ mkdir /tmp/log $ pg_createcluster --logfile /tmp/log 9.4 foo $ l /tmp/log/ -d drw-r----- 2 postgres postgres 4096 Jul 6 10:10 /tmp/log// $ l /etc/postgresql/9.4/foo/log lrwxrwxrwx 1 postgres postgres 8 Jul 6 10:10 /etc/postgresql/9.4/foo/log -> /tmp/log/ The garbled permissions mean that pg_createcluster really didn't understand what we wanted it to do there. > which is probably why things went wrong (guess the word logfile ought to > have made me wonder, but then, I'm an idiot so it can't be helped). Why it > did work before the update, though, I don't know. Perhaps the update set > the symlink but it wasn't there before for some reason? You probably tweaked the permissions, or (re)created the directory only later. > You think it is best to just delete that symlink? From what you say, it > should then write the early startup log to the default /var/log/postgresql > folder? You can either delete the symlink to make it log to /var/log/postgresql/...log, or point it to a file inside /data/postgresql/log. What we should do on the pg_*cluster side is to make the tools complain when someone points --logfile to a directory. (Or, possibly better, automatically append "postgresql-$ver-$cluster.log to the directory.) Cc'ing the BTS so we don't forget. Christoph -- [email protected] | http://www.df7cb.de/
signature.asc
Description: Digital signature
_______________________________________________ Pkg-postgresql-public mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-postgresql-public
