Re: Memory leak on subquery as scalar operand

Поиск
Список
Период
Сортировка
От Lauri Laanmets
Тема Re: Memory leak on subquery as scalar operand
Дата
Msg-id CAPH-tTxWe5WRdfDbKigdLhyZA3e33s4_giK_G0FSGyjrFyUCAQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Memory leak on subquery as scalar operand  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
I have tested it on version 12 that comes with Ubuntu 20.04.5 LTS. Then upgraded to "PostgreSQL 14.5 (Ubuntu 14.5-2.pgdg20.04+2) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit" from "deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main" but the behaviour is the same - if my example query is repeatedly executed on an open session, the postgres process will start using 1 MB more RAM after around every 14 times of execution. Until OOM-killer kills it.

I haven't changed any default settings and it can be reproduced also by pgAdmin Query Tool that executes the query under 'postgres' user. Although it's a bit tiresome to make so many executions manually.

It is interesting that it doesn't happen on Windows. Might be that it's caused by the OS or system in general but I have no idea what to try or test next.

The machine is: Linux 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Regards
Lauri

Kontakt Tom Lane (<tgl@sss.pgh.pa.us>) kirjutas kuupäeval E, 31. oktoober 2022 kell 15:49:
Lauri Laanmets <pcspets@gmail.com> writes:
> There seems to be a memory leak in PostgreSQL for Linux (doesn't happen on
> Windows). At least in versions 12 to 14 (and not in 9.5). It can be
> reproduced with the following SQL script on an empty database.

Thanks for the test case!  Unfortunately, I can't see any ill effects
with it in currently released versions (I tried 12, 14, 15, and HEAD).
Which minor releases did you try?  Do you have any non-default
settings or build options?

                        regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Memory leak on subquery as scalar operand
Следующее
От: "Gunnar \"Nick\" Bluth"
Дата:
Сообщение: Strange sort node/explain result