Is it okay for me to truncate the postgresql serverlog file? I am running PostgreSQL 13.0 on RedHat, 64-bit but my serverlog file has grown so big (29 GB).
I would like to know if its safe to clear contents for this file by using &gt; serverlog or any other command that will clear all the contents in the file.
I looked around and could not find any documentation on whether its safe to do this. Most documentation talks of changing the logging strategy or configs but I do not have that level of access to achieve the configuration changes. Sample advice - Can an active Postgres serverlog be truncated?
Current space utilization for the serverlog file
-rw-r--r--  1 postgres postgres  29G Dec 10 14:16 serverlog
Truncating the log file with
&gt; logfile

should work.
If you have logging_collector = on (typically, if you are not using the Ubuntu or Debian binaries), you can also set log_rotation_size to the desired maximum and reload (not restart) PostgreSQL.