1

There are too many filenames start with T

(T14_xxxxxxxx.1, T14_xxxxxxxx.2 .. T14_xxxxxxxx.18)

in postgresql base directory for one database.

The size of this database in base directory is 500GB with these files. After restart postgresql, these files gone out and the size of database in base/ directory is decreasing 200GB.

I read the following sites. But I can't found any thing about these files:

https://www.postgresql.org/docs/current/storage-file-layout.html#:~:text=For%20each%20database%20in%20the,system%20catalogs%20are%20stored%20there.>

Also I also used pg_relation_filepath or select pg_class table. I didn't find any thing about these files.

What are these large files in "base" directory? Are these cache files? how could the application occur these files?

asked Feb 13, 2024 at 12:49

1 Answer 1

6

Those are the files behind temporary tables. Looks like somebody is creating large temporary tables. Such tables get deleted when the database session ends.

The files get cleaned up automatically when the database session ends, and in case of a server crash they get removed when PostgreSQL starts again. Never remove such files manually; rather, you should terminate the database session that created the temporary table.

answered Feb 13, 2024 at 12:56

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.