提交 cac2f697 编写于 作者: H Heikki Linnakangas

Fix WAL file cutoff point calculation in pg_standby.

Patch by Simon Riggs, per bug report from Ferenc Felhoffer
上级 68af3752
/* /*
* $PostgreSQL: pgsql/contrib/pg_standby/pg_standby.c,v 1.12 2008/05/17 01:28:21 adunstan Exp $ * $PostgreSQL: pgsql/contrib/pg_standby/pg_standby.c,v 1.13 2008/07/08 15:11:58 heikki Exp $
* *
* *
* pg_standby.c * pg_standby.c
...@@ -323,7 +323,7 @@ SetWALFileNameForCleanup(void) ...@@ -323,7 +323,7 @@ SetWALFileNameForCleanup(void)
if (seg_diff > seg) if (seg_diff > seg)
{ {
log_diff++; log_diff++;
seg = MaxSegmentsPerLogFile - seg_diff; seg = MaxSegmentsPerLogFile - (seg_diff - seg);
} }
else else
seg -= seg_diff; seg -= seg_diff;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册