Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1e7b79c

Browse files
committed
Remove unused tables pg_variable, pg_inheritproc, pg_ipl tables. Initdb
forced.
1 parent 2481825 commit 1e7b79c

File tree

16 files changed

+17
-293
lines changed

16 files changed

+17
-293
lines changed

doc/src/sgml/catalogs.sgml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
Documentation of the system catalogs, directed toward PostgreSQL developers
3-
$Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.16 2001/05/07 00:43:14 tgl Exp $
3+
$Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.17 2001/05/14 20:30:19 momjian Exp $
44
-->
55

66
<chapter id="catalogs">
@@ -91,21 +91,11 @@
9191
<entry>additional index information</entry>
9292
</row>
9393

94-
<row>
95-
<entry>pg_inheritproc</entry>
96-
<entry>(not used)</entry>
97-
</row>
98-
9994
<row>
10095
<entry>pg_inherits</entry>
10196
<entry>table inheritance hierarchy</entry>
10297
</row>
10398

104-
<row>
105-
<entry>pg_ipl</entry>
106-
<entry>(not used)</entry>
107-
</row>
108-
10999
<row>
110100
<entry>pg_language</entry>
111101
<entry>languages for writing functions</entry>

src/backend/access/transam/transam.c

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.43 2001/03/22 06:16:10 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.44 2001/05/14 20:30:19 momjian Exp $
1212
*
1313
* NOTES
1414
* This file contains the high level access-method interface to the
@@ -38,7 +38,6 @@ static void TransactionLogUpdate(TransactionId transactionId,
3838
*/
3939

4040
Relation LogRelation = (Relation) NULL;
41-
Relation VariableRelation = (Relation) NULL;
4241

4342
/* ----------------
4443
* global variables holding cached transaction id's and statuses.
@@ -283,46 +282,6 @@ TransactionLogUpdate(TransactionId transactionId, /* trans id to update */
283282
static void
284283
TransRecover(Relation logRelation)
285284
{
286-
#ifdef NOT_USED
287-
288-
/*
289-
* first get the last recorded transaction in the log.
290-
*/
291-
TransGetLastRecordedTransaction(logRelation, logLastXid, &fail);
292-
if (fail == true)
293-
elog(ERROR, "TransRecover: failed TransGetLastRecordedTransaction");
294-
295-
/*
296-
* next get the "last" and "next" variables
297-
*/
298-
VariableRelationGetLastXid(&varLastXid);
299-
VariableRelationGetNextXid(&varNextXid);
300-
301-
/*
302-
* intregity test (1)
303-
*/
304-
if (TransactionIdIsLessThan(varNextXid, logLastXid))
305-
elog(ERROR, "TransRecover: varNextXid < logLastXid");
306-
307-
/*
308-
* intregity test (2)
309-
*/
310-
311-
/*
312-
* intregity test (3)
313-
*/
314-
315-
/*
316-
* here we have a valid "
317-
*
318-
**** RESUME HERE ****
319-
*/
320-
varNextXid = TransactionIdDup(varLastXid);
321-
TransactionIdIncrement(&varNextXid);
322-
323-
VarPut(var, VAR_PUT_LASTXID, varLastXid);
324-
VarPut(var, VAR_PUT_NEXTXID, varNextXid);
325-
#endif
326285
}
327286

328287
/* ----------------------------------------------------------------
@@ -386,7 +345,6 @@ InitializeTransactionLog(void)
386345
* so they are guaranteed to exist)
387346
*/
388347
logRelation = heap_openr(LogRelationName, NoLock);
389-
VariableRelation = heap_openr(VariableRelationName, NoLock);
390348

391349
/*
392350
* XXX TransactionLogUpdate requires that LogRelation is valid so we

src/backend/catalog/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Makefile for catalog
44
#
5-
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.32 2000/10/28 22:14:14 petere Exp $
5+
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.33 2001/05/14 20:30:19 momjian Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -30,8 +30,7 @@ TEMPLATE1_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
3030
pg_proc.h pg_type.h pg_attribute.h pg_class.h \
3131
pg_inherits.h pg_index.h pg_statistic.h \
3232
pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
33-
pg_language.h pg_largeobject.h \
34-
pg_aggregate.h pg_ipl.h pg_inheritproc.h \
33+
pg_language.h pg_largeobject.h pg_aggregate.h \
3534
pg_rewrite.h pg_listener.h pg_description.h indexing.h \
3635
)
3736

src/backend/catalog/heap.c

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.164 2001/05/09 21:13:35 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.165 2001/05/14 20:30:19 momjian Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -39,7 +39,6 @@
3939
#include "catalog/pg_attrdef.h"
4040
#include "catalog/pg_inherits.h"
4141
#include "catalog/pg_index.h"
42-
#include "catalog/pg_ipl.h"
4342
#include "catalog/pg_proc.h"
4443
#include "catalog/pg_relcheck.h"
4544
#include "catalog/pg_statistic.h"
@@ -258,11 +257,6 @@ heap_create(char *relname,
258257
tblNode = InvalidOid;
259258
relid = RelOid_pg_database;
260259
}
261-
else if (strcmp(VariableRelationName, relname) == 0)
262-
{
263-
tblNode = InvalidOid;
264-
relid = RelOid_pg_variable;
265-
}
266260
else if (strcmp(LogRelationName, relname) == 0)
267261
{
268262
tblNode = InvalidOid;
@@ -989,26 +983,6 @@ RelationRemoveInheritance(Relation relation)
989983

990984
heap_endscan(scan);
991985
heap_close(catalogRelation, RowExclusiveLock);
992-
993-
/*
994-
* now remove dead IPL tuples
995-
*/
996-
catalogRelation = heap_openr(InheritancePrecidenceListRelationName,
997-
RowExclusiveLock);
998-
999-
entry.sk_attno = Anum_pg_ipl_iplrelid;
1000-
1001-
scan = heap_beginscan(catalogRelation,
1002-
false,
1003-
SnapshotNow,
1004-
1,
1005-
&entry);
1006-
1007-
while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
1008-
simple_heap_delete(catalogRelation, &tuple->t_self);
1009-
1010-
heap_endscan(scan);
1011-
heap_close(catalogRelation, RowExclusiveLock);
1012986
}
1013987

