Re: Don't choke on files that are removed while pg_rewind runs.

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@lists.postgresql.org, Heikki Linnakangas <heikki.linnakangas@iki.fi>, Michael Paquier <michael@paquier.xyz>, Fujii Masao <masao.fujii@oss.nttdata.com>
Date: 2020-07-13T06:34:06Z
Lists: pgsql-hackers
> On 13 Jul 2020, at 08:10, Justin Pryzby <pryzby@telsasoft.com> wrote:

> Every other access to "res" in this loop is to res(i), which I believe is what
> was intended here, too.  Currently, it will dumbly loop but skip *every* row if
> the 2nd column (1: size) of the first row (0) is null.

Yeah, I agree with that, seems like the call should've been PQgetisnull(res, i, 1);
to match the loop.

cheers ./daniel


Commits

  1. Fix handling of missing files when using pg_rewind with online source

  2. Don't choke on files that are removed while pg_rewind runs.