Re: [BUGS] BUG #7596: Problem with /etc/init.d/postgresql.9.x file

2013-05-03 Thread Devrim GÜNDÜZ

Hi,

For the archives: We fixed this problem in newer init scripts.

Regards, Devrim

On Thu, 2012-10-11 at 09:29 +, david.peyrie...@meteo.fr wrote:
> The following bug has been logged on the website:
> 
> Bug reference:  7596
> Logged by:  David PEYRIERES
> Email address:  david.peyrie...@meteo.fr
> PostgreSQL version: 9.1.4
> Operating system:   Red Hat
> Description:
> 
> Hello.
> I found a little bug in /etc/init.d/postgresql-9.x file (ok in 8.4 - since
> 9.x versions ?).
> In my case, I've 5 databases on same server. Each database is start/stop
> with this file 'service postgresql9.x start'.
> Unfortunately, it uses only same file for status "pidfile:
> /var/run/postmaster-9.2.pid".
> In my case and with this configuration, I have only one file for all
> databases. 
> So, I've modified this file on all servers : 
> 
> 1 - pidfile="/var/run/${NAME}.pid
> 
> 2 - and case test :
> 
> case "$1" in
>   
>  status)
>status -p /var/run/postmaster-9.1.pid
> by 
>status -p $pidfile
> 
> 
> 
> Thanks for all.
>  
> 
> 
> 
> 
> 


-- 
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz


signature.asc
Description: This is a digitally signed message part


Re: [BUGS] BUG #7596: Problem with /etc/init.d/postgresql.9.x file

2012-10-11 Thread John R Pierce

On 10/11/12 2:29 AM, david.peyrie...@meteo.fr wrote:

In my case, I've 5 databases on same server. Each database is start/stop
with this file 'service postgresql9.x start'.



one database 'cluster' (instance of the postmaster, with a corresponding 
$PGDATA directory) can have any number of databases associated with it, 
they all share the same PID file.


I'm not sure of ANY advantage of running multiple different instances of 
postgres for seperate databases.


the way the newer RHEL  init.d files are setup, if you DO want to run 
multiple copies, you create seperate init.d files, like postgresql-9.1a, 
postgresql-9.1b, etc, these can all be symlinks to the same 
postgresql-9.1 file.  you then create corresponding files in 
/etc/sysconfig/pgsql/ with PGDATA=/path/to/unique/pgdata  and 
PGPORT=54xx unique ports... like, as an example...



# cat /etc/sysconfig/pgsql/postgresql-9.0b
PGENGINE=/usr/pgsql-${PGMAJORVERSION}/bin
PGPORT=5433
PGDATA=/ssd/pgsql/${PGMAJORVERSION}/data
PGLOG=/ssd/pgsql/${PGMAJORVERSION}/pgstartup.log

# ls -la /etc/rc.d/init.d/postgresql-9.0b
lrwxrwxrwx 1 root root 14 Oct 23  2011 /etc/rc.d/init.d/postgresql-9.0b 
-> postgresql-9.0



by doing it this way, you're not editing any files that are under RPM 
package management, so you're not going to get bit during updates.






--
john r pierceN 37, W 122
santa cruz ca mid-left coast



--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #7596: Problem with /etc/init.d/postgresql.9.x file

2012-10-11 Thread david.peyrieres




Hi, 
with rpm.


Ashesh Vashi a écrit :
On Thu, Oct 11, 2012 at 2:59 PM,  wrote:
  
  The
following bug has been logged on the website:

Bug reference:      7596
Logged by:          David PEYRIERES
Email address:      david.peyrie...@meteo.fr
PostgreSQL version: 9.1.4
Operating system:   Red Hat
Description:
  
  Hi David,
  
  
  How did you install postgresql?
  
  --
  
  
  Thanks & Regards,
  Ashesh
Vashi
  
  
  
Hello.
I found a little bug in /etc/init.d/postgresql-9.x file (ok in 8.4 -
since
9.x versions ?).
In my case, I've 5 databases on same server. Each database is start/stop
with this file 'service postgresql9.x start'.
Unfortunately, it uses only same file for status "pidfile:
/var/run/postmaster-9.2.pid".
In my case and with this configuration, I have only one file for all
databases.
So, I've modified this file on all servers :

1 - pidfile="/var/run/${NAME}.pid

2 - and case test :

case "$1" in
  
 status)
   status -p /var/run/postmaster-9.1.pid
by
   status -p $pidfile



Thanks for all.






--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

  
  


-- 









David
PEYRIERES
Direction
des Sytèmes d'Information
Division Etudes et Développements

Tel :   +33 (0)5.61.07.83.36 
Fax :  +33 (0)5.61.07.81.09 
david.peyrie...@meteo.fr

METEO FRANCE 
www.meteo.fr 
42 avenue Gustave Coriolis 
31057 TOULOUSE Cédex 







Re: [BUGS] BUG #7596: Problem with /etc/init.d/postgresql.9.x file

2012-10-11 Thread Ashesh Vashi
On Thu, Oct 11, 2012 at 2:59 PM,  wrote:

> The following bug has been logged on the website:
>
> Bug reference:  7596
> Logged by:  David PEYRIERES
> Email address:  david.peyrie...@meteo.fr
> PostgreSQL version: 9.1.4
> Operating system:   Red Hat
> Description:
>
Hi David,

How did you install postgresql?

--

Thanks & Regards,
Ashesh Vashi

>
> Hello.
> I found a little bug in /etc/init.d/postgresql-9.x file (ok in 8.4 - since
> 9.x versions ?).
> In my case, I've 5 databases on same server. Each database is start/stop
> with this file 'service postgresql9.x start'.
> Unfortunately, it uses only same file for status "pidfile:
> /var/run/postmaster-9.2.pid".
> In my case and with this configuration, I have only one file for all
> databases.
> So, I've modified this file on all servers :
>
> 1 - pidfile="/var/run/${NAME}.pid
>
> 2 - and case test :
> 
> case "$1" in
>   
>  status)
>status -p /var/run/postmaster-9.1.pid
> by
>status -p $pidfile
>
>
>
> Thanks for all.
>
>
>
>
>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>


[BUGS] BUG #7596: Problem with /etc/init.d/postgresql.9.x file

2012-10-11 Thread david . peyrieres
The following bug has been logged on the website:

Bug reference:  7596
Logged by:  David PEYRIERES
Email address:  david.peyrie...@meteo.fr
PostgreSQL version: 9.1.4
Operating system:   Red Hat
Description:

Hello.
I found a little bug in /etc/init.d/postgresql-9.x file (ok in 8.4 - since
9.x versions ?).
In my case, I've 5 databases on same server. Each database is start/stop
with this file 'service postgresql9.x start'.
Unfortunately, it uses only same file for status "pidfile:
/var/run/postmaster-9.2.pid".
In my case and with this configuration, I have only one file for all
databases. 
So, I've modified this file on all servers : 

1 - pidfile="/var/run/${NAME}.pid

2 - and case test :

case "$1" in
  
 status)
   status -p /var/run/postmaster-9.1.pid
by 
   status -p $pidfile



Thanks for all.
 





-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs