Re: Not able to restore database - error: could not decompress data: Allocation error : not enough memory
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomasz Szypowski <tomasz.szypowski@asseco.pl>
Cc: "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2024-12-18T02:22:00Z
Lists: pgsql-bugs
Tomasz Szypowski <tomasz.szypowski@asseco.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
Commits
-
Fix memory leak in pg_restore with zstd-compressed data.
- 8cfff087b55f 16.7 landed
- 3f06324705ae 18.0 landed
- 04b860198180 17.3 landed