postgres.git / summary / log / commit / refs
commit cac2f697ee21125cbe299810c8155dfb463cd7f7
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Tue Jul 08 15:11:58 2008 +0000
First released in: 8.4.0, 8.3.4
Fix WAL file cutoff point calculation in pg_standby.
Patch by Simon Riggs, per bug report from Ferenc Felhoffer
contrib/pg_standby/pg_standby.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c
index e8597c69738..15dc3442049 100644
--- a/contrib/pg_standby/pg_standby.c
+++ b/contrib/pg_standby/pg_standby.c
@@ -1,5 +1,5 @@
/*
- * $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
@@ -323,7 +323,7 @@ SetWALFileNameForCleanup(void)
if (seg_diff > seg)
{
log_diff++;
- seg = MaxSegmentsPerLogFile - seg_diff;
+ seg = MaxSegmentsPerLogFile - (seg_diff - seg);
}
else
seg -= seg_diff;
[parent: 68af3752de44]