Re: pg_rewind in contrib

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: pg_rewind in contrib
Дата
Msg-id 5501EC77.9070901@iki.fi
обсуждение исходный текст
Ответ на Re: pg_rewind in contrib  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: pg_rewind in contrib  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On 03/12/2015 08:49 AM, Amit Kapila wrote:
> With attached modified script, I am able to reproduce the
> error (I have used the latest pg_rewind patch (pg_rewind-bin-8))

Thanks! That reproduced the error for me too. Not sure why I couldn't
reproduce it earlier.

The cause was a silly typo in truncate_target_file:

> @@ -397,7 +397,7 @@ truncate_target_file(const char *path, off_t newsize)
>
>         snprintf(dstpath, sizeof(dstpath), "%s/%s", datadir_target, path);
>
> -       fd = open(path, O_WRONLY, 0);
> +       fd = open(dstpath, O_WRONLY, 0);
>         if (fd < 0)
>                 pg_fatal("could not open file \"%s\" for truncation: %s\n",
>                                  dstpath, strerror(errno));

Attached is a new version of the patch, including that fix, and rebased
over current git master.

- Heikki


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: get_object_address support for additional object types
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: logical column ordering