Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tNjhX-001otv-Qz for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Dec 2024 02:22:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tNjhV-0095wA-C3 for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Dec 2024 02:22:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tNjhV-0095t5-2i for pgsql-bugs@lists.postgresql.org; Wed, 18 Dec 2024 02:22:12 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tNjhO-000KNy-0L for pgsql-bugs@lists.postgresql.org; Wed, 18 Dec 2024 02:22:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 4BI2M0IE2601068; Tue, 17 Dec 2024 21:22:01 -0500 From: Tom Lane To: Tomasz Szypowski cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: Not able to restore database - error: could not decompress data: Allocation error : not enough memory In-reply-to: References: Comments: In-reply-to Tomasz Szypowski message dated "Tue, 17 Dec 2024 20:29:20 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2601066.1734488520.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 17 Dec 2024 21:22:00 -0500 Message-ID: <2601067.1734488520@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tomasz Szypowski writes: > Our database consists of 408032 blobs (pg_largeobject). > Backup was made using zstd and it weights 70GB. > While restoring the used memory increases constantly (from 5 MB to 5GB -= i have got 8GB RAM, after reaching 5GB it uses 5GB for some time, maybe s= waping) and then crashes with the error. Yeah, leak reproduced here. Apparently it's specific to the zstd code path, because I don't see it with the default compression method. Should be easy to fix (awaiting valgrind results), but in the meantime just use default compression. Thanks for the report! regards, tom lane