It's kind of strange that if you start your PostgreSQL journey by reading
our instructions, you get nothing useful about installing PostgreSQL from
binary packages other than "go ask somebody else about it". Yet we have
pretty good step by step instructions on our *website* for it.

Attached patch adds a chapter to the docs about installing from binaries,
and refers those users to the website download instructions (and updates
the Windows instructions to include an actual link to the website).

It also adds mention of it in a few other places - -there are probably more
that could use some help with that in the future. But I've seen a lot of
people get confused by our documentation assuming everything is from source
when it comes to initdb and pg_ctl that I think it's worth specially
mentioning it there.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/ <http://www.hagander.net/>
 Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>
commit a8321c6fff84c2a6be887b824ac090c49f724f55
Author: Magnus Hagander <mag...@hagander.net>
Date:   Wed Jul 15 13:12:28 2020 +0200

    Expand installation documentation to cover binary installations

diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml
index 64b5da0070..463bdfd29c 100644
--- a/doc/src/sgml/filelist.sgml
+++ b/doc/src/sgml/filelist.sgml
@@ -36,6 +36,7 @@
 <!ENTITY client-auth   SYSTEM "client-auth.sgml">
 <!ENTITY diskusage     SYSTEM "diskusage.sgml">
 <!ENTITY high-availability      SYSTEM "high-availability.sgml">
+<!ENTITY installbin    SYSTEM "install-binaries.sgml">
 <!ENTITY installation  SYSTEM "installation.sgml">
 <!ENTITY installw      SYSTEM "install-windows.sgml">
 <!ENTITY maintenance   SYSTEM "maintenance.sgml">
diff --git a/doc/src/sgml/install-binaries.sgml b/doc/src/sgml/install-binaries.sgml
new file mode 100644
index 0000000000..36405e74cc
--- /dev/null
+++ b/doc/src/sgml/install-binaries.sgml
@@ -0,0 +1,24 @@
+<!-- doc/src/sgml/install-binaries.sgml -->
+<chapter id="install-binaries">
+ <title>Installation from Binaries</title>
+
+ <indexterm>
+  <primary>installation</primary>
+  <secondary>binaries</secondary>
+ </indexterm>
+
+ <para>
+  <productname>PostgreSQL</productname> is available in the form of binary
+  packages for most common operating systems today. When available, this is
+  the recommended way to install PostgreSQL for users of the system. Building
+  from source (see <xref linkend="installation" />) is only recommended for
+  people developing <productname>PostgreSQL</productname> or extensions.
+ </para>
+
+ <para>
+  For an updated list of platforms providing binary packages, please visit
+  the Download section on the <productname>PostgreSQL</productname> website at
+  <ulink url="https://www.postgresql.org/download/";></ulink> and follow the
+  instructions for the specific platform.
+ </para>
+</chapter>
diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml
index e2b8a4de57..587707b79b 100644
--- a/doc/src/sgml/install-windows.sgml
+++ b/doc/src/sgml/install-windows.sgml
@@ -11,7 +11,8 @@
  <para>
   It is recommended that most users download the binary distribution for
   Windows, available as a graphical installer package
-  from the <productname>PostgreSQL</productname> website. Building from source
+  from the <productname>PostgreSQL</productname> website at
+  <ulink url="https://www.postgresql.org/download/";></ulink>. Building from source
   is only intended for people developing <productname>PostgreSQL</productname>
   or extensions.
  </para>
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index 552303e211..ce9bdb1297 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -21,7 +21,7 @@ documentation.  See standalone-profile.xsl for details.
   <productname>PostgreSQL</productname> using the source code
   distribution.  If you are installing a pre-packaged distribution,
   such as an RPM or Debian package, ignore this chapter
-  and read the packager's instructions instead.
+  and see <xref linkend="install-binaries" /> instead.
  </para>
 
  <para>
diff --git a/doc/src/sgml/postgres.sgml b/doc/src/sgml/postgres.sgml
index c41ce9499b..730d5fdc34 100644
--- a/doc/src/sgml/postgres.sgml
+++ b/doc/src/sgml/postgres.sgml
@@ -154,6 +154,7 @@ break is not needed in a wider output rendering.
    </para>
   </partintro>
 
+  &installbin;
   &installation;
   &installw;
   &runtime;
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
index 937bb2e8ac..b1b06ed689 100644
--- a/doc/src/sgml/runtime.sgml
+++ b/doc/src/sgml/runtime.sgml
@@ -26,6 +26,11 @@
    binaries.
   </para>
 
+  <para>
+   When PostgreSQL is installed using binary packages, the user account is
+   normally created automatically by the package system.
+  </para>
+
   <para>
    To add a Unix user account to your system, look for a command
    <command>useradd</command> or <command>adduser</command>. The user
@@ -85,6 +90,14 @@
    described in the previous section.
   </para>
 
+  <tip>
+   <para>
+    When PostgreSQL is installed using binary packages, the initialization
+    process may be automatic or look slightly different. Refer to the
+    documentation for these packages for more information.
+   </para>
+  </tip>
+
   <tip>
    <para>
     As an alternative to the <option>-D</option> option, you can set
@@ -305,6 +318,15 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput>
  <sect1 id="server-start">
   <title>Starting the Database Server</title>
 
+  <tip>
+   <para>
+    When PostgreSQL is installed using binary packages, starting and stopping
+    of the system is normally integrated with the service management on the
+    platform. Refer to the documentation for the documentation for these
+    packages and the platform for more information.
+   </para>
+  </tip>
+
   <para>
    Before anyone can access the database, you must start the database
    server. The database server program is called

Reply via email to