1
0
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:
Peter Eisentraut
2016-12-20 12:00:00 -05:00
parent db80acfc9d
commit 1753b1b027
19 changed files with 490 additions and 269 deletions

View File

@ -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,