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 necessary data into the memory.
So, how do you find out how much data is used by temporary tables and files? You can do this using any untrusted embedded language, or directly on the database host.