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

[Bug]: BCP import memory leak when table has an index #2486

Open
1 task done
staticlibs opened this issue Apr 10, 2024 · 0 comments
Open
1 task done

[Bug]: BCP import memory leak when table has an index #2486

staticlibs opened this issue Apr 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@staticlibs
Copy link
Contributor

What happened?

Running with #2469 patch applied and using a table like this:

create table tab1 (col1 varchar(10))
insert into tab1 values('foobar')
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
insert into tab1 select col1 from tab1
select count(*) from tab1
> 4194304

When importing these records back with BCP, backend memory usage looks good:

Figure_1

But if we create an index on this table:

create index idx1 on tab1(col1)

And do the import after that, then backend memory usage looks like this:

Figure_2

I'll propose a patch to change the index handling.

Version

BABEL_3_X_DEV (Default)

Extension

babelfishpg_tsql (Default)

Which flavor of Linux are you using when you see the bug?

Fedora

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants