pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #7596: Problem with /etc/init.d/postgresql.9.x file
5+ messages / 5 participants
[nested] [flat]

* BUG #7596: Problem with /etc/init.d/postgresql.9.x file
@ 2012-10-11 09:29  david.peyrieres@meteo.fr
  0 siblings, 3 replies; 5+ messages in thread

From: david.peyrieres@meteo.fr @ 2012-10-11 09:29 UTC (permalink / raw)
  To: pgsql-bugs

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.
 







^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #7596: Problem with /etc/init.d/postgresql.9.x file
@ 2012-10-11 09:32  Ashesh Vashi <ashesh.vashi@enterprisedb.com>
  parent: david.peyrieres@meteo.fr
  2 siblings, 1 reply; 5+ messages in thread

From: Ashesh Vashi @ 2012-10-11 09:32 UTC (permalink / raw)
  To: david.peyrieres@meteo.fr; +Cc: pgsql-bugs

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
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #7596: Problem with /etc/init.d/postgresql.9.x file
@ 2012-10-12 06:03  david.peyrieres <david.peyrieres@meteo.fr>
  parent: Ashesh Vashi <ashesh.vashi@enterprisedb.com>
  0 siblings, 0 replies; 5+ messages in thread

From: david.peyrieres @ 2012-10-12 06:03 UTC (permalink / raw)
  To: Ashesh Vashi <ashesh.vashi@enterprisedb.com>; +Cc: pgsql-bugs

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi, <br>
with rpm.<br>
</tt><br>
<br>
Ashesh Vashi a écrit :
<blockquote
 cite="mid:CAG7mmowVVHR0hgo7+VPSLqjK1xMVhA657voMHcHDxEzM+dZgqg@mail.gmail.com"
 type="cite">On Thu, Oct 11, 2012 at 2:59 PM, <span dir="ltr">&lt;<a
 moz-do-not-send="true" href="mailto:david.peyrieres@meteo.fr"
 target="_blank">david.peyrieres@meteo.fr</a>&gt;</span> wrote:<br>
  <div class="gmail_quote">
  <blockquote class="gmail_quote"
 style="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:<br>
    <br>
Bug reference:      7596<br>
Logged by:          David PEYRIERES<br>
Email address:      <a moz-do-not-send="true"
 href="mailto:david.peyrieres@meteo.fr">david.peyrieres@meteo.fr</a><br>
PostgreSQL version: 9.1.4<br>
Operating system:   Red Hat<br>
Description:<br>
  </blockquote>
  <div>Hi David,</div>
  <div><br>
  </div>
  <div>How did you install postgresql?</div>
  <br clear="all">
  <span
 style="font-size: 13.3px; font-family: Verdana,Arial,Helvetica,sans-serif;"><span
 style="font-size: x-small;"><span
 style="font-family: 'courier new',monospace;">--</span><span
 style="font-style: italic; font-family: 'courier new',monospace;"><span
 style="font-size: small;"></span></span></span></span><br>
  <div><span
 style="font-size: 13.3px; font-family: Verdana,Arial,Helvetica,sans-serif;">
  <div style="margin: 0pt 0pt 8px;">
  <p style="margin: 0pt;"><span style="font-size: x-small;"><span
 style="font-family: 'courier new',monospace;"></span><span
 style="font-style: italic; font-family: 'courier new',monospace;"><span
 style="font-size: small;">Thanks &amp; Regards,</span></span><br
 style="font-style: italic; font-family: 'courier new',monospace;">
  <span
 style="font-style: italic; font-family: 'courier new',monospace; font-size: small;">Ashesh
Vashi</span></span></p>
  </div>
  </span></div>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hello.<br>
I found a little bug in /etc/init.d/postgresql-9.x file (ok in 8.4 -
since<br>
9.x versions ?).<br>
In my case, I've 5 databases on same server. Each database is start/stop<br>
with this file 'service postgresql9.x start'.<br>
Unfortunately, it uses only same file for status "pidfile:<br>
/var/run/postmaster-9.2.pid".<br>
In my case and with this configuration, I have only one file for all<br>
databases.<br>
So, I've modified this file on all servers :<br>
    <br>
1 - pidfile="/var/run/${NAME}.pid<br>
    <br>
2 - and case test :<br>
....<br>
case "$1" in<br>
  ....<br>
 status)<br>
   status -p /var/run/postmaster-9.1.pid<br>
by<br>
   status -p $pidfile<br>
    <br>
    <br>
    <br>
Thanks for all.<br>
    <span class="HOEnZb"><font color="#888888"><br>
    <br>
    <br>
    <br>
    <br>
    <br>
--<br>
Sent via pgsql-bugs mailing list (<a moz-do-not-send="true"
 href="mailto:pgsql-bugs@postgresql.org">pgsql-bugs@postgresql.org</a>)<br>
To make changes to your subscription:<br>
    <a moz-do-not-send="true"
 href="http://www.postgresql.org/mailpref/pgsql-bugs"; target="_blank">http://www.postgresql.org/mailpref/pgsql-bugs</a><br;
    </font></span></blockquote>
  </div>
  <br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 9">
<meta name="Originator" content="Microsoft Word 9">
<link rel="File-List" href="./signature_david_MF_fichiers/filelist.xml">
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>david.peyrieres</o:Author>
  <o:LastAuthor>david.peyrieres</o:LastAuthor>
  <o:Revision>2</o:Revision>
  <o:TotalTime>1</o:TotalTime>
  <o:Created>2011-12-01T08:34:00Z</o:Created>
  <o:LastSaved>2011-12-01T08:35:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>48</o:Words>
  <o:Characters>275</o:Characters>
  <o:Company>Meteo France</o:Company>
  <o:Lines>2</o:Lines>
  <o:Paragraphs>1</o:Paragraphs>
  <o:CharactersWithSpaces>337</o:CharactersWithSpaces>
  <o:Version>9.6926</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:HyphenationZone>21</w:HyphenationZone>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* 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;}
-->
</style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal"><br>
<b><span
 style="font-size: 10pt; font-family: Arial; color: rgb(0, 28, 77);">David
PEYRIERES<br>
</span></b><span
 style="font-size: 7.5pt; font-family: Arial; color: rgb(0, 28, 77);">Direction
des Sytèmes d'Information<br>
Division Etudes et Développements<br>
<br>
Tel :   +33 (0)5.61.07.83.36 <br>
Fax :  +33 (0)5.61.07.81.09 <br>
</span><span
 style="font-size: 10pt; font-family: Arial; color: rgb(0, 28, 77);"><a
 href="mailto:david.peyrieres@meteo.fr">david.peyrieres@meteo.fr</a><br>
</span><b><span style="font-family: Arial; color: rgb(0, 28, 77);"><br>
METEO FRANCE</span></b><span
 style="font-family: Arial; color: rgb(0, 28, 77);"> </span><span
 style="font-size: 10pt; font-family: Arial; color: rgb(0, 28, 77);"><br>
<a href="http://www.meteo.fr/">www.meteo.fr</a; </span><span
 style="font-size: 7.5pt; font-family: Arial; color: rgb(0, 28, 77);"><br>
42 avenue Gustave Coriolis <br>
31057 TOULOUSE Cédex </span></p>
</div>
</div>
</body>
</html>




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #7596: Problem with /etc/init.d/postgresql.9.x file
@ 2012-10-12 06:49  John R Pierce <pierce@hogranch.com>
  parent: david.peyrieres@meteo.fr
  2 siblings, 0 replies; 5+ messages in thread

From: John R Pierce @ 2012-10-12 06:49 UTC (permalink / raw)
  To: pgsql-bugs

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





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #7596: Problem with /etc/init.d/postgresql.9.x file
@ 2013-05-03 19:32  Devrim GÜNDÜZ <devrim@gunduz.org>
  parent: david.peyrieres@meteo.fr
  2 siblings, 0 replies; 5+ messages in thread

From: Devrim GÜNDÜZ @ 2013-05-03 19:32 UTC (permalink / raw)
  To: david.peyrieres@meteo.fr; +Cc: pgsql-bugs


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

Attachments:

  signature.asc (application/pgp-signature, 197B) download

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2013-05-03 19:32 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-10-11 09:29 BUG #7596: Problem with /etc/init.d/postgresql.9.x file david.peyrieres@meteo.fr
2012-10-11 09:32 ` Ashesh Vashi <ashesh.vashi@enterprisedb.com>
2012-10-12 06:03   ` david.peyrieres <david.peyrieres@meteo.fr>
2012-10-12 06:49 ` John R Pierce <pierce@hogranch.com>
2013-05-03 19:32 ` Devrim GÜNDÜZ <devrim@gunduz.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox