PostgreSQL uses huge amount of memory

From: Mauricio Martini <martini(dot)mauricio(at)hotmail(dot)com>
To: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: PostgreSQL uses huge amount of memory
Date: 2023-03-08 13:04:18
Message-ID: MW5PR10MB57391E28809250993B92BB0782B49@MW5PR10MB5739.namprd10.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


When executing a query containing WITH and more than a thousand UNION ALL, PostgreSQL version 14 or higher uses all server memory until it enters recovery mode. In tests with version 11, this behavior does not occur. shouldn't he respect the work_mem?
*I know I should refactor, but what caught my attention was the fact that a query uses the entire resource without restriction, which does not occur in version 11.4, I did a test in version 15, which also occurs.
Has anything related to memory usage in this sense been changed?

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Neimar Sierota 2023-03-08 13:29:12 Re: PostgreSQL uses huge amount of memory
Previous Message Abhishek Singh 2023-03-08 00:56:37 Re: Replication between two different versions