mirror of https://github.com/postgres/postgres
Fix WAL file cutoff point calculation in pg_standby.
Patch by Simon Riggs, per bug report from Ferenc Felhoffer
This commit is contained in:
parent
68af3752de
commit
cac2f697ee
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue