Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit2f86ab3

Browse files
committed
Fix small error in COPY FROM progress reporting.
The # of bytes processed was accumulated slightly incorrectly. Afterloading more data to the input buffer, we added the number of bytes inthe 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 thebuffer. Those bytes got counted twice.
1 parent3c78e05 commit2f86ab3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/commands/copyfromparse.c

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp