Bug 76503 - SysV Init Scripts Not Reporting Error(s)
SysV Init Scripts Not Reporting Error(s)
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: postgresql (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-22 11:37 EDT by Need Real Name
Modified: 2013-07-02 22:59 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-23 23:34:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-10-22 11:37:44 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 
1.0.3705)

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:
Always

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

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 12:36:40 EST
Assigning to me.
Comment 2 Andrew Overholt 2003-03-12 17:56:25 EST
Reassigning.
Comment 3 Fernando Nasser 2003-03-14 19:24:37 EST
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
release.
Comment 4 Tom Lane 2005-01-23 23:34:28 EST
Done finally in PostgreSQL 8.0.

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