From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Michael Paquier <michael.paquier@gmail.com>
To: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Fix pg_rewind when pg_xlog is a symlink.
Date: Mon, 03 Aug 2015 16:37:55 +0300
Message-ID: <55BF6EB3.2040905@iki.fi> (raw)
In-Reply-To: <CAB7nPqTrhb=Sg=87v2shW=2ijCEZAqBa-n5je8yRdcwf9iNB1Q@mail.gmail.com>
References: <E1ZMEwL-0007Ed-7o@gemulon.postgresql.org>
<CAB7nPqTrhb=Sg=87v2shW=2ijCEZAqBa-n5je8yRdcwf9iNB1Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
On 08/03/2015 03:54 PM, Michael Paquier wrote:
> On Mon, Aug 3, 2015 at 9:34 PM, Heikki Linnakangas
> <heikki.linnakangas@iki.fi> wrote:
>> Fix pg_rewind when pg_xlog is a symlink.
>>
>> pg_xlog is often a symlink, typically to a different filesystem. Don't
>> get confused and comlain about by that, and just always pretend that it's a
>> normal directory, even if it's really a symlink.
>>
>> Also add a test case for this.
>
> + symlink($master_xlogdir, "$test_master_datadir/pg_xlog") or die;
>
> This will die on Windows, hence I think that this test should be
> skipped in this case.
Sure, I did have this at the top:
+if ($windows_os)
+{
+ plan skip_all => 'symlinks not supported on Windows';
+ exit;
+}
+else
+{
+ plan tests => 4;
+}
That's only on master, though. The TAP tests don't run on Windows in 9.5
anyway.
I guess the pg_rewind tests used to work, but we didn't really advertise
or make it easy to run it, so I'm not sure it's worth it to try to
maintain that. Then again, we might want to backpatch all the TAP-test
changes to make them work on Windows to 9.5, now that they've gotten
some testing in the buildfarm and seem to work.
BTW, I just noticed that the man page for perl's symlink says this:
> On systems that don't support symbolic links, raises an exception. To check for that, use eval:
>
> $symlink_exists = eval { symlink("",""); 1 };
I wonder if we should be testing for that, instead of $windows_os.
- Heikki
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: hlinnaka@iki.fi, michael.paquier@gmail.com, heikki.linnakangas@iki.fi
Subject: Re: pgsql: Fix pg_rewind when pg_xlog is a symlink.
In-Reply-To: <55BF6EB3.2040905@iki.fi>
References: <E1ZMEwL-0007Ed-7o@gemulon.postgresql.org> <CAB7nPqTrhb=Sg=87v2shW=2ijCEZAqBa-n5je8yRdcwf9iNB1Q@mail.gmail.com> <55BF6EB3.2040905@iki.fi>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox