henk de wit escribió:
> > How is the memory consumed? How are you measuring it? I assume you
> > mean the postgres process that is running the query uses the memory.
> > If so, which tool(s) are you using and what's the output that shows it
> > being used?
>
> It's periodically measured and recorded by a script from which the relevant parts are:
>
> GET_VSZ="ps aux | grep $REQ_GREP | grep -v grep | grep -v $$ | awk '{print \$5}'
> | sort -n | tail -n1";
> GET_RSS="ps aux | grep $REQ_GREP | grep -v grep | grep -v $$ | awk '{print \$6}'
> | sort -n | tail -n1";
Huh, this seems really ugly, have you tried something like just
$ ps -o cmd:50,vsz,rss -C postmaster
CMD VSZ RSS
/pgsql/install/00head/bin/postmaster 51788 3992
postgres: writer process 51788 1060
postgres: wal writer process 51788 940
postgres: autovacuum launcher process 51924 1236
postgres: stats collector process 22256 896
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.