Doc: Outline REPLICATION before SUPERUSER privilege
authorMichael Paquier
Tue, 5 May 2020 05:16:01 +0000 (14:16 +0900)
committerMichael Paquier
Tue, 5 May 2020 05:16:01 +0000 (14:16 +0900)
The following docs are updated:
- High-availaility section
- pg_basebackup
- pg_receivewal

Per the principle of least privilege, we want to encourage users to
interact with those areas using roles that have replication rights, but
superusers were mentioned first.

Author: Daniel Gustafsson
Reviewed-by: Fujii Masao, Michael Paquier
Discussion: https://postgr.es/m/ECEBD212-7101-41EB-84F3-2F356E4B6401@yesql.se

doc/src/sgml/high-availability.sgml
doc/src/sgml/ref/pg_basebackup.sgml
doc/src/sgml/ref/pg_receivewal.sgml

index 52e47379cc712c22530e94ca2e7b61913dc51766..8862f84412e3b0c059781379bbd9f1392aa4c246 100644 (file)
@@ -827,12 +827,14 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r'
      It is very important that the access privileges for replication be set up
      so that only trusted users can read the WAL stream, because it is
      easy to extract privileged information from it.  Standby servers must
-     authenticate to the primary as a superuser or an account that has the
-     REPLICATION privilege. It is recommended to create a
-     dedicated user account with REPLICATION and LOGIN
-     privileges for replication. While REPLICATION privilege gives
-     very high permissions, it does not allow the user to modify any data on
-     the primary system, which the SUPERUSER privilege does.
+     authenticate to the primary as an account that has the
+     REPLICATION privilege or a superuser. It is
+     recommended to create a dedicated user account with
+     REPLICATION and LOGIN
+     privileges for replication. While REPLICATION
+     privilege gives very high permissions, it does not allow the user to
+     modify any data on the primary system, which the
+     SUPERUSER privilege does.
     
 
     
index 01ce44ee22077ae4e698bcf3744446b304872979..12fadabfb866fa084154b069fd64194b99f41874 100644 (file)
@@ -51,8 +51,8 @@ PostgreSQL documentation
   
    The backup is made over a regular PostgreSQL
    connection, and uses the replication protocol. The connection must be made
-   with a superuser or a user having REPLICATION
-   permissions (see ),
+   with a user having REPLICATION permissions
+   (see ) or a superuser,
    and pg_hba.conf must explicitly permit the replication
    connection. The server must also be configured
    with  set high enough to leave at least
index febfc0ba135a90ec066f9a83a8b16cf96a309f85..73431bfc052be59c50db57fbd94e57252581634d 100644 (file)
@@ -68,12 +68,13 @@ PostgreSQL documentation
   
    The write-ahead log is streamed over a regular
    PostgreSQL connection and uses the replication
-   protocol. The connection must be made with a superuser or a user
-   having REPLICATION permissions (see
-   ), and pg_hba.conf
-   must permit the replication connection. The server must also be
-   configured with  set high enough to
-   leave at least one session available for the stream.
+   protocol. The connection must be made with a user having 
+   REPLICATION permissions (see
+   ) or a superuser, and
+   pg_hba.conf must permit the replication connection.
+   The server must also be configured with
+    set high enough to leave at least
+   one session available for the stream.