aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2011-01-05 14:24:17 +0100
committerMagnus Hagander <magnus@hagander.net>2011-01-05 14:24:17 +0100
commit66a8a0428db046d725b88c8b956384c2a4b4a11c (patch)
treef04c0d6946f05f4bc15371c74ac5f8337dc9b50f /doc/src
parent3302334b48e2be6eb2c01dcf500363dbd4f22e59 (diff)
downloadpostgresql-66a8a0428db046d725b88c8b956384c2a4b4a11c.tar.gz
postgresql-66a8a0428db046d725b88c8b956384c2a4b4a11c.zip
Give superusers REPLIACTION permission by default
This can be overriden by using NOREPLICATION on the CREATE ROLE statement, but by default they will have it, making it backwards compatible and "less surprising" (given that superusers normally override all checks).
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/high-availability.sgml6
-rw-r--r--doc/src/sgml/ref/create_role.sgml3
-rw-r--r--doc/src/sgml/user-manag.sgml11
3 files changed, 12 insertions, 8 deletions
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index 2c24fd9c139..b1ec461f53e 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -805,9 +805,9 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r'
<note>
<para>
It is recommended that a dedicated user account is used for replication.
- While it is possible to add the <literal>REPLICATION</> privilege to
- a superuser account for the purporses of replication, this is not
- recommended. While <literal>REPLICATION</> privilege gives very high
+ While the <literal>REPLICATION</> privilege is granted to superuser
+ accounts by default, it is not recommended to use superuser accounts
+ for replication. While <literal>REPLICATION</> privilege gives very high
permissions, it does not allow the user to modify any data on the
primary system, which the <literal>SUPERUSER</> privilege does.
</para>
diff --git a/doc/src/sgml/ref/create_role.sgml b/doc/src/sgml/ref/create_role.sgml
index 7cc7f149fdc..43bec5d8e13 100644
--- a/doc/src/sgml/ref/create_role.sgml
+++ b/doc/src/sgml/ref/create_role.sgml
@@ -185,7 +185,8 @@ CREATE ROLE <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] <replac
A role having the <literal>REPLICATION</> attribute is a very
highly privileged role, and should only be used on roles actually
used for replication. If not specified,
- <literal>NOREPLICATION</literal> is the default.
+ <literal>NOREPLICATION</literal> is the default for all roles except
+ superusers.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml
index 08b3fb7dc42..2830aec49ca 100644
--- a/doc/src/sgml/user-manag.sgml
+++ b/doc/src/sgml/user-manag.sgml
@@ -175,7 +175,11 @@ CREATE USER <replaceable>name</replaceable>;
to do most of your work as a role that is not a superuser.
To create a new database superuser, use <literal>CREATE ROLE
<replaceable>name</replaceable> SUPERUSER</literal>. You must do
- this as a role that is already a superuser.
+ this as a role that is already a superuser. Creating a superuser
+ will by default also grant permissions to initiate streaming
+ replication. For increased security this can be disallowed using
+ <literal>CREATE ROLE <replaceable>name</replaceable> SUPERUSER
+ NOREPLICATION</literal>.
</para>
</listitem>
</varlistentry>
@@ -214,9 +218,8 @@ CREATE USER <replaceable>name</replaceable>;
<listitem>
<para>
A role must explicitly be given permission to initiate streaming
- replication (superusers do not bypass this check). A role used
- for streaming replication must always have <literal>LOGIN</>
- permission as well. To create such a role, use
+ replication. A role used for streaming replication must always
+ have <literal>LOGIN</> permission as well. To create such a role, use
<literal>CREATE ROLE <replaceable>name</replaceable> REPLICATION
LOGIN</literal>.
</para>