Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2f86ab3

Browse filesBrowse files
committed
Fix small error in COPY FROM progress reporting.
The # of bytes processed was accumulated slightly incorrectly. After loading more data to the input buffer, we added the number of bytes in the buffer to the sum. But in case of multi-byte characters or escapes, there can be a few unprocessed bytes left over from previous load in the buffer. Those bytes got counted twice.
1 parent 3c78e05 commit 2f86ab3
Copy full SHA for 2f86ab3

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/backend/commands/copyfromparse.c

Copy file name to clipboardExpand all lines: src/backend/commands/copyfromparse.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ CopyLoadRawBuf(CopyFromState cstate)
386386
cstate->raw_buf[nbytes] = '\0';
387387
cstate->raw_buf_index = 0;
388388
cstate->raw_buf_len = nbytes;
389-
cstate->bytes_processed += nbytes;
389+
cstate->bytes_processed += inbytes;
390390
pgstat_progress_update_param(PROGRESS_COPY_BYTES_PROCESSED, cstate->bytes_processed);
391391
return (inbytes > 0);
392392
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.