|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Data Structures | |
| struct | pgsa_entry_key |
| struct | pgsa_entry |
| struct | pgsa_stash |
| struct | pgsa_shared_state |
| struct | pgsa_stash_name |
Macros | |
| #define | SH_PREFIX pgsa_stash_name_table |
| #define | SH_ELEMENT_TYPE pgsa_stash_name |
| #define | SH_KEY_TYPE uint64 |
| #define | SH_SCOPE extern |
| #define | SH_DECLARE |
Typedefs | |
| typedef struct pgsa_entry_key | pgsa_entry_key |
| typedef struct pgsa_entry | pgsa_entry |
| typedef struct pgsa_stash | pgsa_stash |
| typedef struct pgsa_shared_state | pgsa_shared_state |
| typedef struct pgsa_stash_name | pgsa_stash_name |
Functions | |
| void | pgsa_attach (void) |
| void | pgsa_check_stash_name (char *stash_name) |
| void | pgsa_clear_advice_string (char *stash_name, int64 queryId) |
| void | pgsa_create_stash (char *stash_name) |
| void | pgsa_drop_stash (char *stash_name) |
| uint64 | pgsa_lookup_stash_id (char *stash_name) |
| void | pgsa_set_advice_string (char *stash_name, int64 queryId, char *advice_string) |
Variables | |
| pgsa_shared_state * | pgsa_state |
| dsa_area * | pgsa_dsa_area |
| dshash_table * | pgsa_stash_dshash |
| dshash_table * | pgsa_entry_dshash |
| #define SH_DECLARE |
Definition at line 80 of file pg_stash_advice.h.
| #define SH_ELEMENT_TYPE pgsa_stash_name |
Definition at line 77 of file pg_stash_advice.h.
Definition at line 78 of file pg_stash_advice.h.
| #define SH_PREFIX pgsa_stash_name_table |
Definition at line 76 of file pg_stash_advice.h.
Definition at line 79 of file pg_stash_advice.h.
| typedef struct pgsa_entry pgsa_entry |
| typedef struct pgsa_entry_key pgsa_entry_key |
| typedef struct pgsa_stash pgsa_stash |
Definition at line 182 of file pg_stash_advice.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, pgsa_shared_state::area, dsa_attach(), dsa_create, dsa_get_handle(), DSA_HANDLE_INVALID, dsa_pin(), dsa_pin_mapping(), pgsa_shared_state::dsa_tranche, dshash_attach(), dshash_create(), dshash_get_hash_table_handle(), DSHASH_HANDLE_INVALID, pgsa_shared_state::entry_hash, pgsa_shared_state::entry_tranche, fb(), GetNamedDSMSegment(), pgsa_shared_state::lock, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MemoryContextSwitchTo(), pg_stash_advice_mcxt, pgsa_dsa_area, pgsa_entry_dshash, pgsa_entry_dshash_parameters, pgsa_init_shared_state(), pgsa_stash_dshash, pgsa_stash_dshash_parameters, pgsa_state, pgsa_shared_state::stash_hash, pgsa_shared_state::stash_tranche, TopMemoryContext, and dshash_parameters::tranche_id.
Referenced by pg_create_advice_stash(), pg_drop_advice_stash(), pg_get_advice_stash_contents(), pg_get_advice_stashes(), pg_set_stashed_advice(), and pgsa_advisor().
Definition at line 288 of file pg_stash_advice.c.
References ereport, errcode(), errmsg, ERROR, fb(), NAMEDATALEN, pg_is_ascii(), and pgsa_is_identifier().
Referenced by pg_create_advice_stash(), pg_drop_advice_stash(), pg_get_advice_stash_contents(), and pg_set_stashed_advice().
Definition at line 392 of file pg_stash_advice.c.
References pgsa_entry::advice_string, Assert, dsa_free(), dshash_delete_entry(), dshash_find(), ereport, errcode(), errmsg, ERROR, fb(), InvalidDsaPointer, pgsa_shared_state::lock, LWLockHeldByMe(), pgsa_dsa_area, pgsa_entry_dshash, pgsa_lookup_stash_id(), and pgsa_state.
Referenced by pg_set_stashed_advice().
Definition at line 371 of file pg_stash_advice.c.
References Assert, dshash_find_or_insert, dshash_release_lock(), ereport, errcode(), errmsg, ERROR, fb(), pgsa_shared_state::lock, LW_EXCLUSIVE, LWLockHeldByMeInMode(), pgsa_shared_state::next_stash_id, pgsa_stash_dshash, and pgsa_state.
Referenced by pg_create_advice_stash().
Definition at line 432 of file pg_stash_advice.c.
References pgsa_entry::advice_string, Assert, dsa_free(), dshash_delete_current(), dshash_delete_entry(), dshash_find(), dshash_seq_init(), dshash_seq_next(), dshash_seq_term(), ereport, errcode(), errmsg, ERROR, fb(), InvalidDsaPointer, pgsa_entry::key, pgsa_shared_state::lock, LW_EXCLUSIVE, LWLockHeldByMeInMode(), pgsa_dsa_area, pgsa_entry_dshash, pgsa_stash_dshash, pgsa_entry_key::pgsa_stash_id, and pgsa_state.
Referenced by pg_drop_advice_stash().
Definition at line 516 of file pg_stash_advice.c.
References dshash_find(), dshash_release_lock(), fb(), and pgsa_stash_dshash.
Referenced by pg_get_advice_stash_contents(), pgsa_advisor(), pgsa_clear_advice_string(), and pgsa_set_advice_string().
Definition at line 535 of file pg_stash_advice.c.
References pgsa_entry::advice_string, Assert, dsa_allocate, dsa_free(), dsa_get_address(), DsaPointerIsValid, dshash_find_or_insert_extended(), DSHASH_INSERT_NO_OOM, dshash_release_lock(), ereport, errcode(), errdetail(), errmsg, ERROR, fb(), InvalidDsaPointer, pgsa_shared_state::lock, LWLockHeldByMe(), pgsa_dsa_area, pgsa_entry_dshash, pgsa_lookup_stash_id(), and pgsa_state.
Referenced by pg_set_stashed_advice().
|
extern |
Definition at line 49 of file pg_stash_advice.c.
Referenced by pg_get_advice_stash_contents(), pgsa_advisor(), pgsa_attach(), pgsa_clear_advice_string(), pgsa_drop_stash(), and pgsa_set_advice_string().
|
extern |
Definition at line 51 of file pg_stash_advice.c.
Referenced by pg_create_advice_stash(), pg_drop_advice_stash(), pg_get_advice_stash_contents(), pg_get_advice_stashes(), pg_set_stashed_advice(), pgsa_advisor(), pgsa_attach(), pgsa_clear_advice_string(), pgsa_drop_stash(), and pgsa_set_advice_string().
|
extern |
Definition at line 50 of file pg_stash_advice.c.
Referenced by pg_get_advice_stash_contents(), pg_get_advice_stashes(), pgsa_attach(), pgsa_create_stash(), pgsa_drop_stash(), and pgsa_lookup_stash_id().
|
extern |
Definition at line 48 of file pg_stash_advice.c.
Referenced by pg_create_advice_stash(), pg_drop_advice_stash(), pg_set_stashed_advice(), pgsa_attach(), pgsa_clear_advice_string(), pgsa_create_stash(), pgsa_drop_stash(), and pgsa_set_advice_string().