Yes, I was indeed out of memory. That is the problem: the postgres.exe process corresponding to the pg_restore continuously consumes more and more memory until it runs out and fails with the mentioned error. Since I already have 4Gb of RAM, throwing more hardware at it is not a feasible solution, so I was wondering what else can I do to complete this process without running out of memory.