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

Поиск
Список
Период
Сортировка
Искать

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

От:
david.peyrieres@meteo.fr
Дата:
The following bug has been logged on the website:

Bug reference:      7596
Logged by:          David PEYRIERES
Email address:      david.peyrieres@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=3D"/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.
 =

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

От:
Ashesh Vashi <ashesh.vashi@enterprisedb.com>
Дата:
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.peyrieres@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
>

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

От:
"david.peyrieres" <david.peyrieres@meteo.fr>
Дата:



Hi, 
with rpm.


Ashesh Vashi a =C3=A9crit=C2=A0:
On Thu, Oct 11, 2012 at 2:59 PM, <david.peyrieres@meteo.fr> wrote:
The following bug has been logged on the website: Bug reference: =C2=A0 =C2=A0 =C2=A07596 Logged by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0David PEYRIERES Email address: =C2=A0 =C2=A0 =C2=A0david.peyrieres@meteo.fr PostgreSQL version: 9.1.4 Operating system: =C2=A0 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<= br> 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=3D"/var/run/${NAME}.pid 2 - and case test : .... case "$1" in =C2=A0 .... =C2=A0status) =C2=A0 =C2=A0status -p /var/run/postmaster-9.1.pid by =C2=A0 =C2=A0status -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 david.peyrieres 2 1 2011-12-01T08:34:00Z 2011-12-01T08:35:00Z 1 48 275 Meteo France 2 1 337 9.6926 21 Da= vid PEYRIERES D= irection des Syt=C3=A8mes d'Information Division Etudes et D=C3=A9veloppements Tel : =C2=A0 +33 (0)5.61.07.83.36 Fax :=C2=A0 +33 (0)5.61.07.81.09 david.peyrieres@meteo.fr METEO FRANCE www.meteo.fr <= br> 42 avenue Gustave Coriolis 31057 TOULOUSE C=C3=A9dex

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

От:
John R Pierce <pierce@hogranch.com>
Дата:
On 10/11/12 2:29 AM, david.peyrieres@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 pierce                            N 37, W 122
santa cruz ca                         mid-left coast

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

От:
Devrim GÜNDÜZ <devrim@gunduz.org>
Дата:

Hi,

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

Regards, Devrim

On Thu, 2012-10-11 at 09:29 +0000, david.peyrieres@meteo.fr wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      7596
> Logged by:          David PEYRIERES
> Email address:      david.peyrieres@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
FAQ