}
PQclear(res);
+ /* Complain if we've not reached stop point yet */
+ if (stream_stop != NULL && !stream_stop(blockpos, timeline, false))
+ {
+ fprintf(stderr, _("%s: replication stream was terminated before stop point\n"),
+ progname);
+ goto error;
+ }
+
if (copybuf != NULL)
PQfreemem(copybuf);
if (walfile != -1 && close(walfile) != 0)
fprintf(stderr, _("%s: could not close file %s: %s\n"),
progname, current_walfile_name, strerror(errno));
+ walfile = -1;
return true;
error:
if (walfile != -1 && close(walfile) != 0)
fprintf(stderr, _("%s: could not close file %s: %s\n"),
progname, current_walfile_name, strerror(errno));
+ walfile = -1;
return false;
}