Skip to content

Commit a35ac7c

Browse files
committed
doc: Update ALTER SEQUENCE claims about changes being nontransactional
Clarify that all changes except RESTART are transactional (since 1753b1b). Reported-by: Michael Paquier <michael.paquier@gmail.com>
1 parent 9a0d200 commit a35ac7c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

doc/src/sgml/ref/alter_sequence.sgml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,14 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S
180180
the start value that was recorded by <command>CREATE SEQUENCE</>
181181
or last set by <command>ALTER SEQUENCE START WITH</>.
182182
</para>
183+
184+
<para>
185+
Like a <function>setval</function> call, a <literal>RESTART</literal>
186+
operation on a sequence is never rolled back, to avoid blocking of
187+
concurrent transactions that obtain numbers from the same sequence.
188+
(The other clauses cause ordinary catalog updates that can be rolled
189+
back.)
190+
</para>
183191
</listitem>
184192
</varlistentry>
185193

@@ -281,15 +289,6 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S
281289
<refsect1>
282290
<title>Notes</title>
283291

284-
<para>
285-
To avoid blocking of concurrent transactions that obtain numbers from the
286-
same sequence, <command>ALTER SEQUENCE</command>'s effects on the sequence
287-
generation parameters are never rolled back; those changes take effect
288-
immediately and are not reversible. However, the <literal>OWNED BY</>,
289-
<literal>OWNER TO</>, <literal>RENAME TO</>, and <literal>SET SCHEMA</>
290-
clauses cause ordinary catalog updates that can be rolled back.
291-
</para>
292-
293292
<para>
294293
<command>ALTER SEQUENCE</command> will not immediately affect
295294
<function>nextval</> results in backends,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy