mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Add pg_sequence system catalog
Move sequence metadata (start, increment, etc.) into a proper system catalog instead of storing it in the sequence heap object. This separates the metadata from the sequence data. Sequence metadata is now operated on transactionally by DDL commands, whereas previously rollbacks of sequence-related DDL commands would be ignored. Reviewed-by: Andreas Karlsson <andreas@proxel.se>
This commit is contained in:
12
src/backend/utils/cache/syscache.c
vendored
12
src/backend/utils/cache/syscache.c
vendored
@ -53,6 +53,7 @@
|
||||
#include "catalog/pg_range.h"
|
||||
#include "catalog/pg_rewrite.h"
|
||||
#include "catalog/pg_seclabel.h"
|
||||
#include "catalog/pg_sequence.h"
|
||||
#include "catalog/pg_shdepend.h"
|
||||
#include "catalog/pg_shdescription.h"
|
||||
#include "catalog/pg_shseclabel.h"
|
||||
@ -668,6 +669,17 @@ static const struct cachedesc cacheinfo[] = {
|
||||
},
|
||||
8
|
||||
},
|
||||
{SequenceRelationId, /* SEQRELID */
|
||||
SequenceRelidIndexId,
|
||||
1,
|
||||
{
|
||||
Anum_pg_sequence_seqrelid,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
},
|
||||
32
|
||||
},
|
||||
{StatisticRelationId, /* STATRELATTINH */
|
||||
StatisticRelidAttnumInhIndexId,
|
||||
3,
|
||||
|
Reference in New Issue
Block a user