Skip site navigation (1) Skip section navigation (2)

Logging the starting and stopping of PostgreSQL

From: "Campbell, Lance" <lance(at)uiuc(dot)edu>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Logging the starting and stopping of PostgreSQL
Date: 2007-08-23 19:17:17
Message-ID: (view raw or whole thread)
Lists: pgsql-admin
I have a script that starts PostgreSQL as a service.  It uses the
following command to start the database:


$SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D '$PGDATA'
${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null


On my production server I use a slightly different command:


exec ${PGENGINE}/pg_ctl start  -D ${PGDATA}  -l ${PGLOG}


I noticed that the first command sends starting up info about PostgreSQL
to the log file specified by $PGLOG; while the second startup command
does not send anything to the log file.  What is the reason for this?  I
also have the same issue with shutting down.




Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois




pgsql-admin by date

Next:From: Campbell, LanceDate: 2007-08-23 19:38:08
Subject: Re: Installing Postgres
Previous:From: Tena SakaiDate: 2007-08-23 19:11:40
Subject: Re: tar, but not gnu tar

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group