From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_rewind failure by file deletion in source server |
Date: | 2015-06-28 18:46:47 |
Message-ID: | 55904117.6010103@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 06/24/2015 09:43 AM, Michael Paquier wrote:
> Attached is a new set of patches. Except for the last ones that
> addresses one issue of pg_rewind (symlink management when streaming
> PGDATA), all the others introduce if_not_exists options for the
> functions of genfile.c. The pg_rewind stuff could be more polished
> though. Feel free to comment.
I've committed the additional option to the functions in genfile.c (I
renamed it to "missing_ok", for clarity), and the pg_rewind changes to
use that option.
I ended up refactoring the patch quite a bit, so if you could
double-check what I committed to make sure I didn't break anything, that
would be great.
I didn't commit the tablespace or symlink handling changes yet, will
review those separately.
I also didn't commit the new regression test yet. It would indeed be
nice to have one, but I think it was a few bricks shy of a load. It
should work in a freshly initdb'd system, but not necessarily on an
existing installation. First, it relied on the fact that
postgresql.conf.auto exists, but a DBA might remove that if he wants to
make sure the feature is not used. Secondly, it relied on the fact that
pg_twophase is empty, but there is no guarantee of that either. Third,
the error messages included in the expected output, e.g "No such file or
directory", depend on the operating system and locale. And finally, it'd
be nice to test more things, in particular the behaviour of different
offsets and lengths to pg_read_binary_file(), although an incomplete
test would be better than no test at all.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2015-06-28 19:20:05 | Re: Support for N synchronous standby servers - take 2 |
Previous Message | Fabien COELHO | 2015-06-28 18:37:34 | Re: Refactoring pgbench.c |