Book Image

PostgreSQL for Data Architects

By : Jayadevan M
Book Image

PostgreSQL for Data Architects

By: Jayadevan M

Overview of this book

Table of Contents (19 chapters)
PostgreSQL for Data Architects
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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     0:00  \_ postgres: writer process     
 3191 ?        Ss     0:00  \_ postgres: wal writer process   
 3192 ?        Ss     0:00  \_ postgres: autovacuum launcher process...