On Wed, 2010-04-07 at 06:12 +0000, Heikki Linnakangas wrote:
> Log Message:
> -----------
> Forbid using pg_xlogfile_name() and pg_xlogfile_name_offset() during
> recovery. We might want to relax this in the future, but ThisTimeLineID
> isn't currently correct in backends during recovery, so the filename
> returned was wrong.
Any reason why we couldn't just do this:
if (RecoveryInProgress())
{
volatile XLogCtlData *xlogctl = XLogCtl;
XLogFileName(xlogfilename, xlogctl->ThisTimeLineID,
xlogid, xlogseg);
}
else
XLogFileName(xlogfilename, ThisTimeLineID, xlogid, xlogseg);
rather than preventing access to those functions completely?
--
Simon Riggs www.2ndQuadrant.com