Re: BUG #15320: = any (array(SQL)) ERROR: invalid memory allocrequest size 1073741824
В списке pgsql-bugs по дате отправления:
| От | Andres Freund |
|---|---|
| Тема | Re: BUG #15320: = any (array(SQL)) ERROR: invalid memory allocrequest size 1073741824 |
| Дата | |
| Msg-id | 20180810022634.ggxwlwm6avraufjv@alap3.anarazel.de обсуждение исходный текст |
| Ответ на | BUG #15320: = any (array(SQL)) ERROR: invalid memory alloc requestsize 1073741824 (PG Bug reporting form <noreply@postgresql.org>) |
| Список | pgsql-bugs |
Hi, On 2018-08-10 02:00:56 +0000, PG Bug reporting form wrote: > postgres=# explain analyze select count(*) from tbl where uid = any > (array(select uid from tbl limit 100000000)) ; > ERROR: XX000: invalid memory alloc request size 1073741824 > LOCATION: repalloc, mcxt.c:1050 > Time: 24133.852 ms (00:24.134) > ``` > > is it a bug? No, not in my opinion. You're building a very large array. Arrays are stored in memory. Allocation sizes in postgres are limited in many places. You could argue for removing the limit in this case, but that'd not make it a bug. And I doubt it's worth changing this. Your array is going to be huge either way, and we limit arrays (and other datums) to 1GB. We could fix the growth of the array here to fail a bit later, but that's it. Greetings, Andres Freund
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера