mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
Remove unused tables pg_variable, pg_inheritproc, pg_ipl tables. Initdb
forced.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.43 2001/03/22 06:16:10 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.44 2001/05/14 20:30:19 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains the high level access-method interface to the
|
||||
@@ -38,7 +38,6 @@ static void TransactionLogUpdate(TransactionId transactionId,
|
||||
*/
|
||||
|
||||
Relation LogRelation = (Relation) NULL;
|
||||
Relation VariableRelation = (Relation) NULL;
|
||||
|
||||
/* ----------------
|
||||
* global variables holding cached transaction id's and statuses.
|
||||
@@ -283,46 +282,6 @@ TransactionLogUpdate(TransactionId transactionId, /* trans id to update */
|
||||
static void
|
||||
TransRecover(Relation logRelation)
|
||||
{
|
||||
#ifdef NOT_USED
|
||||
|
||||
/*
|
||||
* first get the last recorded transaction in the log.
|
||||
*/
|
||||
TransGetLastRecordedTransaction(logRelation, logLastXid, &fail);
|
||||
if (fail == true)
|
||||
elog(ERROR, "TransRecover: failed TransGetLastRecordedTransaction");
|
||||
|
||||
/*
|
||||
* next get the "last" and "next" variables
|
||||
*/
|
||||
VariableRelationGetLastXid(&varLastXid);
|
||||
VariableRelationGetNextXid(&varNextXid);
|
||||
|
||||
/*
|
||||
* intregity test (1)
|
||||
*/
|
||||
if (TransactionIdIsLessThan(varNextXid, logLastXid))
|
||||
elog(ERROR, "TransRecover: varNextXid < logLastXid");
|
||||
|
||||
/*
|
||||
* intregity test (2)
|
||||
*/
|
||||
|
||||
/*
|
||||
* intregity test (3)
|
||||
*/
|
||||
|
||||
/*
|
||||
* here we have a valid "
|
||||
*
|
||||
**** RESUME HERE ****
|
||||
*/
|
||||
varNextXid = TransactionIdDup(varLastXid);
|
||||
TransactionIdIncrement(&varNextXid);
|
||||
|
||||
VarPut(var, VAR_PUT_LASTXID, varLastXid);
|
||||
VarPut(var, VAR_PUT_NEXTXID, varNextXid);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
@@ -386,7 +345,6 @@ InitializeTransactionLog(void)
|
||||
* so they are guaranteed to exist)
|
||||
*/
|
||||
logRelation = heap_openr(LogRelationName, NoLock);
|
||||
VariableRelation = heap_openr(VariableRelationName, NoLock);
|
||||
|
||||
/*
|
||||
* XXX TransactionLogUpdate requires that LogRelation is valid so we
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Makefile for catalog
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.32 2000/10/28 22:14:14 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.33 2001/05/14 20:30:19 momjian Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -30,8 +30,7 @@ TEMPLATE1_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
|
||||
pg_proc.h pg_type.h pg_attribute.h pg_class.h \
|
||||
pg_inherits.h pg_index.h pg_statistic.h \
|
||||
pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
|
||||
pg_language.h pg_largeobject.h \
|
||||
pg_aggregate.h pg_ipl.h pg_inheritproc.h \
|
||||
pg_language.h pg_largeobject.h pg_aggregate.h \
|
||||
pg_rewrite.h pg_listener.h pg_description.h indexing.h \
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.164 2001/05/09 21:13:35 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.165 2001/05/14 20:30:19 momjian Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@@ -39,7 +39,6 @@
|
||||
#include "catalog/pg_attrdef.h"
|
||||
#include "catalog/pg_inherits.h"
|
||||
#include "catalog/pg_index.h"
|
||||
#include "catalog/pg_ipl.h"
|
||||
#include "catalog/pg_proc.h"
|
||||
#include "catalog/pg_relcheck.h"
|
||||
#include "catalog/pg_statistic.h"
|
||||
@@ -258,11 +257,6 @@ heap_create(char *relname,
|
||||
tblNode = InvalidOid;
|
||||
relid = RelOid_pg_database;
|
||||
}
|
||||
else if (strcmp(VariableRelationName, relname) == 0)
|
||||
{
|
||||
tblNode = InvalidOid;
|
||||
relid = RelOid_pg_variable;
|
||||
}
|
||||
else if (strcmp(LogRelationName, relname) == 0)
|
||||
{
|
||||
tblNode = InvalidOid;
|
||||
@@ -989,26 +983,6 @@ RelationRemoveInheritance(Relation relation)
|
||||
|
||||
heap_endscan(scan);
|
||||
heap_close(catalogRelation, RowExclusiveLock);
|
||||
|
||||
/*
|
||||
* now remove dead IPL tuples
|
||||
*/
|
||||
catalogRelation = heap_openr(InheritancePrecidenceListRelationName,
|
||||
RowExclusiveLock);
|
||||
|
||||
entry.sk_attno = Anum_pg_ipl_iplrelid;
|
||||
|
||||
scan = heap_beginscan(catalogRelation,
|
||||
false,
|
||||
SnapshotNow,
|
||||
1,
|
||||
&entry);
|
||||
|
||||
while (HeapTupleIsValid(tuple = heap_getnext(scan, 0)))
|
||||
simple_heap_delete(catalogRelation, &tuple->t_self);
|
||||
|
||||
heap_endscan(scan);
|
||||
heap_close(catalogRelation, RowExclusiveLock);
|
||||
}
|
||||
|
||||
/* --------------------------------
|
||||
@@ -1858,7 +1832,7 @@ AddRelationRawConstraints(Relation rel,
|
||||
foreach(listptr2, rawConstraints)
|
||||
{
|
||||
Constraint *cdef2 = (Constraint *) lfirst(listptr2);
|
||||
|
||||
|
||||
if (cdef2 == cdef ||
|
||||
cdef2->contype != CONSTR_CHECK ||
|
||||
cdef2->raw_expr == NULL ||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.76 2001/04/02 18:30:49 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.77 2001/05/14 20:30:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/heap.h"
|
||||
#include "catalog/pg_inherits.h"
|
||||
#include "catalog/pg_ipl.h"
|
||||
#include "catalog/pg_type.h"
|
||||
#include "commands/creatinh.h"
|
||||
#include "miscadmin.h"
|
||||
@@ -786,38 +785,6 @@ again:
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Catalog IPL information using expanded list.
|
||||
*/
|
||||
relation = heap_openr(InheritancePrecidenceListRelationName, RowExclusiveLock);
|
||||
desc = RelationGetDescr(relation);
|
||||
|
||||
seqNumber = 1;
|
||||
|
||||
foreach(entry, supers)
|
||||
{
|
||||
Datum datum[Natts_pg_ipl];
|
||||
char nullarr[Natts_pg_ipl];
|
||||
|
||||
datum[0] = ObjectIdGetDatum(relationId); /* iplrel */
|
||||
datum[1] = ObjectIdGetDatum(lfirsti(entry));
|
||||
/* iplinherits */
|
||||
datum[2] = Int16GetDatum(seqNumber); /* iplseqno */
|
||||
|
||||
nullarr[0] = ' ';
|
||||
nullarr[1] = ' ';
|
||||
nullarr[2] = ' ';
|
||||
|
||||
tuple = heap_formtuple(desc, datum, nullarr);
|
||||
|
||||
heap_insert(relation, tuple);
|
||||
heap_freetuple(tuple);
|
||||
|
||||
seqNumber += 1;
|
||||
}
|
||||
|
||||
heap_close(relation, RowExclusiveLock);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.225 2001/05/09 16:50:44 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.226 2001/05/14 20:30:20 momjian Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@@ -5301,8 +5301,7 @@ relation_name: SpecialRuleRelation
|
||||
| ColId
|
||||
{
|
||||
/* disallow refs to variable system tables */
|
||||
if (strcmp(LogRelationName, $1) == 0
|
||||
|| strcmp(VariableRelationName, $1) == 0)
|
||||
if (strcmp(LogRelationName, $1) == 0)
|
||||
elog(ERROR,"%s cannot be accessed by users",$1);
|
||||
else
|
||||
$$ = $1;
|
||||
|
||||
3
src/backend/utils/cache/relcache.c
vendored
3
src/backend/utils/cache/relcache.c
vendored
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.131 2001/04/02 23:30:04 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.132 2001/05/14 20:30:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2117,7 +2117,6 @@ RelationCacheInitialize(void)
|
||||
formrdesc(AttributeRelationName, Natts_pg_attribute, Desc_pg_attribute);
|
||||
formrdesc(ProcedureRelationName, Natts_pg_proc, Desc_pg_proc);
|
||||
formrdesc(TypeRelationName, Natts_pg_type, Desc_pg_type);
|
||||
formrdesc(VariableRelationName, Natts_pg_variable, Desc_pg_variable);
|
||||
formrdesc(LogRelationName, Natts_pg_log, Desc_pg_log);
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.56 2001/05/12 01:48:49 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.57 2001/05/14 20:30:21 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Globals used all over the place should be declared here and not
|
||||
@@ -115,6 +115,5 @@ char *SharedSystemRelationNames[] = {
|
||||
GroupSysidIndex,
|
||||
LogRelationName,
|
||||
ShadowRelationName,
|
||||
VariableRelationName,
|
||||
0
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user