Robert Nix <robert(at)urban4m(dot)com> writes:
> Thanks for the quick response, Tom. Sure enough. I found the OOM message in
> syslog. And thanks for the link. I'll try those suggestions. Just out of
> curiosity, will using psql -f alter the behavior, in this case, with
> respect to memory?
No, since the memory consumption was happening on the server side.
It is somewhat of interest why you're apparently getting a memory leak on
the server side, though. Maybe you were using an unsafely large work_mem
or maintenance_work_mem setting? I've also seen some reports lately
suggesting that PostGIS might cause intra-query memory leaks, which might
explain this if data_partitions.zone_municipality_demog_houston contains
any PostGIS data types.
regards, tom lane