Re: recovery.conf parsing problems - Mailing list pgsql-hackers

From Andrew - Supernews
Subject Re: recovery.conf parsing problems
Date
Msg-id slrneo16gj.1aj7.andrew+nonews@atlantis.supernews.net
Whole thread Raw
In response to recovery.conf parsing problems  (Andrew - Supernews <andrew+nonews@supernews.com>)
Responses Re: recovery.conf parsing problems  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2006-12-13, "Simon Riggs" <simon@2ndquadrant.com> wrote:
> On Wed, 2006-12-13 at 19:28 +0000, Simon Riggs wrote:
>> On Wed, 2006-12-13 at 04:23 +0000, Andrew - Supernews wrote:
>> > While testing a PITR recovery, I discovered that recovery.conf doesn't
>> > seem to allow specifying ' in the command string, making it hard to
>> > protect the restore_command against problematic filenames (whitespace
>> > etc.). This doesn't seem to be a problem for archive_command, which
>> > allows \' (e.g. archive_command = '/path/to/script \'%f\' \'%p\'').
>
> Immediate workaround is to use a script to encapsulate the actual
> desired request.

That only helps if you can trust %p not to contain whitespace or $. If it
is always relative to somewhere in the data dir then this is probably ok,
but if it's an absolute path then you can't assume that.

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: pg_standby and build farm
Next
From: Tom Lane
Date:
Subject: Re: Operator class group proposal