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

Fix writing of checksum for blocks around the segment boundary. #25

Merged
merged 1 commit into from
Nov 7, 2016

Conversation

amitlan
Copy link
Contributor

@amitlan amitlan commented Nov 7, 2016

In direct write mode, pg_bulkload loads data into a fixed number of
private buffers and once they are full, writes those buffers to the
actual relation file. Each page's checksum is set before writing to
the file, during which it must pass the block number for checksum
calculation. Due to a bug in how block number is calculated, it
calculated the wrong checksum in certain cases, especially, when a
segment of the relation is about to get full.

Fixes #24.

In direct write mode, pg_bulkload loads data into a fixed number of
private buffers and once they are full, writes those buffers to the
actual relation file.  Each page's checksum is set before writing to
the file, during which it must pass the block number for checksum
calculation.  Due to a bug in how block number is calculated, it
calculated the wrong checksum in certain cases, especially, when a
segment of the relation is about to get full.
@amitlan amitlan merged commit 67ffe30 into master Nov 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checksum error in additional data loading.
1 participant