Skip to content

Commit

Permalink
rename and move declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
RekGRpth committed Jan 13, 2025
1 parent 84c41b9 commit 56ec176
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/gp_activetable.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,12 +1061,6 @@ pull_active_list_from_seg(StringInfoData *active_oids)
hash_destroy(local_active_table_oid_map);
}

typedef struct OidSize
{
Oid reloid;
Size tablesize;
} ActiveTableEntry;

/*
* Get active table list from all the segments.
* Since when loading data, there is case where only subset for
Expand All @@ -1079,12 +1073,12 @@ typedef struct OidSize
static void
pull_active_table_size_from_seg(const char *active_oids)
{
ActiveTableEntry *entry;
CdbPgResults cdb_pgresults = {NULL, 0};
StringInfoData sql_command;
int i;
int j;
HASHCTL ctl = {.keysize = sizeof(Oid), .entrysize = sizeof(ActiveTableEntry), .hcxt = CurrentMemoryContext};
ActiveTableEntryCombined *entry;
CdbPgResults cdb_pgresults = {NULL, 0};
StringInfoData sql_command;
int i;
int j;
HASHCTL ctl = {.keysize = sizeof(Oid), .entrysize = sizeof(ActiveTableEntryCombined), .hcxt = CurrentMemoryContext};
HTAB *local_table_stats_map = diskquota_hash_create("local active table map with size info", 1024, &ctl,
HASH_ELEM | HASH_CONTEXT, DISKQUOTA_OID_HASH);

Expand Down
6 changes: 6 additions & 0 deletions src/gp_activetable.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ typedef struct DiskQuotaActiveTableEntry
Size tablesize;
} DiskQuotaActiveTableEntry;

typedef struct ActiveTableEntryCombined
{
Oid reloid;
Size tablesize;
} ActiveTableEntryCombined;

extern void gp_fetch_active_tables(bool is_init, StringInfoData *active_oids);
extern void init_active_table_hook(void);
extern void init_shm_worker_active_tables(void);
Expand Down

0 comments on commit 56ec176

Please sign in to comment.