1014988
/* --------------------------------
@@ -1858,7 +1832,7 @@ AddRelationRawConstraints(Relation rel,
18581832
foreach(listptr2, rawConstraints)
18591833
{
18601834
Constraint *cdef2 = (Constraint *) lfirst(listptr2);
1861-
1835+
18621836
if (cdef2 == cdef ||
18631837
cdef2->contype != CONSTR_CHECK ||
18641838
cdef2->raw_expr == NULL ||

src/backend/commands/creatinh.c

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.76 2001/04/02 18:30:49 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.77 2001/05/14 20:30:20 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -20,7 +20,6 @@
2020
#include "catalog/indexing.h"
2121
#include "catalog/heap.h"
2222
#include "catalog/pg_inherits.h"
23-
#include "catalog/pg_ipl.h"
2423
#include "catalog/pg_type.h"
2524
#include "commands/creatinh.h"
2625
#include "miscadmin.h"
@@ -786,38 +785,6 @@ StoreCatalogInheritance(Oid relationId, List *supers)
786785
goto again;
787786
}
788787
}
789-
790-
/*
791-
* Catalog IPL information using expanded list.
792-
*/
793-
relation = heap_openr(InheritancePrecidenceListRelationName, RowExclusiveLock);
794-
desc = RelationGetDescr(relation);
795-
796-
seqNumber = 1;
797-
798-
foreach(entry, supers)
799-
{
800-
Datum datum[Natts_pg_ipl];
801-
char nullarr[Natts_pg_ipl];
802-
803-
datum[0] = ObjectIdGetDatum(relationId); /* iplrel */
804-
datum[1] = ObjectIdGetDatum(lfirsti(entry));
805-
/* iplinherits */
806-
datum[2] = Int16GetDatum(seqNumber); /* iplseqno */
807-
808-
nullarr[0] = ' ';
809-
nullarr[1] = ' ';
810-
nullarr[2] = ' ';
811-
812-
tuple = heap_formtuple(desc, datum, nullarr);
813-
814-
heap_insert(relation, tuple);
815-
heap_freetuple(tuple);
816-
817-
seqNumber += 1;
818-
}
819-
820-
heap_close(relation, RowExclusiveLock);
821788
}
822789

823790
/*

src/backend/parser/gram.y

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.225 2001/05/09 16:50:44 petere Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.226 2001/05/14 20:30:20 momjian Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -5301,8 +5301,7 @@ relation_name: SpecialRuleRelation
53015301
| ColId
53025302
{
53035303
/* disallow refs to variable system tables */
5304-
if (strcmp(LogRelationName, $1) == 0
5305-
|| strcmp(VariableRelationName, $1) == 0)
5304+
if (strcmp(LogRelationName, $1) == 0)
53065305
elog(ERROR,"%s cannot be accessed by users",$1);
53075306
else
53085307
$$ = $1;

