Skip to content

Commit

Permalink
rework
Browse files Browse the repository at this point in the history
  • Loading branch information
RekGRpth committed Dec 23, 2024
1 parent 1e84372 commit 42caaf3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/gp_activetable.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,12 @@ pull_active_list_from_seg(StringInfoData *active_oids)
hash_destroy(local_active_table_oid_map);
}

typedef struct OidSize
{
Oid oid;
Size size;
} OidSize;

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

Expand Down

0 comments on commit 42caaf3

Please sign in to comment.