Szabolcs BALLA <szballa@xxxxxxxxxxxxxxxxx> writes: > When I ran a backup script I got this message from the db (7.4.7) What's the script exactly? > SPI Exec: 645914648 total in 83 blocks; 8370416 free (19 chunks); > 637544232 used It looks like you've got a plpgsql function eating a lot of memory. Hard to tell from this info if the function code is to blame or if you've found a memory leak. regards, tom lane