src/backend/utils/cache/relcache.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.131 2001/04/02 23:30:04 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.132 2001/05/14 20:30:20 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2117,7 +2117,6 @@ RelationCacheInitialize(void)
21172117
formrdesc(AttributeRelationName, Natts_pg_attribute, Desc_pg_attribute);
21182118
formrdesc(ProcedureRelationName, Natts_pg_proc, Desc_pg_proc);
21192119
formrdesc(TypeRelationName, Natts_pg_type, Desc_pg_type);
2120-
formrdesc(VariableRelationName, Natts_pg_variable, Desc_pg_variable);
21212120
formrdesc(LogRelationName, Natts_pg_log, Desc_pg_log);
21222121

21232122
/*

src/backend/utils/init/globals.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.56 2001/05/12 01:48:49 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.57 2001/05/14 20:30:21 momjian Exp $
1212
*
1313
* NOTES
1414
* Globals used all over the place should be declared here and not
@@ -115,6 +115,5 @@ char *SharedSystemRelationNames[] = {
115115
GroupSysidIndex,
116116
LogRelationName,
117117
ShadowRelationName,
118-
VariableRelationName,
119118
0
120119
};

src/include/access/transam.h

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: transam.h,v 1.32 2001/03/22 04:00:31 momjian Exp $
10+
* $Id: transam.h,v 1.33 2001/05/14 20:30:21 momjian Exp $
1111
*
1212
* NOTES
1313
* Transaction System Version 101 now support proper oid
@@ -91,38 +91,6 @@ typedef struct LogRelationContentsData
9191

9292
typedef LogRelationContentsData *LogRelationContents;
9393

94-
/* ----------------
95-
* VariableRelationContents structure
96-
*
97-
* The variable relation is a special "relation" which
98-
* is used to store various system "variables" persistantly.
99-
* Unlike other relations in the system, this relation
100-
* is updated in place whenever the variables change.
101-
*
102-
* The first 4 bytes of this relation store the version
103-
* number of the transaction system.
104-
*
105-
* Currently, the relation has only one page and the next
106-
* available xid, the last committed xid and the next
107-
* available oid are stored there.
108-
*
109-
* XXX As of 7.1, pg_variable isn't used anymore; this is dead code.
110-
* ----------------
111-
*/
112-
#ifdef NOT_USED
113-
typedef struct VariableRelationContentsData
114-
{
115-
XLogRecPtr LSN;
116-
int TransSystemVersion;
117-
TransactionId nextXidData;
118-
TransactionId lastXidData; /* unused */
119-
Oid nextOid;
120-
} VariableRelationContentsData;
121-
122-
typedef VariableRelationContentsData *VariableRelationContents;
123-
124-
#endif /* NOT_USED */
125-
12694
/*
12795
* VariableCache is placed in shmem and used by
12896
* backends to get next available XID & OID.
@@ -161,7 +129,6 @@ extern void TransBlockNumberSetXidStatus(Relation relation,
161129
bool *failP);
162130

163131
/* in transam/varsup.c */
164-
extern void VariableRelationPutNextXid(TransactionId xid);
165132
extern void GetNewTransactionId(TransactionId *xid);
166133
extern void ReadNewTransactionId(TransactionId *xid);
167134
extern void GetNewObjectId(Oid *oid_return);
@@ -174,7 +141,6 @@ extern void CheckMaxObjectId(Oid assigned_oid);
174141

175142
/* in transam.c */
176143
extern Relation LogRelation;
177-
extern Relation VariableRelation;
178144

179145
extern TransactionId cachedTestXid;
180146
extern XidStatus cachedTestXidStatus;

src/include/catalog/catname.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: catname.h,v 1.18 2001/01/24 19:43:20 momjian Exp $
10+
* $Id: catname.h,v 1.19 2001/05/14 20:30:21 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -25,9 +25,7 @@
2525
#define DescriptionRelationName "pg_description"
2626
#define GroupRelationName "pg_group"
2727
#define IndexRelationName "pg_index"
28-
#define InheritProcedureRelationName "pg_inheritproc"
2928
#define InheritsRelationName "pg_inherits"
30-
#define InheritancePrecidenceListRelationName "pg_ipl"
3129
#define LanguageRelationName "pg_language"
3230
#define LargeObjectRelationName "pg_largeobject"
3331
#define ListenerRelationName "pg_listener"
@@ -40,7 +38,6 @@
4038
#define ShadowRelationName "pg_shadow"
4139
#define StatisticRelationName "pg_statistic"
4240
#define TypeRelationName "pg_type"
43-
#define VariableRelationName "pg_variable"
4441
#define VersionRelationName "pg_version"
4542
#define AttrDefaultRelationName "pg_attrdef"
4643
#define RelCheckRelationName "pg_relcheck"

0 commit comments

Comments
 (0)