提交 d72466a4 编写于 作者: N Ning Yu

Revert "gpexpand: fix the template creation"

This reverts commit f91e2d81.
上级 cbcfafe6
......@@ -56,9 +56,7 @@ DBNAME = 'postgres'
# an empty b-tree index file is considered invalid, it needs to contain a meta
# page, so we use the pg_partition_oid_index of template0 as a template of
# empty index file.
# NOTE: the database oid of template0 is not a fixed value, it must be filled
# with the real oid before using.
EMPTY_INDEX = 'base/<template0 database oid>/5112'
EMPTY_INDEX = 'base/13199/5112'
#global var
_gp_expand = None
......@@ -701,11 +699,6 @@ SELECT pg_catalog.pg_relation_filepath(i.indexrelid)
AND c.relfilenode <> 0
""" % (regclasses)
dboid_of_template0_sql = """
SELECT oid
FROM pg_catalog.pg_database
WHERE datname = 'template0'
"""
self.master_only_relation_paths = []
self.master_only_index_paths = []
......@@ -748,12 +741,6 @@ SELECT oid
for row in catalog.getDatabaseList(conn)]
self.logger.debug("list of databases: %s" % databases)
# also get the database oid of template0 and build the real path
# for EMPTY_INDEX
dboid0 = dbconn.execSQLForSingleton(conn, dboid_of_template0_sql)
global EMPTY_INDEX
EMPTY_INDEX = 'base/%s/5112' % dboid0
# then list the per-database master-only tables
for database in databases:
# template0 does not accept connections, so we have no chance to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册