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

Attempt to allocate too much space in UPDATE query #7081

Closed
eyalroz opened this issue Mar 19, 2021 · 3 comments
Closed

Attempt to allocate too much space in UPDATE query #7081

eyalroz opened this issue Mar 19, 2021 · 3 comments
Labels
bug
Milestone

Comments

@eyalroz
Copy link

@eyalroz eyalroz commented Mar 19, 2021

Consider the following query:

UPDATE table_3 AS t3
SET c1 = t2.c1
FROM table_1 AS t1, table_2 AS t2
WHERE false;

in the case that:

  • Table 1 is small (3 records).
  • Table 2 is large (~60 Million records).
  • Table 3 is small (less than 1000 records).
  • c1 is a column of type CHAR(3)

On my system, this gets me:

GDK reported error: GDKmmap: requested too much virtual memory; memory requested: 2307734896640, memory in use: 387076736, virtual memory in use: 2308246491776
HEAPalloc: Insufficient space for HEAP of 2307734835200 bytes.

Clearly, too much memory is being allocated (even if we ignore the fact that the condition is never met).

Software versions

  • MonetDB 11.39.11
  • Built from source
  • Devuan GNU/Linux 3 Beowulf
@PedroTadim
Copy link
Contributor

@PedroTadim PedroTadim commented Mar 19, 2021

On default branch, we added optimizations for these trivial cases. You can try it there. It will be available on the next feature release.

@eyalroz
Copy link
Author

@eyalroz eyalroz commented Mar 19, 2021

@PedroTadim : You mean, the master branch here has it?

@yzchang
Copy link
Member

@yzchang yzchang commented Mar 19, 2021

yes, on github, it's the master branch

@PedroTadim PedroTadim added this to the NEXTFEATURERELEASE milestone Mar 26, 2021
@PedroTadim PedroTadim added the bug label Mar 26, 2021
@sjoerdmullender sjoerdmullender removed this from the NEXTFEATURERELEASE milestone Aug 9, 2021
@sjoerdmullender sjoerdmullender added this to the Jul2021 milestone Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug
Projects
None yet
Development

No branches or pull requests

4 participants