Hi,

On Mon, Jun 28, 2010 at 10:41:47AM +0200, Lars Ellenberg wrote:
> On Fri, Jun 25, 2010 at 08:22:35AM -0600, Serge Dubrouski wrote:
> > On Fri, Jun 25, 2010 at 5:56 AM, Lars Ellenberg
> > <[email protected]> wrote:
> > > On Fri, Jun 25, 2010 at 01:49:32PM +0200, Dejan Muhamedagic wrote:
> > >> On Fri, Jun 25, 2010 at 12:58:15PM +0200, Lars Ellenberg 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.
> > >>
> > >> Isn't then the last s command enough?
> > >
> > > First strip optional inline comments and possibly trailing whitespace.
> > > Yes, you could put it in one s///, with s/...()(|)/\1/p, but
> > > that won't get more readable.
> > >
> > >> I believe that it was in case the directory was in /var/run/
> > >> which is cleaned on boot.
> > >
> > > Bad choice, then ;-)
> > > Choose differently, or re-create it on boot.
> > > Ah well, or patch the resource agent.
> > > Whatever works best.
> > 
> > It's not a users choice I'm afraid. Changing that parameter in
> > postgresql.conf from it's default value creates more problems for DBA
> > than gives advantages since psql tool doesn't tolerate such change and
> > one have to provide the "non-default" value as a command line
> > parameter. So as I said earlier I think that Ubuntu developers for
> > some reason made that choice for their users. Now our user will have
> > to take care of that bu setting additional OCF parameter since. Since
> > it's a default value for that distro its value isn't explicitly set in
> > postgresql.conf and our parsing mechanism won't help.
> 
> FUBAR :(
> any way to ask postgres about its hardcoded defaults?
> sort of like "postconf" for postfix?
> 
> Still I don't think it belongs into the RA.
> This is needed once after reboot,
> not for every start/stop/monitor of the RA.

It should be only on start.

> Rather put a line into rc.local,
> or into /etc/default/pacemaker (yes, that's shell code,
> and it is sourced from the heartbeat and corosync init scripts).

It is more logical to do that, but requires less management
effort to have it in the RA. Updating files in a cluster requires
discipline of a kind which is usually lacking.

Cheers,

Dejan

> -- 
> : 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: [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to