Delphix PostgreSQL plugin provides a feature that helps users to manage the log rotation for both debug and error logs.

Delphix users can configure the logging mechanism by modifying the parameters defined in the dlpx_pg_logrotate.conf file that gets created or is already available within the log directory. This configuration file is located at <DLPX_TOOLKIT_PATH>/postgres/logs/dlpx_pg_logrotate.conf

This configuration handles the following parameters:

Setting Maximum Size 

Delphix users can set the parameter MAX_FILE_SIZE_KB available in the dlpx_pg_logrotate.conf file to set the maximum size of the active log file in KB. Once this limit is reached, the plugin will rotate the log. The default/maximum value of this parameter is 10240 KB/10 MB. This parameter accepts only a positive integer value, such as 10240.

Setting Number of Log Files to Retention

Delphix users can set a retention number for both debug and error logs using the parameters NUM_OF_FILES_TO_KEEP_DEBUG and NUM_OF_FILES_TO_KEEP_ERROR, respectively. The default value of these parameters is 50. That means, the maximum number of rotated log files that will be retained are 50 files and each file should be of a maximum size as defined in the above MAX_FILE_SIZE_KB parameter. If the number of files exceeds this value, then the old files will be deleted in a FIFO order.