The following bug has been logged on the website:
Bug reference: 14384
Logged by: Bolek Ziobrowski
Email address: boleslaw(dot)ziobrowski(at)yahoo(dot)pl
PostgreSQL version: 9.5.4
Operating system: Ubuntu 14.04.5 LTS
Description:
pg_dump seems to allocate memory proportional to the number of rows in
pg_largeobject (not necessarily correlated with size of these objects) ,
e.g. 4 GB for a few millions and about 26 GB for 30 millions of lobs .
Steps to reproduce :
psql :
create table large_object_test( a int, lobj oid );
insert into large_object_test select a.i,lo_from_bytea(0,
E'\\xffffff0000000000') from generate_series(1,5000000) as a(i) ;
cli:
pg_dump postgres > /tmp/dump.sql
top -o "%MEM"