Magnus =?iso-8859-1?Q?M=E5nsson?= <ganja@0x63.nu> writes:
> Making the script wasnt any big problem, the problem is the amount of memory
> it wants to use, if I had a terabyte of memory I do not think that would be
> enough, if I try to convert a 100th of the database at a time it uses all
> the swap, 1G and the 512M memory.
It would help if you showed us the function and told us what version of
Postgres you're talking about. This could just be a garden-variety
memory leakage problem.
regards, tom lane