Bug 76503 - SysV Init Scripts Not Reporting Error(s)
Summary: SysV Init Scripts Not Reporting Error(s)
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: postgresql (Show other bugs)
(Show other bugs)
Version: 8.0
Hardware: All Linux
Target Milestone: ---
Assignee: Tom Lane
QA Contact:
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2002-10-22 15:37 UTC by Need Real Name
Modified: 2013-07-03 02:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-01-24 04:34:28 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Need Real Name 2002-10-22 15:37:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 

Description of problem:
Starting postgres with the following line below eats critical error 
information. We has a stale PID file and the error was not logged anywhere and 
the Starting Postgres: Failed message doesn't really tell you a lot.

su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -D $PGDATA -
p /usr/bin/postmaster start  > /dev/null 2>&1" < /dev/null

Version-Release number of selected component (if applicable): At least since 
Redhat 7.2

How reproducible:

Steps to Reproduce:
1. Create a PID File for Postgres
2. Start Postgres and it Fails to start with no further error message

Expected Results:  The warning about the PID file and shared mem handle should 
have been displayed and not sent to /dev/null

Additional info:

Proposed fix would be a postgres-console.log in /var/log owned by 
postgres.postgres and change the init script to reflect it as such.

su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -D $PGDATA -
p /usr/bin/postmaster start  > /var/log/postgresql-console.log 2>&1" < /dev/null

Comment 1 Andrew Overholt 2003-03-04 17:36:40 UTC
Assigning to me.

Comment 2 Andrew Overholt 2003-03-12 22:56:25 UTC

Comment 3 Fernando Nasser 2003-03-15 00:24:37 UTC
Eric, you are absolutely right -- we must save the log somewhere.  

The fix is not that simple because the PostgreSQL backend generates an excess of
messages that would eat up your disk space.  We need log rotation but the
backend does not respond to any signal for that purpose.  We will have to pipe
the output through a program that does that.

We are working on that and in the future you will be able to inspect the log.

The situation with the stale pid file is another bug, already reported (#71295),
as the script should be able to recover from that.  It will be fixed in a future

Comment 4 Tom Lane 2005-01-24 04:34:28 UTC
Done finally in PostgreSQL 8.0.

Note You need to log in before you can comment on or make changes to this bug.