* doing anything with the record itself.
*/
XLogRecPtr
-readOneRecord(const char *datadir, XLogRecPtr ptr, int tliIndex)
+readOneRecord(const char *datadir, XLogRecPtr ptr, int tliIndex,
+ const char *restoreCommand)
{
XLogRecord *record;
XLogReaderState *xlogreader;
XLogRecPtr endptr;
private.tliIndex = tliIndex;
+ private.restoreCommand = restoreCommand;
xlogreader = XLogReaderAllocate(WalSegSz, datadir, &SimpleXLogPageRead,
&private);
if (xlogreader == NULL)
/* Read the checkpoint record on the target to see where it ends. */
chkptendrec = readOneRecord(datadir_target,
ControlFile_target.checkPoint,
- targetNentries - 1);
+ targetNentries - 1,
+ restore_command);
/*
* If the histories diverged exactly at the end of the shutdown
XLogRecPtr *lastchkptredo,
const char *restoreCommand);
extern XLogRecPtr readOneRecord(const char *datadir, XLogRecPtr ptr,
- int tliIndex);
+ int tliIndex, const char *restoreCommand);
/* in pg_rewind.c */
extern void progress_report(bool force);