parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parallel and $ENV{"HOME"}


From: Benjamin Henrion
Subject: Re: Parallel and $ENV{"HOME"}
Date: Fri, 14 Oct 2011 09:42:46 +0200

On Fri, Oct 14, 2011 at 12:10 AM, Ole Tange <tange@gnu.org> wrote:
> On Mon, Oct 10, 2011 at 11:00 AM, Benjamin Henrion <bh@udev.org> wrote:
>> Hi,
>
> Hi Benjamin.
>
> First thanks for putting so much work into fighting software patents.
>
>> I use parallel to shoot WALs of postgresql to multiple servers:
>>
>> $ grep parallel /etc/postgresql/9.1/main/postgresql.conf
>> archive_command = 'parallel -a /etc/postgresql/9.1/main/walservers
>> "mkdir -pv /tmp/{}/pg_xlog/; gzip -1 -v -c %p > /tmp/{}/%p.gz; rsync
>> /tmp/{}/%p.gz -az --timeout=15 --log-file=/var/log/pgwal/pgwal{}.log
>> {}:/db/current/wal/%f.gz; rm -v /tmp/{}/%p.gz"'            # command
>> to use to archive a logfile segment
>>
>> Then in the postgresql logs, it complains that the $ENV{"HOME"}
>> variable is not set:
>>
>> Use of uninitialized value $ENV{"HOME"} in concatenation (.) or string
>> at /usr/bin/parallel line 727.
>> Use of uninitialized value $ENV{"HOME"} in concatenation (.) or string
>> at /usr/bin/parallel line 727.
>> Use of uninitialized value $ENV{"HOME"} in concatenation (.) or string
>> at /usr/bin/parallel line 1880.
>> Use of uninitialized value $ENV{"HOME"} in concatenation (.) or string
>> at /usr/bin/parallel line 1880.
>>
>> Any idea how to fix that?
>
> The above should only happen if $HOME is not set for the user. So:
>
> * What user is this being run as?
> * Why does that user not have $HOME set?
> * What would be the sensible default value of $HOME if not set?

The command runs from the postgres database, so it runs as user postgres.

When I login as user postgres, and do:

echo $HOME, it returns the right value (/var/lib/postgresql).

I will try to add echo $HOME in my archive command...

--
Benjamin Henrion <bhenrion at ffii.org>
FFII Brussels - +32-484-566109 - +32-2-4148403
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]