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

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

From
david.peyrieres@meteo.fr
Date:
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

From
Ashesh Vashi
Date:
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:      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

From
"david.peyrieres"
Date:
<meta content=3D"text/html;charset=3DUTF-8" http-equiv=3D"Content-Type"=
>


Hi,
with rpm.


Ashesh Vashi a =C3=A9crit=C2=A0:
<blockquote
 cite=3D"mid:CAG7mmowVVHR0hgo7+VPSLqjK1xMVhA657voMHcHDxEzM+dZgqg@mail.gma=
il.com"
 type=3D"cite">On Thu, Oct 11, 2012 at 2:59 PM, <<a
 moz-do-not-send=3D"true" href=3D"mailto:david.peyrieres@meteo.fr"
 target=3D"_blank">david.peyrieres@meteo.fr> wrote:

  <blockquote class=3D"gmail_quote"
 style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt =
0.8ex; padding-left: 1ex;">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=A0<a moz-do-not-send=3D"true"
 href=3D"mailto:david.peyrieres@meteo.fr">david.peyrieres@meteo.fr<br=
>
PostgreSQL version: 9.1.4
Operating system: =C2=A0 Red Hat
Description:

  Hi David,


  How did you install postgresql?

  <span
 style=3D"font-size: 13.3px; font-family: Verdana,Arial,Helvetica,sans-se=
rif;"><span
 style=3D"font-size: x-small;"><span
 style=3D"font-family: 'courier new',monospace;">--<span
 style=3D"font-style: italic; font-family: 'courier new',monospace;"><spa=
n
 style=3D"font-size: small;">
  <span
 style=3D"font-size: 13.3px; font-family: Verdana,Arial,Helvetica,sans-se=
rif;">

  <span
 style=3D"font-family: 'courier new',monospace;"><span
 style=3D"font-style: italic; font-family: 'courier new',monospace;"><spa=
n
 style=3D"font-size: small;">Thanks & Regards,<br
 style=3D"font-style: italic; font-family: 'courier new',monospace;">
  <span
 style=3D"font-style: italic; font-family: 'courier new',monospace; font-=
size: small;">Ashesh
Vashi


  <blockquote class=3D"gmail_quote"
 style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt =
0.8ex; padding-left: 1ex;">
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 (<a moz-do-not-send=3D"true"
 href=3D"mailto:pgsql-bugs@postgresql.org">pgsql-bugs@postgresql.org)=

To make changes to your subscription:
    <a moz-do-not-send=3D"true"
 href=3D"http://www.postgresql.org/mailpref/pgsql-bugs" target=3D"_blank"=
>http://www.postgresql.org/mailpref/pgsql-bugs





--




<link rel=3D"File-List" href=3D"./signature_david_MF_fichiers/filelist.xm=
l">


  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



<!--
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
    {mso-style-parent:"";
    margin:0cm;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    mso-fareast-font-family:"Times New Roman";
    color:black;}
a:link, span.MsoHyperlink
    {color:blue;}
a:visited, span.MsoHyperlinkFollowed
    {color:blue;}
@page Section1
    {size:595.3pt 841.9pt;
    margin:70.85pt 70.85pt 70.85pt 70.85pt;
    mso-header-margin:35.4pt;
    mso-footer-margin:35.4pt;
    mso-paper-source:0;}
div.Section1
    {page:Section1;}
-->








<span
 style=3D"font-size: 10pt; font-family: Arial; color: rgb(0, 28, 77);">Da=
vid
PEYRIERES
<span
 style=3D"font-size: 7.5pt; font-family: Arial; color: rgb(0, 28, 77);">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
<span
 style=3D"font-size: 10pt; font-family: Arial; color: rgb(0, 28, 77);"><a
 href=3D"mailto:david.peyrieres@meteo.fr">david.peyrieres@meteo.fr<br=
>

METEO FRANCE<span
 style=3D"font-family: Arial; color: rgb(0, 28, 77);"> <span
 style=3D"font-size: 10pt; font-family: Arial; color: rgb(0, 28, 77);"><b=
r>
www.meteo.fr <span
 style=3D"font-size: 7.5pt; font-family: Arial; color: rgb(0, 28, 77);"><=
br>
42 avenue Gustave Coriolis
31057 TOULOUSE C=C3=A9dex

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

From
John R Pierce
Date:
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/<samename> 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

From
Devrim GÜNDÜZ
Date:
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