mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Brief note about sequence cache not being cleared in other backends.
Actually clear the cache in the backend making the alteration. This follows in the footsteps of setval(). Rod Taylor
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.95 2003/03/21 03:55:21 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.96 2003/06/12 07:49:43 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -345,6 +345,11 @@ AlterSequence(AlterSeqStmt *stmt)
|
||||
seq->log_cnt = 1;
|
||||
}
|
||||
|
||||
/* save info in local cache */
|
||||
elm->last = new.last_value; /* last returned number */
|
||||
elm->cached = new.last_value; /* last cached number (forget cached
|
||||
* values) */
|
||||
|
||||
START_CRIT_SECTION();
|
||||
|
||||
/* XLOG stuff */
|
||||
|
Reference in New Issue
Block a user