提交 bc932fbc 编写于 作者: A Adam Berlin 提交者: Adam Berlin

Push AO and external table relstorage values into Greenplum-specific code.

上级 9c7edd3e
......@@ -11,6 +11,9 @@
#include "pqexpbuffer.h"
/* needs to be kept in sync with pg_class.h */
#define RELSTORAGE_AOROWS 'a'
#define RELSTORAGE_AOCOLS 'c'
/*
* We cannot use executeQueryOrDie for the INSERTs below, because it has a size
......@@ -267,8 +270,7 @@ restore_aosegment_tables(void)
{
RelInfo *rel = &olddb->rel_arr.rels[relnum];
if (rel->relstorage == RELSTORAGE_AOROWS ||
rel->relstorage == RELSTORAGE_AOCOLS)
if (is_appendonly(rel->relstorage))
restore_aosegment_table(conn, rel);
}
......@@ -277,3 +279,9 @@ restore_aosegment_tables(void)
check_ok();
}
bool
is_appendonly(char relstorage)
{
return relstorage == RELSTORAGE_AOROWS || relstorage == RELSTORAGE_AOCOLS;
}
......@@ -17,6 +17,8 @@
#include "pg_upgrade_greenplum.h"
#include "check_gp.h"
#define RELSTORAGE_EXTERNAL 'x'
static void check_external_partition(void);
static void check_covering_aoindex(void);
static void check_partition_indexes(void);
......
......@@ -12,6 +12,7 @@
#define PG_OPTIONS_UTILITY_MODE " PGOPTIONS='-c gp_session_role=utility' "
/*
* Enumeration for operations in the progress report
*/
......@@ -78,6 +79,8 @@ void validate_greenplum_options(void);
/* aotable.c */
void restore_aosegment_tables(void);
bool is_appendonly(char relstorage);
/* gpdb4_heap_convert.c */
......
......@@ -749,11 +749,11 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
relkind = PQgetvalue(res, relnum, i_relkind) [0];
/*
* RELSTORAGE_AOROWS and RELSTORAGE_AOCOLS. The structure of append
* The structure of append
* optimized tables is similar enough for row and column oriented
* tables so we can handle them both here.
*/
if (relstorage == RELSTORAGE_AOROWS || relstorage == RELSTORAGE_AOCOLS)
if (is_appendonly(relstorage))
{
char *segrel;
char *visimaprel;
......
......@@ -45,11 +45,6 @@
#define DB_OIDS_DUMP_FILE_MASK "pg_upgrade_dump_%u_oids.sql"
#define OLD_TABLESPACES_FILE "old_tablespaces.txt"
/* needs to be kept in sync with pg_class.h */
#define RELSTORAGE_EXTERNAL 'x'
#define RELSTORAGE_AOROWS 'a'
#define RELSTORAGE_AOCOLS 'c'
#define DB_DUMP_LOG_FILE_MASK "pg_upgrade_dump_%u.log"
#define SERVER_LOG_FILE "pg_upgrade_server.log"
#define UTILITY_LOG_FILE "pg_upgrade_utility.log"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册