Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 342727

Summary: Postgresql 8.4.5 Init script/Conf script combination is faulty
Product: Gentoo Linux Reporter: Adam Jorgensen <adam.jorgensen.za>
Component: [OLD] ServerAssignee: PgSQL Bugs <pgsql-bugs>
Status: RESOLVED INVALID    
Severity: normal CC: joost.ruis
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Adam Jorgensen 2010-10-26 09:03:44 UTC
It seems that the init.d and conf.d scripts for 8.4.5 have a slight issue.

Line 136 of the init.d script is as follows:

 -c "env PGDATA=\"${PGDATA}\" PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} /usr/lib/postgresql-8.4/bin/pg_ctl start ${WAIT_FOR_START} -t ${START_TIMEOUT} -s -o '--silent-mode=true ${PGOPTS}'"

However, in the conf.d script the PGPORT variable is broken as tt is commented out. This causes PGPORT to be set to "" which then overrides the setting in the postgresql.conf file and causes the server to fail to start with the message:


FATAL:  invalid value for parameter "port": ""


Reproducible: Always

Steps to Reproduce:
1. Start postgresql using the init.d script

Actual Results:  
/etc/init.d/postgresql-8.4 start
 * Caching service dependencies ...                                                                                                                                                         [ ok ]
 * Starting PostgreSQL ...
FATAL:  invalid value for parameter "port": ""

could not start server                                                                                                                                                                      [ !! ]
 * ERROR: postgresql-8.4 failed to start


Expected Results:  
/etc/init.d/postgresql-8.4 start
 * Caching service dependencies ...                                                                                                                                                         [ ok ]
 * Starting PostgreSQL ...      

I am running Sabayon but the mantainers told me to file the bug with gentoo.
Comment 1 Joost Ruis 2010-10-26 09:29:35 UTC
Have to mark it invalid, sorry for the noise.

The conf.d file we ship does not have PGPORT commented out in the conf.d file.
This has to be some user error.