Fix WAL file cutoff point calculation in pg_standby.

Patch by Simon Riggs, per bug report from Ferenc Felhoffer
This commit is contained in:
Heikki Linnakangas 2008-07-08 15:12:04 +00:00
parent a4845efaab
commit 6280789e05

View File

@ -320,7 +320,7 @@ SetWALFileNameForCleanup(void)
if (seg_diff > seg)
{
log_diff++;
seg = MaxSegmentsPerLogFile - seg_diff;
seg = MaxSegmentsPerLogFile - (seg_diff - seg);
}
else
seg -= seg_diff;