Very high memory usage on restoring dump (with plain pqsl) on pg 9.1.2 - Mailing list pgsql-general

From Heiko Wundram
Subject Very high memory usage on restoring dump (with plain pqsl) on pg 9.1.2
Date
Msg-id 5fc1957fa58236c56f3ab05cc43b1444@modelnine.org
Whole thread Raw
Responses Re: Very high memory usage on restoring dump (with plain pqsl) on pg 9.1.2
List pgsql-general
Hey!

On a host that I'm currently in the process of migrating, I'm
experiencing massive memory usage when importing the dump (generated
using a plain pg_dump without options) using psql. The massive memory
usage happens when the CREATE INDEX commands are executed, and for a
table with about 4G of data (traffic rows in pmacct format) in it, I'm
seeing the respective (single!) PostgreSQL-process jump to around 40GB
(VIRT, RES stays at 24GB, which is the systems actual memory), before
the process is duly killed by the OOM-killer of the system (due to
running out of swap...).

I've checked the corresponding parameters (maintenance_work_mem) which
I guess influences the process growth in this case, and they are
"default" (i.e., 16MB).

Is this expected/known behaviour? Does this have anything to do with
the fact that the dump comes from a PostgreSQL 8.3.x? Thanks for any
hint!

--
--- Heiko.

pgsql-general by date:

Previous
From: Arvind Singh
Date:
Subject: Help in Parsing PG log usings CSV format
Next
From: Martin Gregorie
Date:
Subject: Re: Help in Parsing PG log usings CSV format