RE: Not able to restore database - error: could not decompress data: Allocation error : not enough memory

From: Tomasz Szypowski <tomasz(dot)szypowski(at)asseco(dot)pl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: Not able to restore database - error: could not decompress data: Allocation error : not enough memory
Date: 2024-12-18 07:12:06
Message-ID: DU0PR04MB94191A580B07749939AE500799052@DU0PR04MB9419.eurprd04.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thank you for the quick response.
Do you think it will be fixed within few months? Next year we plan to upgrade our clients to 17 and zstd compression is about two times faster than gzip and produces about 20% less backup.

Regards
Thomas

-----Original Message-----
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Wednesday, December 18, 2024 3:22 AM
To: Tomasz Szypowski <tomasz(dot)szypowski(at)asseco(dot)pl>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Not able to restore database - error: could not decompress data: Allocation error : not enough memory

[Nie otrzymujesz cz?sto wiadomo?ci e-mail z tgl(at)sss(dot)pgh(dot)pa(dot)us(dot) Dowiedz si?, dlaczego jest to wa?ne, na stronie https://aka.ms/LearnAboutSenderIdentification ]

Tomasz Szypowski <tomasz(dot)szypowski(at)asseco(dot)pl> 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 swaping) 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message combit - Nicolaij Deutschkämer 2024-12-18 10:05:17 Incompatibility of newest pg_restore with PostgreSQL-Servers older or equal to version 16
Previous Message Tom Lane 2024-12-18 02:22:00 Re: Not able to restore database - error: could not decompress data: Allocation error : not enough memory