
PostgreSQL 14 Administration Cookbook
By :

In addition to ordinary persistent tables, you can also create temporary tables. Temporary tables have disk files for their data, just as persistent tables do, but those files will be stored in one of the tablespaces listed in the temp_tablespaces
parameter or, if not set, the default tablespace.
PostgreSQL may also use temporary files for query processing for sorts, hash joins, or hold cursors if they are larger than your current work_mem
parameter setting.
So, how do you find out how much data is being used by temporary tables and files? You can do this by using any untrusted embedded language, or directly on the database host.
You have to use an untrusted language because trusted languages run in a sandbox, which prohibits them from directly accessing the host filesystem.
Perform the following steps:
Change the font size
Change margin width
Change background colour