diff options
Diffstat (limited to 'doc/src/sgml')
-rw-r--r-- | doc/src/sgml/catalogs.sgml | 32 | ||||
-rw-r--r-- | doc/src/sgml/ref/alter_database.sgml | 29 | ||||
-rw-r--r-- | doc/src/sgml/ref/alter_role.sgml | 4 | ||||
-rw-r--r-- | doc/src/sgml/ref/alter_user.sgml | 3 | ||||
-rw-r--r-- | doc/src/sgml/ref/create_database.sgml | 22 | ||||
-rw-r--r-- | doc/src/sgml/ref/create_role.sgml | 20 | ||||
-rw-r--r-- | doc/src/sgml/ref/create_user.sgml | 3 |
7 files changed, 102 insertions, 11 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 0c8ed68195d..d8ec4f9f658 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1,6 +1,6 @@ <!-- Documentation of the system catalogs, directed toward PostgreSQL developers - $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.109 2005/07/26 16:38:25 tgl Exp $ + $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.110 2005/07/31 17:19:16 tgl Exp $ --> <chapter id="catalogs"> @@ -1019,6 +1019,16 @@ </row> <row> + <entry><structfield>rolconnlimit</structfield></entry> + <entry><type>int4</type></entry> + <entry></entry> + <entry> + For roles that can log in, this sets maximum number of concurrent + connections this role can make. -1 means no limit. + </entry> + </row> + + <row> <entry><structfield>rolpassword</structfield></entry> <entry><type>text</type></entry> <entry></entry> @@ -1922,6 +1932,16 @@ </row> <row> + <entry><structfield>datconnlimit</structfield></entry> + <entry><type>int4</type></entry> + <entry></entry> + <entry> + Sets maximum number of concurrent connections that can be made + to this database. -1 means no limit. + </entry> + </row> + + <row> <entry><structfield>datlastsysoid</structfield></entry> <entry><type>oid</type></entry> <entry></entry> @@ -4812,6 +4832,16 @@ </row> <row> + <entry><structfield>rolconnlimit</structfield></entry> + <entry><type>int4</type></entry> + <entry></entry> + <entry> + For roles that can log in, this sets maximum number of concurrent + connections this role can make. -1 means no limit. + </entry> + </row> + + <row> <entry><structfield>rolpassword</structfield></entry> <entry><type>text</type></entry> <entry></entry> diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml index c209308716a..03333d3d99b 100644 --- a/doc/src/sgml/ref/alter_database.sgml +++ b/doc/src/sgml/ref/alter_database.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.15 2005/01/05 14:22:39 petere Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.16 2005/07/31 17:19:16 tgl Exp $ PostgreSQL documentation --> @@ -20,6 +20,12 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> +ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] <replaceable class="PARAMETER">option</replaceable> [ ... ] ] + +where <replaceable class="PARAMETER">option</replaceable> can be: + + CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable> + ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> SET <replaceable>parameter</replaceable> { TO | = } { <replaceable>value</replaceable> | DEFAULT } ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> RESET <replaceable>parameter</replaceable> @@ -38,7 +44,12 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> OWNER TO <repla </para> <para> - The first two forms change the session default for a run-time + The first form changes certain per-database settings. (See below for + details.) Only the database owner or a superuser can change these settings. + </para> + + <para> + The second and third forms change the session default for a run-time configuration variable for a <productname>PostgreSQL</productname> database. Whenever a new session is subsequently started in that database, the specified value becomes the session default value. @@ -51,7 +62,7 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> OWNER TO <repla </para> <para> - The third form changes the name of the database. Only the database + The fourth form changes the name of the database. Only the database owner or a superuser can rename a database; non-superuser owners must also have the <literal>CREATEDB</literal> privilege. The current database cannot @@ -60,7 +71,7 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> OWNER TO <repla </para> <para> - The fourth form changes the owner of the database. Only a superuser + The fifth form changes the owner of the database. Only a superuser can change the database's owner. </para> </refsect1> @@ -79,6 +90,16 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> OWNER TO <repla </varlistentry> <varlistentry> + <term><replaceable class="parameter">connlimit</replaceable></term> + <listitem> + <para> + How many concurrent connections can be made + to this database. -1 means no limit. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><replaceable>parameter</replaceable></term> <term><replaceable>value</replaceable></term> <listitem> diff --git a/doc/src/sgml/ref/alter_role.sgml b/doc/src/sgml/ref/alter_role.sgml index 3e87cf01763..7ebd8014f29 100644 --- a/doc/src/sgml/ref/alter_role.sgml +++ b/doc/src/sgml/ref/alter_role.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.1 2005/07/26 23:24:02 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.2 2005/07/31 17:19:17 tgl Exp $ PostgreSQL documentation --> @@ -30,6 +30,7 @@ where <replaceable class="PARAMETER">option</replaceable> can be: | CREATEUSER | NOCREATEUSER | INHERIT | NOINHERIT | LOGIN | NOLOGIN + | CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable> | [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<replaceable class="PARAMETER">password</replaceable>' | VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>' @@ -118,6 +119,7 @@ ALTER ROLE <replaceable class="PARAMETER">name</replaceable> RESET <replaceable> <term><literal>NOINHERIT</literal></term> <term><literal>LOGIN</literal></term> <term><literal>NOLOGIN</literal></term> + <term><literal>CONNECTION LIMIT</literal> <replaceable class="parameter">connlimit</replaceable></term> <term><literal>PASSWORD</> <replaceable class="parameter">password</replaceable></term> <term><literal>ENCRYPTED</></term> <term><literal>UNENCRYPTED</></term> diff --git a/doc/src/sgml/ref/alter_user.sgml b/doc/src/sgml/ref/alter_user.sgml index 2844a63d083..d5dc3f1fca3 100644 --- a/doc/src/sgml/ref/alter_user.sgml +++ b/doc/src/sgml/ref/alter_user.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/alter_user.sgml,v 1.38 2005/07/26 23:24:02 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/alter_user.sgml,v 1.39 2005/07/31 17:19:17 tgl Exp $ PostgreSQL documentation --> @@ -30,6 +30,7 @@ where <replaceable class="PARAMETER">option</replaceable> can be: | CREATEUSER | NOCREATEUSER | INHERIT | NOINHERIT | LOGIN | NOLOGIN + | CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable> | [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<replaceable class="PARAMETER">password</replaceable>' | VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>' diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml index edb98b784b9..b4bd2d57398 100644 --- a/doc/src/sgml/ref/create_database.sgml +++ b/doc/src/sgml/ref/create_database.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/create_database.sgml,v 1.43 2004/10/29 03:17:22 neilc Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/create_database.sgml,v 1.44 2005/07/31 17:19:17 tgl Exp $ PostgreSQL documentation --> @@ -24,7 +24,8 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] [ OWNER [=] <replaceable class="parameter">dbowner</replaceable> ] [ TEMPLATE [=] <replaceable class="parameter">template</replaceable> ] [ ENCODING [=] <replaceable class="parameter">encoding</replaceable> ] - [ TABLESPACE [=] <replaceable class="parameter">tablespace</replaceable> ] ] + [ TABLESPACE [=] <replaceable class="parameter">tablespace</replaceable> ] + [ CONNECTION LIMIT [=] <replaceable class="parameter">connlimit</replaceable> ] ] </synopsis> </refsynopsisdiv> @@ -123,6 +124,16 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> </para> </listitem> </varlistentry> + + <varlistentry> + <term><replaceable class="parameter">connlimit</replaceable></term> + <listitem> + <para> + How many concurrent connections can be made + to this database. -1 (the default) means no limit. + </para> + </listitem> + </varlistentry> </variablelist> <para> @@ -161,6 +172,13 @@ CREATE DATABASE <replaceable class="PARAMETER">name</replaceable> We recommend that databases used as templates be treated as read-only. See <xref linkend="manage-ag-templatedbs"> for more information. </para> + + <para> + The <literal>CONNECTION LIMIT</> option is only enforced approximately; + if two new sessions start at about the same time when just one + connection <quote>slot</> remains for the database, it is possible that + both will fail. Also, the limit is not enforced against superusers. + </para> </refsect1> <refsect1> diff --git a/doc/src/sgml/ref/create_role.sgml b/doc/src/sgml/ref/create_role.sgml index 598888528fb..4cff62a6ec6 100644 --- a/doc/src/sgml/ref/create_role.sgml +++ b/doc/src/sgml/ref/create_role.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/create_role.sgml,v 1.1 2005/07/26 23:24:02 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/create_role.sgml,v 1.2 2005/07/31 17:19:17 tgl Exp $ PostgreSQL documentation --> @@ -30,6 +30,7 @@ where <replaceable class="PARAMETER">option</replaceable> can be: | CREATEUSER | NOCREATEUSER | INHERIT | NOINHERIT | LOGIN | NOLOGIN + | CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable> | [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<replaceable class="PARAMETER">password</replaceable>' | VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>' | IN ROLE <replaceable class="PARAMETER">rolename</replaceable> [, ...] @@ -173,6 +174,16 @@ where <replaceable class="PARAMETER">option</replaceable> can be: </varlistentry> <varlistentry> + <term><literal>CONNECTION LIMIT</literal> <replaceable class="parameter">connlimit</replaceable></term> + <listitem> + <para> + If role can log in, this specifies how many concurrent connections + the role can make. -1 (the default) means no limit. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><literal>PASSWORD</> <replaceable class="parameter">password</replaceable></term> <listitem> <para> @@ -327,6 +338,13 @@ where <replaceable class="PARAMETER">option</replaceable> can be: the same functionality as <command>CREATE ROLE</command> (in fact, it calls this command) but can be run from the command shell. </para> + + <para> + The <literal>CONNECTION LIMIT</> option is only enforced approximately; + if two new sessions start at about the same time when just one + connection <quote>slot</> remains for the role, it is possible that + both will fail. Also, the limit is never enforced for superusers. + </para> </refsect1> <refsect1> diff --git a/doc/src/sgml/ref/create_user.sgml b/doc/src/sgml/ref/create_user.sgml index 68d37bbd86d..44d52cd779a 100644 --- a/doc/src/sgml/ref/create_user.sgml +++ b/doc/src/sgml/ref/create_user.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/create_user.sgml,v 1.37 2005/07/26 23:24:02 tgl Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/create_user.sgml,v 1.38 2005/07/31 17:19:17 tgl Exp $ PostgreSQL documentation --> @@ -30,6 +30,7 @@ where <replaceable class="PARAMETER">option</replaceable> can be: | CREATEUSER | NOCREATEUSER | INHERIT | NOINHERIT | LOGIN | NOLOGIN + | CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable> | [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<replaceable class="PARAMETER">password</replaceable>' | VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>' | IN ROLE <replaceable class="PARAMETER">rolename</replaceable> [, ...] |