Has anyone tried running a postgresql container with a tmpfs volume mount to pgsql_tmp? (any database with a temp files directory i would imagine)
Has it caused any problem?
Is this a bad idea?
Additional helpful info?
docker tmpfs
- "As opposed to volumes and bind mounts, a tmpfs mount is temporary, and only persisted in the host memory. When the container stops, the tmpfs mount is removed, and files written there won’t be persisted."
pgsql_tmp
- "Temporary files (for operations such as sorting more data than can fit in memory) are created within PGDATA/base/pgsql_tmp, or within a pgsql_tmp subdirectory of a tablespace directory if a tablespace other than pg_default is specified for them. The name of a temporary file has the form pgsql_tmpPPP.NNN, where PPP is the PID of the owning backend and NNN distinguishes different temporary files of that backend."
Putting this out for reference and research from the community. Thank you for any assistance.
Have experienced artifactory database filling inodes a couple of times. After restarting the stack, had to manually delete the tmp files, this took about an hour.