Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita35ac7c

Browse files
committed
doc: Update ALTER SEQUENCE claims about changes being nontransactional
Clarify that all changes except RESTART are transactional (since1753b1b).Reported-by: Michael Paquier <michael.paquier@gmail.com>
1 parent9a0d200 commita35ac7c

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)

[8]ページ先頭

©2009-2025 Movatter.jp