BUG #6256: loading small file eats all memory and crashes system - Mailing list pgsql-bugs

From Rachael
Subject BUG #6256: loading small file eats all memory and crashes system
Date
Msg-id 201110150343.p9F3hYfO061677@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #6256: loading small file eats all memory and crashes system
List pgsql-bugs
The following bug has been logged online:

Bug reference:      6256
Logged by:          Rachael
Email address:      rulonrasp@gmail.com
PostgreSQL version: 9.11
Operating system:   Arch  Linux
Description:        loading small file eats all memory and crashes system
Details:

While attempting to import a sql file, postgres eats all my physical memory
(4GB) and swap file space(2GB).

The file itself is a series of insert statements that is 10,000 rows by 100
columns wide.  A smaller file (1000 rows) loads just fine.  I'll be glad to
provide sample files.  The command I'm using is inside a perl script:

print `psql $database $user < postgres.sql`;

When the computer runs out of memory the process finally dies.  The file
itself is about 32MB in size.

Even if this import needs a performance tweak in the conf file, this
shouldn't exhaust all of the memory in the system before exiting.

Log Output:

LOG:  unexpected EOF on client connection
LOG:  server process (PID 5280) was terminated by signal 9: Killed
LOG:  terminating any other active server processes
WARNING:  terminating connection because of crash of another server process
DETAIL:  The postmaster has commanded this server process to roll back the
current transaction and exit, because another server process exited
abnormally and possibly corrupted shared memory.
HINT:  In a moment you should be able to reconnect to the database and
repeat your command.
WARNING:  terminating connection because of crash of another server process

pgsql-bugs by date:

Previous
From: "stephen"
Date:
Subject: BUG #6255: Unable to Install (Binary, One Click Installer
Next
From: Alex Hunsaker
Date:
Subject: Re: BUG #6256: loading small file eats all memory and crashes system