92 if (
strcmp(
a.alias_name,
b.alias_name) != 0)
104#define SH_PREFIX pgpa_trove_entry
105#define SH_ELEMENT_TYPE pgpa_trove_entry_element
106#define SH_KEY_TYPE pgpa_trove_entry_key
108#define SH_HASH_KEY(tb, key) pgpa_trove_entry_hash_key(key)
109#define SH_EQUAL(tb, a, b) pgpa_trove_entry_compare_key(a, b)
110#define SH_SCOPE static inline
287 *entries =
tslice->entries;
288 *nentries =
tslice->nused;
334 entry->
flags |= flags;
465 if (key.partition_name !=
NULL)
467 if (key.plan_name !=
NULL)
491 key.partition_name = rid->
partrel;
int bms_next_member(const Bitmapset *a, int prevbit)
Bitmapset * bms_add_member(Bitmapset *a, int x)
Bitmapset * bms_union(const Bitmapset *a, const Bitmapset *b)
#define Assert(condition)
#define palloc_object(type)
#define repalloc_array(pointer, type, count)
#define palloc_array(type, count)
#define palloc0_object(type)
static size_t fasthash_accum_cstring(fasthash_state *hs, const char *str)
static uint32 fasthash_final32(fasthash_state *hs, uint64 tweak)
static void fasthash_init(fasthash_state *hs, uint64 seed)
MemoryContext CurrentMemoryContext
#define foreach_ptr(type, var, lst)
static char buf[DEFAULT_XLOG_SEG_SIZE]
char * pgpa_cstring_advice_tag(pgpa_advice_tag_type advice_tag)
bool pgpa_identifier_matches_target(pgpa_identifier *rid, pgpa_advice_target *target)
void pgpa_format_advice_target(StringInfo str, pgpa_advice_target *target)
void pgpa_format_index_target(StringInfo str, pgpa_index_target *itarget)
@ PGPA_TAG_NESTED_LOOP_MATERIALIZE
@ PGPA_TAG_MERGE_JOIN_PLAIN
@ PGPA_TAG_NESTED_LOOP_MEMOIZE
@ PGPA_TAG_SEMIJOIN_NON_UNIQUE
@ PGPA_TAG_BITMAP_HEAP_SCAN
@ PGPA_TAG_INDEX_ONLY_SCAN
@ PGPA_TAG_SEMIJOIN_UNIQUE
@ PGPA_TAG_NESTED_LOOP_PLAIN
@ PGPA_TAG_MERGE_JOIN_MATERIALIZE
@ PGPA_TARGET_ORDERED_LIST
static bool strings_equal_or_both_null(const char *a, const char *b)
static bool pgpa_trove_entry_compare_key(pgpa_trove_entry_key a, pgpa_trove_entry_key b)
static Bitmapset * pgpa_trove_slice_lookup(pgpa_trove_slice *tslice, pgpa_identifier *rid)
void pgpa_trove_set_flags(pgpa_trove_entry *entries, Bitmapset *indexes, int flags)
static void pgpa_init_trove_slice(pgpa_trove_slice *tslice)
pgpa_trove * pgpa_build_trove(List *advice_items)
void pgpa_trove_append_flags(StringInfo buf, int flags)
static void pgpa_trove_add_to_slice(pgpa_trove_slice *tslice, pgpa_advice_tag_type tag, pgpa_advice_target *target)
void pgpa_trove_lookup_all(pgpa_trove *trove, pgpa_trove_lookup_type type, pgpa_trove_entry **entries, int *nentries)
char * pgpa_cstring_trove_entry(pgpa_trove_entry *entry)
static void pgpa_trove_add_to_hash(pgpa_trove_entry_hash *hash, pgpa_advice_target *target, int index)
void pgpa_trove_lookup(pgpa_trove *trove, pgpa_trove_lookup_type type, int nrids, pgpa_identifier *rids, pgpa_trove_result *result)
static uint32 pgpa_trove_entry_hash_key(pgpa_trove_entry_key key)
#define PGPA_TE_INAPPLICABLE
#define PGPA_TE_MATCH_FULL
#define PGPA_TE_MATCH_PARTIAL
#define PGPA_TE_CONFLICTING
static chr element(struct vars *v, const chr *startp, const chr *endp)
static unsigned hash(unsigned *uv, int n)
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoChar(StringInfo str, char ch)
void initStringInfo(StringInfo str)
pgpa_index_target * itarget
const char * partition_name
pgpa_advice_target * target
pgpa_trove_entry * entries
struct pgpa_trove_entry_hash * hash
pgpa_trove_entry * entries