"Sriram Dandapani" <sdandapani@xxxxxxxxxxxxxxx> writes: > On a large transaction involving an insert of 8 million rows, after a > while Postgres complains of an out of memory error. If there are foreign-key checks involved, try dropping those constraints and re-creating them afterwards. Probably faster than retail checks anyway ... regards, tom lane