Re: PostgreSQL uses huge amount of memory

From: Fernando Hevia <fhevia(at)gmail(dot)com>
To: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
Cc: Neimar Sierota <neimarsmo(at)gmail(dot)com>, Mauricio Martini <martini(dot)mauricio(at)hotmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: PostgreSQL uses huge amount of memory
Date: 2023-03-08 16:48:59
Message-ID: CAGYT1XTgyziT+9WAXWVUqQiU7OgdMLEQsDBUS9t3LK0Tm=Nxag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Parallel queries do exist in v11.
Rather trivial but I wonder if the OP has the same settings for
max_parallel_worker_per_gather and work_mem in both database versions.

Try setting max_parallel_workers_per_gather = 1 in v14 before running the
query. Is the memory usage kept in check with it?

El mié, 8 mar 2023 a la(s) 13:13, Scott Ribe (scott_ribe(at)elevated-dev(dot)com)
escribió:

> Could it be a difference in parallel queries? (I don't remember when those
> were added.) Certainly, a union is an example of something that will
> clearly get multiple workers.
>
> --
> Scott Ribe
> scott_ribe(at)elevated-dev(dot)com
> https://www.linkedin.com/in/scottribe/
>
>
>
> > On Mar 8, 2023, at 6:29 AM, Neimar Sierota <neimarsmo(at)gmail(dot)com> wrote:
> >
> > I did a test as you mentioned and in postgresql version 11 I didn't
> observe any change in memory consumption while the query is executed. With
> version 14, running the same query, it is possible to observe a
> considerable increase in memory usage during execution.
> > Could it be a bug in postgresql's memory management?
>
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2023-03-08 18:42:46 Re: PostgreSQL uses huge amount of memory
Previous Message Scott Ribe 2023-03-08 16:13:13 Re: PostgreSQL uses huge amount of memory