Skip to content

Commit cac2f69

Browse files
committed
Fix WAL file cutoff point calculation in pg_standby.
Patch by Simon Riggs, per bug report from Ferenc Felhoffer
1 parent 68af375 commit cac2f69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/pg_standby/pg_standby.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pg_standby/pg_standby.c,v 1.12 2008/05/17 01:28:21 adunstan Exp $
2+
* $PostgreSQL: pgsql/contrib/pg_standby/pg_standby.c,v 1.13 2008/07/08 15:11:58 heikki Exp $
33
*
44
*
55
* pg_standby.c
@@ -323,7 +323,7 @@ SetWALFileNameForCleanup(void)
323323
if (seg_diff > seg)
324324
{
325325
log_diff++;
326-
seg = MaxSegmentsPerLogFile - seg_diff;
326+
seg = MaxSegmentsPerLogFile - (seg_diff - seg);
327327
}
328328
else
329329
seg -= seg_diff;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy