Thread: Error in documentation

Error in documentation

From
Justin Clift
Date:
Hi guys,

Just noticed an error in the 7.1.1 developer docs.

In the Admin Guide, in chapter 3.3 "Starting the database server" it
says :

***

On Solaris, edit the file rc2.d to contain the following single line:

su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D
/usr/local/pgsql/data"

***

This is BADLY WRONG and won't work at all.

Instead the person installing PostgreSQL needs to create a startup
script as /etc/init.d/postgresql, then create a soft link from
/etc/rc3.d/S[00..99]postgresql that script.

The script though, can use the su command given above.

i.e.

echo 'su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D
/usr/local/pgsql/data"' > /etc/init.d/postgresql
chmod 744 /etc/init.d/postgresql
chown root:sys /etc/init.d/postgresql
ln -s /etc/init.d/postgresql /etc/rc3.d/S10postgresql

I haven't tried looking at the documentation .sgml source files and
creating a patch, but if you guys want me to, I guess I could figure it
out.

Regards and best wishes,

Justin Clift

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

Re: Error in documentation

From
Bruce Momjian
Date:
OK, I have applied the following patch to clean up the Solaris problems
you reported.


> Hi guys,
>
> Just noticed an error in the 7.1.1 developer docs.
>
> In the Admin Guide, in chapter 3.3 "Starting the database server" it
> says :
>
> ***
>
> On Solaris, edit the file rc2.d to contain the following single line:
>
> su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D
> /usr/local/pgsql/data"
>
> ***
>
> This is BADLY WRONG and won't work at all.
>
> Instead the person installing PostgreSQL needs to create a startup
> script as /etc/init.d/postgresql, then create a soft link from
> /etc/rc3.d/S[00..99]postgresql that script.
>
> The script though, can use the su command given above.
>
> i.e.
>
> echo 'su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D
> /usr/local/pgsql/data"' > /etc/init.d/postgresql
> chmod 744 /etc/init.d/postgresql
> chown root:sys /etc/init.d/postgresql
> ln -s /etc/init.d/postgresql /etc/rc3.d/S10postgresql
>
> I haven't tried looking at the documentation .sgml source files and
> creating a patch, but if you guys want me to, I guess I could figure it
> out.
>
> Regards and best wishes,
>
> Justin Clift
>
> --
> "My grandfather once told me that there are two kinds of people: those
> who work and those who take the credit. He told me to try to be in the
> first group; there was less competition there."
>      - Indira Gandhi
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: doc/src/sgml/runtime.sgml
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/runtime.sgml,v
retrieving revision 1.63
diff -c -r1.63 runtime.sgml
*** doc/src/sgml/runtime.sgml    2001/05/04 23:11:37    1.63
--- doc/src/sgml/runtime.sgml    2001/05/07 15:53:22
***************
*** 254,264 ****

      <listitem>
       <para>
!       On <productname>Solaris</productname>, edit the file
!       <filename>rc2.d</filename> to contain the following single line:
  <programlisting>
  su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgsql/data"
  </programlisting>
       </para>
      </listitem>
     </itemizedlist>
--- 254,267 ----

      <listitem>
       <para>
!       On <productname>Solaris</productname>, create a file called
!       <filename>/etc/init.d/postgresql</filename> to contain the following
!       single line:
  <programlisting>
  su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgsql/data"
  </programlisting>
+       Then, create a symlink to it in <filename>/etc/rc3.d</> as
+       <literal>S99postgresql</>.
       </para>
      </listitem>
     </itemizedlist>

Re: Error in documentation

From
Justin Clift
Date:
Hi Bruce,

Yep, that should work fine.  :-)

Regards and best wishes,

Justin Clift

Bruce Momjian wrote:
>
> OK, I have applied the following patch to clean up the Solaris problems
> you reported.
>
> > Hi guys,
> >
> > Just noticed an error in the 7.1.1 developer docs.
> >
> > In the Admin Guide, in chapter 3.3 "Starting the database server" it
> > says :
> >
> > ***
> >
> > On Solaris, edit the file rc2.d to contain the following single line:
> >
> > su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D
> > /usr/local/pgsql/data"
> >
> > ***
> >
> > This is BADLY WRONG and won't work at all.
> >
> > Instead the person installing PostgreSQL needs to create a startup
> > script as /etc/init.d/postgresql, then create a soft link from
> > /etc/rc3.d/S[00..99]postgresql that script.
> >
> > The script though, can use the su command given above.
> >
> > i.e.
> >
> > echo 'su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D
> > /usr/local/pgsql/data"' > /etc/init.d/postgresql
> > chmod 744 /etc/init.d/postgresql
> > chown root:sys /etc/init.d/postgresql
> > ln -s /etc/init.d/postgresql /etc/rc3.d/S10postgresql
> >
> > I haven't tried looking at the documentation .sgml source files and
> > creating a patch, but if you guys want me to, I guess I could figure it
> > out.
> >
> > Regards and best wishes,
> >
> > Justin Clift
> >
> > --
> > "My grandfather once told me that there are two kinds of people: those
> > who work and those who take the credit. He told me to try to be in the
> > first group; there was less competition there."
> >      - Indira Gandhi
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> >
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
>
>   ------------------------------------------------------------------------
> Index: doc/src/sgml/runtime.sgml
> ===================================================================
> RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/runtime.sgml,v
> retrieving revision 1.63
> diff -c -r1.63 runtime.sgml
> *** doc/src/sgml/runtime.sgml   2001/05/04 23:11:37     1.63
> --- doc/src/sgml/runtime.sgml   2001/05/07 15:53:22
> ***************
> *** 254,264 ****
>
>       <listitem>
>        <para>
> !       On <productname>Solaris</productname>, edit the file
> !       <filename>rc2.d</filename> to contain the following single line:
>   <programlisting>
>   su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgsql/data"
>   </programlisting>
>        </para>
>       </listitem>
>      </itemizedlist>
> --- 254,267 ----
>
>       <listitem>
>        <para>
> !       On <productname>Solaris</productname>, create a file called
> !       <filename>/etc/init.d/postgresql</filename> to contain the following
> !       single line:
>   <programlisting>
>   su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgsql/data"
>   </programlisting>
> +       Then, create a symlink to it in <filename>/etc/rc3.d</> as
> +       <literal>S99postgresql</>.
>        </para>
>       </listitem>
>      </itemizedlist>
>
>   ------------------------------------------------------------------------
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi