1
0
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:
Bruce Momjian
2003-06-12 07:49:43 +00:00
parent b4cea00a1f
commit e9cda08b2b
4 changed files with 55 additions and 5 deletions

View File

@ -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 */