Calvin Kim <calvinkhkim@gmail.com> writes:
> What is strange for me is that I don't see any files in /base/pgsql_tmp and
> that temp_tablespaces is not set in postgresql.conf.
> I know that temp files supposed to be removed after process is completed,
> but not sure why I'm seeing such a huge numbers in pg_stat_database. Would
> there be any maintenance job that clears this?
Temp files get cleared as part of end-of-query cleanup, there's no
separate maintenance job for that. So you'd only see them in the
filesystem if you looked while the query was running.
regards, tom lane