You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by ml...@apache.org on 2016/02/25 02:58:58 UTC
incubator-hawq git commit: HAWQ-441. Remove catalog table "gp_id"
because it is useless
Repository: incubator-hawq
Updated Branches:
refs/heads/master 782d288b3 -> dd52db554
HAWQ-441. Remove catalog table "gp_id" because it is useless
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/dd52db55
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/dd52db55
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/dd52db55
Branch: refs/heads/master
Commit: dd52db55422dd93b93ef885d8ee4d4bf246cd8f6
Parents: 782d288
Author: Ming LI <ml...@pivotal.io>
Authored: Tue Feb 23 16:21:07 2016 +0800
Committer: Ming LI <ml...@pivotal.io>
Committed: Thu Feb 25 09:58:04 2016 +0800
----------------------------------------------------------------------
src/all_src_files.txt | 1 -
src/backend/access/index/catquery.c | 1 -
src/backend/access/index/gperf.init | 1 -
src/backend/catalog/Makefile | 2 +-
src/backend/catalog/catalog.c | 2 -
src/backend/catalog/core/catcoregen.py | 1 -
src/include/catalog/calico.pl | 1 -
src/include/catalog/gp_id.h | 89 --------------------
src/include/catalog/gp_persistent.h | 4 +-
src/include/catalog/pg_tidycat.h | 1 -
src/include/catalog/tidycat.pl | 1 -
src/include/cdb/cdbcat.h | 1 -
.../regress/expected/validator_function.out | 2 +-
tools/bin/gppylib/data/2.0.json | 44 ----------
14 files changed, 3 insertions(+), 148 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/all_src_files.txt
----------------------------------------------------------------------
diff --git a/src/all_src_files.txt b/src/all_src_files.txt
index 31630c8..feabe2a 100644
--- a/src/all_src_files.txt
+++ b/src/all_src_files.txt
@@ -865,7 +865,6 @@ include/catalog/genbki.h
include/catalog/gp_configuration.h
include/catalog/gp_fastsequence.h
include/catalog/gp_global_sequence.h
-include/catalog/gp_id.h
include/catalog/gp_master_mirroring.h
include/catalog/gp_persistent.h
include/catalog/gp_policy.h
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/backend/access/index/catquery.c
----------------------------------------------------------------------
diff --git a/src/backend/access/index/catquery.c b/src/backend/access/index/catquery.c
index c843a11..ee90cce 100644
--- a/src/backend/access/index/catquery.c
+++ b/src/backend/access/index/catquery.c
@@ -131,7 +131,6 @@ ARGV: \-meta\ \/Users\/jianl\/Git\/hawq\/mn\/cdb\-pg\/\.\.\/gpMgmt\/bin\/gppylib
#include "catalog/gp_master_mirroring.h"
#include "catalog/gp_persistent.h"
#include "catalog/gp_global_sequence.h"
-#include "catalog/gp_id.h"
#include "catalog/gp_version.h"
#include "catalog/toasting.h"
#include "catalog/gp_policy.h"
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/backend/access/index/gperf.init
----------------------------------------------------------------------
diff --git a/src/backend/access/index/gperf.init b/src/backend/access/index/gperf.init
index 6a5cdec..eeef440 100644
--- a/src/backend/access/index/gperf.init
+++ b/src/backend/access/index/gperf.init
@@ -100,7 +100,6 @@ ARGV: \-meta\ \/Users\/yjin\/hawq_main\/gpMgmt\/bin\/gppylib\/data\/2\.0\.json\
#include "catalog/gp_master_mirroring.h"
#include "catalog/gp_persistent.h"
#include "catalog/gp_global_sequence.h"
-#include "catalog/gp_id.h"
#include "catalog/gp_version.h"
#include "catalog/toasting.h"
#include "catalog/gp_policy.h"
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/backend/catalog/Makefile
----------------------------------------------------------------------
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
index 08622f1..1654a53 100644
--- a/src/backend/catalog/Makefile
+++ b/src/backend/catalog/Makefile
@@ -108,7 +108,7 @@ POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
pg_namespace.h pg_conversion.h pg_depend.h \
pg_database.h pg_tablespace.h pg_pltemplate.h \
pg_authid.h pg_auth_members.h pg_shdepend.h pg_shdescription.h pg_resqueue.h \
- gp_configuration.h gp_id.h gp_policy.h gp_version.h \
+ gp_configuration.h gp_policy.h gp_version.h \
gp_segment_config.h gp_san_config.h \
gp_verification_history.h \
pg_window.h \
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/backend/catalog/catalog.c
----------------------------------------------------------------------
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 4af2c28..dd10dc2 100755
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -48,7 +48,6 @@
#include "catalog/gp_master_mirroring.h"
#include "catalog/gp_persistent.h"
#include "catalog/gp_global_sequence.h"
-#include "catalog/gp_id.h"
#include "catalog/gp_version.h"
#include "catalog/toasting.h"
#include "catalog/gp_policy.h"
@@ -749,7 +748,6 @@ IsSharedRelation(Oid relationId)
relationId == FileSpaceRelationId ||
relationId == TableSpaceRelationId ||
- relationId == GpIdRelationId ||
relationId == GpVersionRelationId ||
relationId == GpPersistentRelfileNodeRelationId ||
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/backend/catalog/core/catcoregen.py
----------------------------------------------------------------------
diff --git a/src/backend/catalog/core/catcoregen.py b/src/backend/catalog/core/catcoregen.py
index 16c0f31..327b560 100644
--- a/src/backend/catalog/core/catcoregen.py
+++ b/src/backend/catalog/core/catcoregen.py
@@ -420,7 +420,6 @@ CatCoreTableTemplate = """
#include "catalog/catcore.h"
#include "catalog/catalog.h"
#include "catalog/gp_configuration.h"
-#include "catalog/gp_id.h"
#include "catalog/gp_master_mirroring.h"
#include "catalog/gp_policy.h"
#include "catalog/gp_san_config.h"
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/include/catalog/calico.pl
----------------------------------------------------------------------
diff --git a/src/include/catalog/calico.pl b/src/include/catalog/calico.pl
index 207950b..8ec35d7 100755
--- a/src/include/catalog/calico.pl
+++ b/src/include/catalog/calico.pl
@@ -3522,7 +3522,6 @@ sub more_header
#include "catalog/gp_master_mirroring.h"
#include "catalog/gp_persistent.h"
#include "catalog/gp_global_sequence.h"
-#include "catalog/gp_id.h"
#include "catalog/gp_version.h"
#include "catalog/toasting.h"
#include "catalog/gp_policy.h"
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/include/catalog/gp_id.h
----------------------------------------------------------------------
diff --git a/src/include/catalog/gp_id.h b/src/include/catalog/gp_id.h
deleted file mode 100644
index 599e1e3..0000000
--- a/src/include/catalog/gp_id.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/*-------------------------------------------------------------------------
- *
- * gp_id.h
- * definition of the system "database identifier" relation (gp_dbid)
- * along with the relation's initial contents.
- *
- * NOTES
- * Historically this table was used to supply every segment with its
- * identification information. However in the 4.0 release when the file
- * replication feature was added it could no longer serve this purpose
- * because it became a requirement for all tables to have the same physical
- * contents on both the primary and mirror segments. To resolve this the
- * information is now passed to each segment on startup based on the
- * gp_segment_configuration (stored on the master only), and each segment
- * has a file in its datadirectory (gp_dbid) that uniquely identifies the
- * segment.
- *
- * The contents of the table are now irrelevant, with the exception that
- * several tools began relying on this table for use as a method of remote
- * function invocation via gp_dist_random('gp_id') due to the fact that this
- * table was guaranteed of having exactly one row on every segment. The
- * contents of the row have no defined meaning, but this property is still
- * relied upon.
- */
-#ifndef _GP_ID_H_
-#define _GP_ID_H_
-
-
-#include "catalog/genbki.h"
-/*
- * Defines for gp_id table
- */
-#define GpIdRelationName "gp_id"
-
-/* TIDYCAT_BEGINFAKEDEF
-
- CREATE TABLE gp_id
- with (shared=true, oid=false, relid=5001, content=SEGMENT_LOCAL)
- (
- gpname name ,
- numsegments smallint ,
- dbid smallint ,
- content smallint
- );
-
- TIDYCAT_ENDFAKEDEF
-*/
-
-#define GpIdRelationId 5001
-
-CATALOG(gp_id,5001) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
-{
- NameData gpname;
- int2 numsegments;
- int2 dbid;
- int2 content;
-} FormData_gp_id;
-
-#define Natts_gp_id 4
-#define Anum_gp_id_gpname 1
-#define Anum_gp_id_numsegments 2
-#define Anum_gp_id_dbid 3
-#define Anum_gp_id_content 4
-
-/*
- * The contract of the gp_id table is that it must have exactly one row on
- * every segment. The contents of the row do not matter.
- */
-DATA(insert (Greenplum -1 -1 -1));
-
-#endif /*_GP_ID_H_*/
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/include/catalog/gp_persistent.h
----------------------------------------------------------------------
diff --git a/src/include/catalog/gp_persistent.h b/src/include/catalog/gp_persistent.h
index a0c92c6..e07a626 100755
--- a/src/include/catalog/gp_persistent.h
+++ b/src/include/catalog/gp_persistent.h
@@ -41,7 +41,6 @@
#include "access/xlogdefs.h"
#include "catalog/indexing.h"
#include "catalog/gp_global_sequence.h"
-#include "catalog/gp_id.h"
#include "catalog/pg_shdepend.h"
#define int8 int64
@@ -583,8 +582,7 @@ inline static bool GpPersistent_SkipXLogInfo(
/*
* gp_id and pg_shdepend
*/
- if (testOid == GpIdRelationId || // 5001
- testOid == SharedDependRelationId) // 1214
+ if (testOid == SharedDependRelationId) // 1214
return true;
return false;
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/include/catalog/pg_tidycat.h
----------------------------------------------------------------------
diff --git a/src/include/catalog/pg_tidycat.h b/src/include/catalog/pg_tidycat.h
index 7d96d0c..49c7ff3 100644
--- a/src/include/catalog/pg_tidycat.h
+++ b/src/include/catalog/pg_tidycat.h
@@ -28,7 +28,6 @@
#include "catalog/gp_configuration.h"
#include "catalog/gp_global_sequence.h"
-#include "catalog/gp_id.h"
#include "catalog/gp_master_mirroring.h"
#include "catalog/gp_persistent.h"
#include "catalog/gp_policy.h"
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/include/catalog/tidycat.pl
----------------------------------------------------------------------
diff --git a/src/include/catalog/tidycat.pl b/src/include/catalog/tidycat.pl
index 4711b8a..ce56496 100755
--- a/src/include/catalog/tidycat.pl
+++ b/src/include/catalog/tidycat.pl
@@ -426,7 +426,6 @@ my %dynamic_reltype_h =
(
5000 => "gp_configuration",
5002 => "gp_distribution_policy",
- 5001 => "gp_id",
5008 => "gp_master_mirroring",
5003 => "gp_version_at_initdb",
2600 => "pg_aggregate",
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/include/cdb/cdbcat.h
----------------------------------------------------------------------
diff --git a/src/include/cdb/cdbcat.h b/src/include/cdb/cdbcat.h
index 9b492d4..010bff5 100644
--- a/src/include/cdb/cdbcat.h
+++ b/src/include/cdb/cdbcat.h
@@ -30,7 +30,6 @@
#include "access/genam.h"
#include "access/heapam.h"
-#include "catalog/gp_id.h"
#include "catalog/gp_policy.h"
extern void checkPolicyForUniqueIndex(Relation rel, AttrNumber *indattr,
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/src/test/regress/expected/validator_function.out
----------------------------------------------------------------------
diff --git a/src/test/regress/expected/validator_function.out b/src/test/regress/expected/validator_function.out
index 3e5aedf..361a48b 100644
--- a/src/test/regress/expected/validator_function.out
+++ b/src/test/regress/expected/validator_function.out
@@ -53,7 +53,7 @@ FROM (
SELECT oid FROM pg_proc
WHERE proname = 'foo'
) AS bar;
-ERROR: language validation function 2248 called for language 10886 in stead of 10885
+ERROR: language validation function 2248 called for language 10885 in stead of 10884
-- --------------------------------------
-- Cannot run validator on functions to
-- which user has no privilege to execute
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dd52db55/tools/bin/gppylib/data/2.0.json
----------------------------------------------------------------------
diff --git a/tools/bin/gppylib/data/2.0.json b/tools/bin/gppylib/data/2.0.json
index e4e989c..c65e12d 100644
--- a/tools/bin/gppylib/data/2.0.json
+++ b/tools/bin/gppylib/data/2.0.json
@@ -308,50 +308,6 @@
"text" : "with (camelcase=GpGlobalSequence, oid=false, relid=5096, reltype_oid=6995, content=PERSISTENT)"
}
},
- "gp_id" : {
- "CamelCaseRelationId" : "GpIdRelationId",
- "colh" : {
- "content" : "int2",
- "dbid" : "int2",
- "gpname" : "NameData",
- "numsegments" : "int2"
- },
- "cols" : [
- {
- "colname" : "gpname",
- "ctype" : "NameData",
- "precomment" : "\n**TK_BLANK_LINE**",
- "sqltype" : "name"
- },
- {
- "colname" : "numsegments",
- "ctype" : "int2",
- "sqltype" : "smallint"
- },
- {
- "colname" : "dbid",
- "ctype" : "int2",
- "sqltype" : "smallint"
- },
- {
- "colname" : "content",
- "ctype" : "int2",
- "sqltype" : "smallint"
- }
- ],
- "filename" : "gp_id.h",
- "relid_comment_tag" : "/* relation id: 5001 - gp_id */\n",
- "tabdef_text" : "\n CREATE TABLE gp_id\n with (shared=true, oid=false, relid=5001, content=SEGMENT_LOCAL)\n (\n gpname name ,\n numsegments smallint ,\n dbid smallint ,\n content smallint \n )",
- "with" : {
- "bootstrap" : 0,
- "camelcase" : "GpId",
- "content" : "SEGMENT_LOCAL",
- "oid" : "",
- "relid" : "5001",
- "shared" : "1",
- "text" : "with (shared=true, oid=false, relid=5001, content=SEGMENT_LOCAL)"
- }
- },
"gp_interfaces" : {
"CamelCaseRelationId" : "GpInterfacesRelationId",
"UppercaseReltypeOid" : "GP_INTERFACES_RELTYPE_OID",