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.

>
> --
> : 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/
>



-- 
Serge Dubrouski.
_______________________________________________________
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