The logging process

This is an optional process and the default setting is off. We have to set the logging_collector parameter to on to start this process:

cd $PGDATA

Edit the postgresql.conf file and make a few changes:

log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log'
log_min_duration_statement = 0

[postgres@MyCentOS 9.3]$ pg_ctl restart
waiting for server to shut down.... done
server stopped
server starting
[postgres@MyCentOS 9.3]$ ps f -U postgres
  PID TTY      STAT   TIME COMMAND
 2581 pts/2    S      0:00 -bash
 3201 pts/2    R+     0:00  \_ ps f -U postgres
 2218 pts/1    S+     0:00 -bash
 3186 pts/2    S      0:00 /usr/local/pgsql/bin/postgres
 3187 ?        Ss     0:00  \_ postgres: logger process     
 3189 ?        Ss     0:00  \_ postgres: checkpointer process   
 3190 ? Ss ...

Get PostgreSQL for Data Architects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.