From 6367ef624ff3f82f4acc49a569afa5e505afed41 Mon Sep 17 00:00:00 2001 From: Abhijit Subramanya Date: Tue, 5 Jan 2016 15:25:02 -0800 Subject: [PATCH] Remove pg_appendonly_alter_column catalog table. This table is not used anywhere in the code. --- gpMgmt/bin/gppylib/data/4.3.json | 91 +------------------ gpMgmt/bin/lib/gpcheckcat | 1 - src/backend/bootstrap/bootparse.y | 1 - src/backend/catalog/Makefile | 2 +- src/backend/catalog/core/catcoregen.pl | 1 - src/include/catalog/catversion.h | 2 +- src/include/catalog/indexing.h | 3 - .../catalog/pg_appendonly_alter_column.h | 80 ---------------- src/include/catalog/tidycat.pl | 2 - 9 files changed, 4 insertions(+), 179 deletions(-) delete mode 100755 src/include/catalog/pg_appendonly_alter_column.h diff --git a/gpMgmt/bin/gppylib/data/4.3.json b/gpMgmt/bin/gppylib/data/4.3.json index 60cf3eca05..d448d6540f 100644 --- a/gpMgmt/bin/gppylib/data/4.3.json +++ b/gpMgmt/bin/gppylib/data/4.3.json @@ -1,7 +1,7 @@ { - "__comment" : "Generated by tidycat.pl version 34 on Wed Jan 6 14:37:36 2016 CATALOG_VERSION_NO=301601061", + "__comment" : "Generated by tidycat.pl version 34 on Thu Jan 7 17:03:10 2016 CATALOG_VERSION_NO=301601051", "__info" : { - "CATALOG_VERSION_NO" : "301601061" + "CATALOG_VERSION_NO" : "301601051" }, "gp_configuration" : { "CamelCaseRelationId" : "GpConfigurationRelationId", @@ -2451,93 +2451,6 @@ "text" : "with (camelcase=AppendOnly, oid=false, relid=6105)" } }, - "pg_appendonly_alter_column" : { - "CamelCaseRelationId" : "AppendOnlyAlterColumnRelationId", - "colh" : { - "changenum" : "int4", - "highwaterrownums" : "bytea", - "relid" : "Oid", - "segfilenums" : "int4[1]" - }, - "cols" : [ - { - "colname" : "relid", - "ctype" : "Oid", - "precomment" : "\n**TK_BLANK_LINE**", - "sqltype" : "oid" - }, - { - "colname" : "changenum", - "ctype" : "int4", - "sqltype" : "integer" - }, - { - "colname" : "segfilenums", - "ctype" : "int4[1]", - "sqltype" : "integer[]" - }, - { - "colname" : "highwaterrownums", - "ctype" : "bytea", - "sqltype" : "bytea" - } - ], - "filename" : "pg_appendonly_alter_column.h", - "fk_list" : [ - { - "fkcols" : [ - "relid" - ], - "pkcols" : [ - "oid" - ], - "pktable" : "pg_class", - "type" : "scalar" - } - ], - "foreign_keys" : [ - [ - [ - "relid" - ], - "pg_class", - [ - "oid" - ] - ] - ], - "indexes" : [ - { - "CamelCaseIndexId" : "AppendOnlyAlterColumnRelidIndexId", - "cols" : [ - [ - "relid", - "oid_ops" - ], - [ - "changenum", - "int4_ops" - ] - ], - "indexid" : "5031", - "unique" : "1", - "with" : { - "camelcase" : "AppendOnlyAlterColumnRelid", - "indexid" : "5031" - } - } - ], - "relid_comment_tag" : "/* relation id: 6110 - pg_appendonly_alter_column */\n", - "tabdef_text" : "\n CREATE TABLE pg_appendonly_alter_column\n with (camelcase=AppendOnlyAlterColumn, oid=false, relid=6110)\n (\n relid oid, \n changenum integer, \n segfilenums integer[], \n highwaterrownums bytea\n )", - "with" : { - "bootstrap" : 0, - "camelcase" : "AppendOnlyAlterColumn", - "oid" : "", - "relid" : "6110", - "shared" : 0, - "text" : "with (camelcase=AppendOnlyAlterColumn, oid=false, relid=6110)" - } - }, "pg_attrdef" : { "CamelCaseRelationId" : "AttrDefaultRelationId", "CamelCaseToastInd" : "PgAttrDefaultToastIndex", diff --git a/gpMgmt/bin/lib/gpcheckcat b/gpMgmt/bin/lib/gpcheckcat index a100f21a22..c506d2bb2b 100755 --- a/gpMgmt/bin/lib/gpcheckcat +++ b/gpMgmt/bin/lib/gpcheckcat @@ -3904,7 +3904,6 @@ TableMainColumn['pg_aggregate'] = ['aggfnoid','pg_proc'] TableMainColumn['pg_amop'] = ['amopclaid','pg_opclass'] TableMainColumn['pg_amproc'] = ['amopclaid','pg_opclass'] TableMainColumn['pg_appendonly'] = ['relid','pg_class'] -TableMainColumn['pg_appendonly_alter_column'] = ['relid','pg_class'] TableMainColumn['pg_attribute'] = ['attrelid','pg_class'] TableMainColumn['pg_attribute_encoding'] = ['attrelid', 'pg_class'] TableMainColumn['pg_auth_member'] = ['roleid','pg_authid'] diff --git a/src/backend/bootstrap/bootparse.y b/src/backend/bootstrap/bootparse.y index 296a10939b..0329992bad 100755 --- a/src/backend/bootstrap/bootparse.y +++ b/src/backend/bootstrap/bootparse.y @@ -35,7 +35,6 @@ #include "catalog/gp_segment_config.h" #include "catalog/heap.h" #include "catalog/pg_am.h" -#include "catalog/pg_appendonly_alter_column.h" #include "catalog/pg_attribute.h" #include "catalog/pg_authid.h" #include "catalog/pg_auth_members.h" diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile index 8dde32b447..4007d76557 100644 --- a/src/backend/catalog/Makefile +++ b/src/backend/catalog/Makefile @@ -68,7 +68,7 @@ POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/, \ gp_configuration.h gp_id.h gp_policy.h gp_version.h \ gp_segment_config.h gp_san_config.h \ pg_window.h \ - pg_exttable.h pg_appendonly.h pg_appendonly_alter_column.h aoseg.h \ + pg_exttable.h pg_appendonly.h aoseg.h \ gp_fastsequence.h pg_extprotocol.h \ pg_partition.h pg_partition_rule.h pg_filespace.h pg_filespace_entry.h \ gp_global_sequence.h gp_persistent.h \ diff --git a/src/backend/catalog/core/catcoregen.pl b/src/backend/catalog/core/catcoregen.pl index ede3e1cba4..ac32344d9b 100644 --- a/src/backend/catalog/core/catcoregen.pl +++ b/src/backend/catalog/core/catcoregen.pl @@ -137,7 +137,6 @@ print <<"END_MESSAGE"; #include "catalog/pg_amop.h" #include "catalog/pg_amproc.h" #include "catalog/pg_appendonly.h" -#include "catalog/pg_appendonly_alter_column.h" #include "catalog/pg_attrdef.h" #include "catalog/pg_auth_members.h" #include "catalog/pg_authid.h" diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 08fef8d442..744f6e3158 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -56,6 +56,6 @@ */ /* 3yyymmddN */ -#define CATALOG_VERSION_NO 301601061 +#define CATALOG_VERSION_NO 301601051 #endif diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h index b22559cc20..1e4119f499 100644 --- a/src/include/catalog/indexing.h +++ b/src/include/catalog/indexing.h @@ -221,9 +221,6 @@ DECLARE_UNIQUE_INDEX(pg_appendonly_relid_index, 5007, on pg_appendonly using btr DECLARE_UNIQUE_INDEX(gp_fastsequence_objid_objmod_index, 6067, on gp_fastsequence using btree(objid oid_ops, objmod int8_ops)); #define FastSequenceObjidObjmodIndexId 6067 -DECLARE_UNIQUE_INDEX(pg_appendonly_alter_column_relid_index, 5031, on pg_appendonly_alter_column using btree(relid oid_ops, changenum int4_ops)); -#define AppendOnlyAlterColumnRelidIndexId 5031 - DECLARE_UNIQUE_INDEX(gp_relation_node_index, 5095, on gp_relation_node using btree(relfilenode_oid oid_ops, segment_file_num int4_ops)); #define GpRelationNodeOidIndexId 5095 diff --git a/src/include/catalog/pg_appendonly_alter_column.h b/src/include/catalog/pg_appendonly_alter_column.h deleted file mode 100755 index 3ed1071111..0000000000 --- a/src/include/catalog/pg_appendonly_alter_column.h +++ /dev/null @@ -1,80 +0,0 @@ -/*------------------------------------------------------------------------- -* -* pg_appendonly_alter_column.h -* Internal specifications of the pg_appendonly_alter_column relation storage. -* -* Copyright (c) 2008-2010, Greenplum Inc. -*------------------------------------------------------------------------- -*/ -#ifndef PG_APPENDONLY_ALTER_COLUMN_H -#define PG_APPENDONLY_ALTER_COLUMN_H - -#include "catalog/genbki.h" -/* - * pg_appendonly_alter_column definition. - */ - -/* TIDYCAT_BEGINFAKEDEF - - CREATE TABLE pg_appendonly_alter_column - with (camelcase=AppendOnlyAlterColumn, oid=false, relid=6110) - ( - relid oid, - changenum integer, - segfilenums integer[], - highwaterrownums bytea - ); - - create unique index on pg_appendonly_alter_column(relid, changenum) with (indexid=5031, CamelCase=AppendOnlyAlterColumnRelid); - - alter table pg_appendonly_alter_column add fk relid on pg_class(oid); - - TIDYCAT_ENDFAKEDEF -*/ - -#define AppendOnlyAlterColumnRelationId 6110 - -CATALOG(pg_appendonly_alter_column,6110) BKI_WITHOUT_OIDS -{ - Oid relid; /* relation id */ - - /* - * The change number for the ALTER TABLE ADD/DROP - * COLUMN operation. Starts at 1. - */ - int4 changenum; - - /* - * THE REST OF THESE ARE VARIABLE LENGTH FIELDS. - * They cannot be accessed as C struct entries; you have to use - * the full field access machinery (heap_getattr) for them. We declare - * them here for the catalog machinery. - */ - - /* The array of int4 segment file numbers for the highwater row numbers. */ - int4 segfilenums[1]; - - /* - * The array of int64 row numbers that are the logical end of the segment - * files. Unfortunately, we cannot properly represent it as an array of - * int8 or float8, so we use raw bytes. - */ - bytea highwaterrownums; -} FormData_pg_appendonly_alter_column; - - -/* ---------------- -* Form_pg_appendonly corresponds to a pointer to a tuple with -* the format of pg_appendonly relation. -* ---------------- -*/ -typedef FormData_pg_appendonly_alter_column *Form_pg_appendonly_alter_column; - -#define Natts_pg_appendonly_alter_column 4 -#define Anum_pg_appendonly_alter_column_relid 1 -#define Anum_pg_appendonly_alter_column_changenum 2 -#define Anum_pg_appendonly_alter_column_segfilenums 3 -#define Anum_pg_appendonly_alter_column_highwaterrownums 4 - -#endif /* PG_APPENDONLY_ALTER_COLUMN_H */ - diff --git a/src/include/catalog/tidycat.pl b/src/include/catalog/tidycat.pl index 5e471bc665..93737063e2 100755 --- a/src/include/catalog/tidycat.pl +++ b/src/include/catalog/tidycat.pl @@ -389,7 +389,6 @@ my %toast_tab_exception_h = "gp_version_at_initdb" => 1, "pg_aggregate" => 1, "pg_appendonly" => 1, - "pg_appendonly_alter_column" => 1, "pg_class" => 1, "pg_exttable" => 1, "pg_index" => 1, @@ -413,7 +412,6 @@ my %allfiles_exception_h = "pg_amproc.h" => 1, "pg_aoseg.h" => 1, "pg_appendonly.h" => 1, - "pg_appendonly_alter_column.h" => 1, "pg_attrdef.h" => 1, "pg_attribute.h" => 1, "pg_auth_members.h" => 1, -- GitLab