pgpool2.git / summary / log / commit / refs
commit e9d517c206d785ea5e8cd41fcd8fbfb1ecaa0c77
Author: Guillaume Lelarge <guillaume@lelarge.info>
Date: Sun Nov 27 22:04:21 2011 +0000
Fix error on the lsn math
The LSN math was wrong for many tools, and pgpool as well. This patch fixes
the issue by replacing ffffffff with ff000000.
See http://eulerto.blogspot.com/2011/11/understanding-wal-nomenclature.html
for details.
pool_worker_child.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pool_worker_child.c b/pool_worker_child.c
index 0d084f373..7faac3698 100644
--- a/pool_worker_child.c
+++ b/pool_worker_child.c
@@ -332,7 +332,7 @@ static long text_to_lsn(char *text)
pool_error("text_to_lsn: wrong log location format: %s", text);
return 0;
}
- lsn = xlogid * ((unsigned long long int)0xffffffff - WALSEGMENTSIZE) + xrecoff;
+ lsn = xlogid * ((unsigned long long int)0xff000000 - WALSEGMENTSIZE) + xrecoff;
#ifdef DEBUG
pool_log("lsn: %X %X %llX", xlogid, xrecoff, lsn);
#endif
[parent: 13a76c036359]