In addition to ordinary stable tables, you can also create temporary tables.
Also, PostgreSQL may use temporary files for query processing if it can't fit all the needed data to memory.
So, how do you find out how much data is used by temporary tables and files?
Same as previous—you can do this using any untrusted embedded language, or directly on the database host. You have to use an untrusted language, because trusted ones run in a sandbox, which prohibits them from accessing the host file system directly.
First, check if your database defines special tablespaces for temporary files as follows: