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

Commit94f610b

Browse files
committed
Forbid setval() during recovery. This prevents the PANIC reported by
Erik Rijkers. Patch by Andres Freund.
1 parent2f6b456 commit94f610b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/commands/sequence.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.166 2010/02/14 18:42:14 rhaas Exp $
11+
* $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.167 2010/02/19 06:29:19 heikki Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -736,6 +736,9 @@ do_setval(Oid relid, int64 next, bool iscalled)
736736
Bufferbuf;
737737
Form_pg_sequenceseq;
738738

739+
/* setval() writes to database and must be prevented during recovery */
740+
PreventCommandDuringRecovery();
741+
739742
/* open and AccessShareLock sequence */
740743
init_sequence(relid,&elm,&seqrel);
741744

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp