Re: pg_rewind in contrib

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Satoshi Nagayasu <snaga(at)uptime(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <mpaquier(at)vmware(dot)com>
Subject: Re: pg_rewind in contrib
Date: 2015-03-12 19:43:51
Message-ID: 5501EC77.9070901@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Attachment Content-Type Size
pg_rewind-bin-9.patch.gz application/gzip 30.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2015-03-12 19:44:50 Re: logical column ordering
Previous Message Alvaro Herrera 2015-03-12 18:48:25 Re: get_object_address support for additional object types