Hi hackers,
Attached is a patch to add a pg_ls_tmpdir() function that lists the
contents of a specified tablespace's pgsql_tmp directory. This is
very similar to the existing pg_ls_logdir() and pg_ls_waldir()
functions.
By providing more visibility into the temporary file directories,
users can more easily track queries that are consuming a lot of disk
space for temporary files. This function already provides enough
information to calculate the total temporary file usage per PID, but
it might be worthwhile to create a system view that does this, too.
I am submitting this patch for consideration in commitfest 2018-11.
Nathan