On Fri, Jun 25, 2010 at 4:58 AM, Lars Ellenberg <lars.ellenb...@linbit.com> wrote: > On Thu, Jun 24, 2010 at 11:59:55AM -0600, Serge Dubrouski wrote: >> Attached is an improved patch. >> >> 1. It parses unix_socket_directory out from PostgreSQL configuration >> file and used its value as a default value of OCF_RESKEY_socketdir. >> (Perl is used for that) > > sed -n -e 's/#.*$//; s/[[:space:]]*$//;' \ > -e 's/^[[:space:]]*'"$parameter"'[[:space:]=]\+[[:space:]]*//p;' > postgresql.conf | > tail -n1 > should do it, too. > > or head -n1? > if it is mentioned two times, which occurence wins? > > >> 2. It creates OCF_RESKEY_socketdir if it doesn't exist otherwise >> checks if PostgreSQL DBA use can create files in that directory. > > Actually I don't exactly get it why it was the job of the RA > to create that directory. If the admin puts it into the > postgresql.conf, he can create the directory just as well. > The RA does not create the data dir, either ;-)
The problem exists in Ubuntu distro. As far as I understand developers of that distro desided to change default value for unix_socket_directory from "/tmp" for "/var/run/postgresql". "/var/run" there is tempfs type and gets cleaned after each reboot. I think that lsb script takes care of the situation there for regular non-clustered setup. > > But if it does make sense for some setups, fine. > > -- > : Lars Ellenberg > : LINBIT | Your Way to High Availability > : DRBD/HA support and consulting http://www.linbit.com > > DRBD® and LINBIT® are registered trademarks of LINBIT, Austria. > _______________________________________________________ > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ > -- Serge Dubrouski. _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/