Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong conversation from hex to dec of LSN #20

Closed
ioguix opened this issue Apr 27, 2016 · 0 comments
Closed

Wrong conversation from hex to dec of LSN #20

ioguix opened this issue Apr 27, 2016 · 0 comments
Assignees
Labels

Comments

@ioguix
Copy link
Member

ioguix commented Apr 27, 2016

Since 9.3, PostgreSQL uses 256 segments per WAL, not 255. That means a WAL size is 4GB, not 4GB-16MB.

In conséquence, the following conversation is false:

$max_lsn_dec = (hex('ff000000') * hex($wal_num)) + hex($wal_off);

it should be $max_lsn_dec = ( 4_1024_1024*1024 * hex($wal_num)) + hex($wal_off);

This bug should not have large impact in production, but it would be better to fix it.

@ioguix ioguix self-assigned this Apr 27, 2016
@ioguix ioguix added the bug label Apr 27, 2016
ioguix added a commit that referenced this issue Apr 27, 2016
@ioguix ioguix closed this as completed Apr 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant