What happened?
This issue is similar to #2455, there seems to be a leak in processing Partially Length-prefixed (PLP) incoming records. Memory is allocated in MessageContext, so it is released after BCP import finishes. Still can be a problem when importing large files.
Excessive memory usage can be shown using BCP import with a table like this:
create table tab1 (col1 varchar(max))
insert into tab1 values('foobar')
insert into tab1 values(null)
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
insert into tab1 select * from tab1
select count(*) from tab1
> 2097152
Will submit a PR.
Version
BABEL_3_X_DEV (Default)
Extension
babelfishpg_tds
Which flavor of Linux are you using when you see the bug?
Fedora
Relevant log output
No response
Code of Conduct
What happened?
This issue is similar to #2455, there seems to be a leak in processing Partially Length-prefixed (PLP) incoming records. Memory is allocated in
MessageContext, so it is released after BCP import finishes. Still can be a problem when importing large files.Excessive memory usage can be shown using BCP import with a table like this:
Will submit a PR.
Version
BABEL_3_X_DEV (Default)
Extension
babelfishpg_tds
Which flavor of Linux are you using when you see the bug?
Fedora
Relevant log output
No response
Code of Conduct