Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZwQ0-00086a-CR for pgsql-admin@arkaria.postgresql.org; Wed, 08 Mar 2023 16:13:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pZwPz-0001rL-7w for pgsql-admin@arkaria.postgresql.org; Wed, 08 Mar 2023 16:13:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZwPy-0001rC-Tg for pgsql-admin@lists.postgresql.org; Wed, 08 Mar 2023 16:13:30 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZwPv-00068V-5c for pgsql-admin@lists.postgresql.org; Wed, 08 Mar 2023 16:13:30 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id DD8B568C31; Wed, 8 Mar 2023 16:13:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4lgsk6ku6Smv; Wed, 8 Mar 2023 16:13:24 +0000 (UTC) Received: from smtpclient.apple (unknown [165.140.184.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 6DB9268C2A; Wed, 8 Mar 2023 16:13:24 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: PostgreSQL uses huge amount of memory From: Scott Ribe In-Reply-To: Date: Wed, 8 Mar 2023 09:13:13 -0700 Cc: Mauricio Martini , pgsql-admin@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <8A29F022-669D-4C40-B5D3-A2D1D0D727C2@elevated-dev.com> References: To: Neimar Sierota X-Mailer: Apple Mail (2.3731.400.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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@elevated-dev.com https://www.linkedin.com/in/scottribe/ > On Mar 8, 2023, at 6:29 AM, Neimar Sierota = wrote: >=20 > 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?