Fixed crash at copy report unexpected message type error
@@ -7105,11 +7105,14 @@ extract_line_buf(CopyState cstate)
lineno_delim = memchr(line_start, COPY_METADATA_DELIM,
Min(32, cstate->line_buf.len));
+ if (lineno_delim && (lineno_delim != line_start))
+ {
value_len = lineno_delim - line_start + 1;
line_start += value_len;
line_buf = line_start;
}
}
+ }
/*
* Finally allocate a new buffer and trim the string to a reasonable
