diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-05-02 10:34:49 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-05-02 10:34:49 -0400 |
commit | a35ac7c4e3ccf93876b4652d94a418fc82e0eda3 (patch) | |
tree | 58d0dda69623ae02468a86870e520c3a7fdae663 /doc/src | |
parent | 9a0d2008c3fe82c9d62a81e87cd0c4de1be09e0f (diff) | |
download | postgresql-a35ac7c4e3ccf93876b4652d94a418fc82e0eda3.tar.gz postgresql-a35ac7c4e3ccf93876b4652d94a418fc82e0eda3.zip |
doc: Update ALTER SEQUENCE claims about changes being nontransactional
Clarify that all changes except RESTART are transactional (since
1753b1b027035029c2a2a1649065762fafbf63f3).
Reported-by: Michael Paquier <michael.paquier@gmail.com>
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/alter_sequence.sgml | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/doc/src/sgml/ref/alter_sequence.sgml b/doc/src/sgml/ref/alter_sequence.sgml index 5c912ab892d..3fb3400d6be 100644 --- a/doc/src/sgml/ref/alter_sequence.sgml +++ b/doc/src/sgml/ref/alter_sequence.sgml @@ -180,6 +180,14 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S the start value that was recorded by <command>CREATE SEQUENCE</> or last set by <command>ALTER SEQUENCE START WITH</>. </para> + + <para> + Like a <function>setval</function> call, a <literal>RESTART</literal> + operation on a sequence is never rolled back, to avoid blocking of + concurrent transactions that obtain numbers from the same sequence. + (The other clauses cause ordinary catalog updates that can be rolled + back.) + </para> </listitem> </varlistentry> @@ -282,15 +290,6 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S <title>Notes</title> <para> - To avoid blocking of concurrent transactions that obtain numbers from the - same sequence, <command>ALTER SEQUENCE</command>'s effects on the sequence - generation parameters are never rolled back; those changes take effect - immediately and are not reversible. However, the <literal>OWNED BY</>, - <literal>OWNER TO</>, <literal>RENAME TO</>, and <literal>SET SCHEMA</> - clauses cause ordinary catalog updates that can be rolled back. - </para> - - <para> <command>ALTER SEQUENCE</command> will not immediately affect <function>nextval</> results in backends, other than the current one, that have preallocated (cached) sequence |