PostgreSQL Source Code git master
Loading...
Searching...
No Matches
pg_stash_advice.h File Reference
#include "lib/dshash.h"
#include "storage/lwlock.h"
#include "lib/simplehash.h"
Include dependency graph for pg_stash_advice.h:
This graph shows which files directly or indirectly include this file:

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 PGSA_DUMP_FILE   "pg_stash_advice.tsv"
 
#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_lockout (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_reset_all_stashes (void)
 
void pgsa_set_advice_string (char *stash_name, int64 queryId, char *advice_string)
 
void pgsa_start_worker (void)
 

Variables

pgsa_shared_statepgsa_state
 
dsa_areapgsa_dsa_area
 
dshash_tablepgsa_stash_dshash
 
dshash_tablepgsa_entry_dshash
 
bool pg_stash_advice_persist
 
int pg_stash_advice_persist_interval
 

Macro Definition Documentation

◆ PGSA_DUMP_FILE

#define PGSA_DUMP_FILE   "pg_stash_advice.tsv"

Definition at line 25 of file pg_stash_advice.h.

◆ SH_DECLARE

#define SH_DECLARE

Definition at line 85 of file pg_stash_advice.h.

◆ SH_ELEMENT_TYPE

#define SH_ELEMENT_TYPE   pgsa_stash_name

Definition at line 82 of file pg_stash_advice.h.

◆ SH_KEY_TYPE

#define SH_KEY_TYPE   uint64

Definition at line 83 of file pg_stash_advice.h.

◆ SH_PREFIX

#define SH_PREFIX   pgsa_stash_name_table

Definition at line 81 of file pg_stash_advice.h.

◆ SH_SCOPE

#define SH_SCOPE   extern

Definition at line 84 of file pg_stash_advice.h.

Typedef Documentation

◆ pgsa_entry

◆ pgsa_entry_key

◆ pgsa_shared_state

◆ pgsa_stash

◆ pgsa_stash_name

Function Documentation

◆ pgsa_attach()

void pgsa_attach ( void  )
extern

Definition at line 224 of file pg_stash_advice.c.

225{
226 bool found;
227 MemoryContext oldcontext;
228
229 /*
230 * Create a memory context to make sure that any control structures
231 * allocated in local memory are sufficiently persistent.
232 */
235 "pg_stash_advice",
238
239 /* Attach to the fixed-size state object if not already done. */
240 if (pgsa_state == NULL)
241 pgsa_state = GetNamedDSMSegment("pg_stash_advice",
242 sizeof(pgsa_shared_state),
244 &found, NULL);
245
246 /* Attach to the DSA area if not already done. */
247 if (pgsa_dsa_area == NULL)
248 {
250
254 {
259 }
260 else
261 {
264 }
266 }
267
268 /* Attach to the stash_name->stash_id hash table if not already done. */
269 if (pgsa_stash_dshash == NULL)
270 {
272
277 {
280 NULL);
284 }
285 else
286 {
291 }
292 }
293
294 /* Attach to the entry hash table if not already done. */
295 if (pgsa_entry_dshash == NULL)
296 {
298
303 {
306 NULL);
310 }
311 else
312 {
317 }
318 }
319
320 /* Restore previous memory context. */
321 MemoryContextSwitchTo(oldcontext);
322}
dsa_area * dsa_attach(dsa_handle handle)
Definition dsa.c:510
void dsa_pin_mapping(dsa_area *area)
Definition dsa.c:649
dsa_handle dsa_get_handle(dsa_area *area)
Definition dsa.c:498
void dsa_pin(dsa_area *area)
Definition dsa.c:987
#define dsa_create(tranche_id)
Definition dsa.h:117
dsm_handle dsa_handle
Definition dsa.h:136
#define DSA_HANDLE_INVALID
Definition dsa.h:139
dshash_table_handle dshash_get_hash_table_handle(dshash_table *hash_table)
Definition dshash.c:371
dshash_table * dshash_attach(dsa_area *area, const dshash_parameters *params, dshash_table_handle handle, void *arg)
Definition dshash.c:274
dshash_table * dshash_create(dsa_area *area, const dshash_parameters *params, void *arg)
Definition dshash.c:210
#define DSHASH_HANDLE_INVALID
Definition dshash.h:27
dsa_pointer dshash_table_handle
Definition dshash.h:24
void * GetNamedDSMSegment(const char *name, size_t size, void(*init_callback)(void *ptr, void *arg), bool *found, void *arg)
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
Definition lwlock.c:1150
void LWLockRelease(LWLock *lock)
Definition lwlock.c:1767
@ LW_EXCLUSIVE
Definition lwlock.h:104
MemoryContext TopMemoryContext
Definition mcxt.c:167
#define AllocSetContextCreate
Definition memutils.h:129
#define ALLOCSET_DEFAULT_SIZES
Definition memutils.h:160
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition palloc.h:138
dshash_table * pgsa_entry_dshash
dshash_table * pgsa_stash_dshash
static MemoryContext pg_stash_advice_mcxt
dsa_area * pgsa_dsa_area
static dshash_parameters pgsa_stash_dshash_parameters
pgsa_shared_state * pgsa_state
static dshash_parameters pgsa_entry_dshash_parameters
static void pgsa_init_shared_state(void *ptr, void *arg)
static int fb(int x)
dshash_table_handle entry_hash
dshash_table_handle stash_hash

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(), pg_start_stash_advice_worker(), pg_stash_advice_worker_main(), and pgsa_advisor().

◆ pgsa_check_lockout()

void pgsa_check_lockout ( void  )
extern

Definition at line 328 of file pg_stash_advice.c.

329{
333 errmsg("stash modifications are not allowed because \"%s\" has not been loaded yet",
335}
static bool pg_atomic_unlocked_test_flag(volatile pg_atomic_flag *ptr)
Definition atomics.h:189
int errcode(int sqlerrcode)
Definition elog.c:875
#define ERROR
Definition elog.h:40
#define ereport(elevel,...)
Definition elog.h:152
static char * errmsg
#define PGSA_DUMP_FILE
pg_atomic_flag stashes_ready

References ereport, errcode(), errmsg, ERROR, fb(), pg_atomic_unlocked_test_flag(), PGSA_DUMP_FILE, pgsa_state, and pgsa_shared_state::stashes_ready.

Referenced by pg_create_advice_stash(), pg_drop_advice_stash(), and pg_set_stashed_advice().

◆ pgsa_check_stash_name()

void pgsa_check_stash_name ( char stash_name)
extern

Definition at line 343 of file pg_stash_advice.c.

344{
345 /* Reject empty advice stash name. */
346 if (stash_name[0] == '\0')
349 errmsg("advice stash name may not be zero length"));
350
351 /* Reject overlong advice stash names. */
352 if (strlen(stash_name) + 1 > NAMEDATALEN)
355 errmsg("advice stash names may not be longer than %d bytes",
356 NAMEDATALEN - 1));
357
358 /*
359 * Reject non-ASCII advice stash names, since advice stashes are visible
360 * across all databases and the encodings of those databases might differ.
361 */
362 if (!pg_is_ascii(stash_name))
365 errmsg("advice stash name must not contain non-ASCII characters"));
366
367 /*
368 * Reject things that do not look like identifiers, since the ability to
369 * create an advice stash with non-printable characters or weird symbols
370 * in the name is not likely to be useful to anyone.
371 */
372 if (!pgsa_is_identifier(stash_name))
375 errmsg("advice stash name must begin with a letter or underscore and contain only letters, digits, and underscores"));
376}
#define NAMEDATALEN
static bool pgsa_is_identifier(char *str)
bool pg_is_ascii(const char *str)
Definition string.c:132

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().

◆ pgsa_clear_advice_string()

void pgsa_clear_advice_string ( char stash_name,
int64  queryId 
)
extern

Definition at line 450 of file pg_stash_advice.c.

451{
452 pgsa_entry *entry;
456
458
459 /* Translate the stash name to an integer ID. */
460 if ((stash_id = pgsa_lookup_stash_id(stash_name)) == 0)
463 errmsg("advice stash \"%s\" does not exist", stash_name));
464
465 /*
466 * Look for an existing entry, and free it. But, be sure to save the
467 * pointer to the associated advice string, if any.
468 */
469 memset(&key, 0, sizeof(pgsa_entry_key));
470 key.pgsa_stash_id = stash_id;
471 key.queryId = queryId;
472 entry = dshash_find(pgsa_entry_dshash, &key, true);
473 if (entry == NULL)
475 else
476 {
477 old_dp = entry->advice_string;
479 }
480
481 /* Now we free the advice string as well, if there was one. */
484
485 /* Bump change count. */
487}
static uint64 pg_atomic_add_fetch_u64(volatile pg_atomic_uint64 *ptr, int64 add_)
Definition atomics.h:564
#define Assert(condition)
Definition c.h:1002
uint64_t uint64
Definition c.h:684
void dsa_free(dsa_area *area, dsa_pointer dp)
Definition dsa.c:838
uint64 dsa_pointer
Definition dsa.h:62
#define InvalidDsaPointer
Definition dsa.h:78
void dshash_delete_entry(dshash_table *hash_table, void *entry)
Definition dshash.c:562
void * dshash_find(dshash_table *hash_table, const void *key, bool exclusive)
Definition dshash.c:394
bool LWLockHeldByMe(LWLock *lock)
Definition lwlock.c:1885
uint64 pgsa_lookup_stash_id(char *stash_name)
dsa_pointer advice_string
pg_atomic_uint64 change_count

References pgsa_entry::advice_string, Assert, pgsa_shared_state::change_count, dsa_free(), dshash_delete_entry(), dshash_find(), ereport, errcode(), errmsg, ERROR, fb(), InvalidDsaPointer, pgsa_shared_state::lock, LWLockHeldByMe(), pg_atomic_add_fetch_u64(), pgsa_dsa_area, pgsa_entry_dshash, pgsa_lookup_stash_id(), and pgsa_state.

Referenced by pg_set_stashed_advice().

◆ pgsa_create_stash()

void pgsa_create_stash ( char stash_name)
extern

Definition at line 426 of file pg_stash_advice.c.

427{
429 bool found;
430
432
433 /* Create a stash with this name, unless one already exists. */
434 stash = dshash_find_or_insert(pgsa_stash_dshash, stash_name, &found);
435 if (found)
438 errmsg("advice stash \"%s\" already exists", stash_name));
439 stash->pgsa_stash_id = pgsa_state->next_stash_id++;
441
442 /* Bump change count. */
444}
void dshash_release_lock(dshash_table *hash_table, void *entry)
Definition dshash.c:579
#define dshash_find_or_insert(hash_table, key, found)
Definition dshash.h:109
bool LWLockHeldByMeInMode(LWLock *lock, LWLockMode mode)
Definition lwlock.c:1929

References Assert, pgsa_shared_state::change_count, 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, pg_atomic_add_fetch_u64(), pgsa_stash_dshash, and pgsa_state.

Referenced by pg_create_advice_stash(), and pgsa_restore_stashes().

◆ pgsa_drop_stash()

void pgsa_drop_stash ( char stash_name)
extern

Definition at line 493 of file pg_stash_advice.c.

494{
495 pgsa_entry *entry;
499
501
502 /* Remove the entry for this advice stash. */
503 stash = dshash_find(pgsa_stash_dshash, stash_name, true);
504 if (stash == NULL)
507 errmsg("advice stash \"%s\" does not exist", stash_name));
508 stash_id = stash->pgsa_stash_id;
510
511 /*
512 * Now remove all the entries. Since pgsa_state->lock must be held at
513 * least in shared mode to insert entries into pgsa_entry_dshash, it
514 * doesn't matter whether we do this before or after deleting the entry
515 * from pgsa_stash_dshash.
516 */
518 while ((entry = dshash_seq_next(&iterator)) != NULL)
519 {
520 if (stash_id == entry->key.pgsa_stash_id)
521 {
522 if (entry->advice_string != InvalidDsaPointer)
525 }
526 }
528
529 /* Bump change count. */
531}
void dshash_seq_init(dshash_seq_status *status, dshash_table *hash_table, bool exclusive)
Definition dshash.c:659
void dshash_seq_term(dshash_seq_status *status)
Definition dshash.c:768
void * dshash_seq_next(dshash_seq_status *status)
Definition dshash.c:678
void dshash_delete_current(dshash_seq_status *status)
Definition dshash.c:778
uint64 pgsa_stash_id
pgsa_entry_key key

References pgsa_entry::advice_string, Assert, pgsa_shared_state::change_count, 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(), pg_atomic_add_fetch_u64(), pgsa_dsa_area, pgsa_entry_dshash, pgsa_stash_dshash, pgsa_entry_key::pgsa_stash_id, and pgsa_state.

Referenced by pg_drop_advice_stash().

◆ pgsa_lookup_stash_id()

uint64 pgsa_lookup_stash_id ( char stash_name)
extern

Definition at line 631 of file pg_stash_advice.c.

632{
635
636 /* Search the shared hash table. */
637 stash = dshash_find(pgsa_stash_dshash, stash_name, false);
638 if (stash == NULL)
639 return 0;
640 stash_id = stash->pgsa_stash_id;
642
643 return stash_id;
644}

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().

◆ pgsa_reset_all_stashes()

void pgsa_reset_all_stashes ( void  )
extern

Definition at line 540 of file pg_stash_advice.c.

541{
543 pgsa_entry *entry;
544
546
547 /* Remove all stashes. */
549 while (dshash_seq_next(&iter) != NULL)
551 dshash_seq_term(&iter);
552
553 /* Remove all entries. */
555 while ((entry = dshash_seq_next(&iter)) != NULL)
556 {
557 if (entry->advice_string != InvalidDsaPointer)
560 }
561 dshash_seq_term(&iter);
562
563 /* Reset the stash ID counter. */
565}
#define UINT64CONST(x)
Definition c.h:690

References pgsa_entry::advice_string, Assert, dsa_free(), dshash_delete_current(), dshash_seq_init(), dshash_seq_next(), dshash_seq_term(), fb(), InvalidDsaPointer, pgsa_shared_state::lock, LW_EXCLUSIVE, LWLockHeldByMeInMode(), pgsa_shared_state::next_stash_id, pgsa_dsa_area, pgsa_entry_dshash, pgsa_stash_dshash, pgsa_state, and UINT64CONST.

Referenced by pgsa_read_from_disk().

◆ pgsa_set_advice_string()

void pgsa_set_advice_string ( char stash_name,
int64  queryId,
char advice_string 
)
extern

Definition at line 650 of file pg_stash_advice.c.

651{
652 pgsa_entry *entry;
653 bool found;
658
659 /*
660 * The caller must hold our lock, at least in shared mode. This is
661 * important for two reasons.
662 *
663 * First, it holds off interrupts, so that we can't bail out of this code
664 * after allocating DSA memory for the advice string and before storing
665 * the resulting pointer somewhere that others can find it.
666 *
667 * Second, we need to avoid a race against pgsa_drop_stash(). That
668 * function removes a stash_name->stash_id mapping and all the entries for
669 * that stash_id. Without the lock, there's a race condition no matter
670 * which of those things it does first, because as soon as we've looked up
671 * the stash ID, that whole function can execute before we do the rest of
672 * our work, which would result in us adding an entry for a stash that no
673 * longer exists.
674 */
676
677 /* Look up the stash ID. */
678 if ((stash_id = pgsa_lookup_stash_id(stash_name)) == 0)
681 errmsg("advice stash \"%s\" does not exist", stash_name));
682
683 /* Allocate space for the advice string. */
684 new_dp = dsa_allocate(pgsa_dsa_area, strlen(advice_string) + 1);
685 strcpy(dsa_get_address(pgsa_dsa_area, new_dp), advice_string);
686
687 /* Attempt to insert an entry into the hash table. */
688 memset(&key, 0, sizeof(pgsa_entry_key));
689 key.pgsa_stash_id = stash_id;
690 key.queryId = queryId;
693
694 /*
695 * If it didn't work, bail out, being careful to free the shared memory
696 * we've already allocated before, since error cleanup will not do so.
697 */
698 if (entry == NULL)
699 {
703 errmsg("out of memory"),
704 errdetail("could not insert advice string into shared hash table"));
705 }
706
707 /* Update the entry and release the lock. */
708 old_dp = found ? entry->advice_string : InvalidDsaPointer;
709 entry->advice_string = new_dp;
711
712 /*
713 * We're not safe from leaks yet!
714 *
715 * There's now a pointer to new_dp in the entry that we just updated, but
716 * that means that there's no longer anything pointing to old_dp.
717 */
720
721 /* Bump change count. */
723}
void * dsa_get_address(dsa_area *area, dsa_pointer dp)
Definition dsa.c:954
#define dsa_allocate(area, size)
Definition dsa.h:109
#define DsaPointerIsValid(x)
Definition dsa.h:106
void * dshash_find_or_insert_extended(dshash_table *hash_table, const void *key, bool *found, int flags)
Definition dshash.c:442
#define DSHASH_INSERT_NO_OOM
Definition dshash.h:96
int errdetail(const char *fmt,...) pg_attribute_printf(1

References pgsa_entry::advice_string, Assert, pgsa_shared_state::change_count, 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(), pg_atomic_add_fetch_u64(), pgsa_dsa_area, pgsa_entry_dshash, pgsa_lookup_stash_id(), and pgsa_state.

Referenced by pg_set_stashed_advice(), and pgsa_restore_entries().

◆ pgsa_start_worker()

void pgsa_start_worker ( void  )
extern

Definition at line 729 of file pg_stash_advice.c.

730{
731 BackgroundWorker worker = {0};
733 BgwHandleStatus status;
734 pid_t pid;
735
739 strcpy(worker.bgw_library_name, "pg_stash_advice");
740 strcpy(worker.bgw_function_name, "pg_stash_advice_worker_main");
741 strcpy(worker.bgw_name, "pg_stash_advice worker");
742 strcpy(worker.bgw_type, "pg_stash_advice worker");
743
744 /*
745 * If process_shared_preload_libraries_in_progress = true, we may be in
746 * the postmaster, in which case this will really register the worker, or
747 * we may be in a child process in an EXEC_BACKEND build, in which case it
748 * will silently do nothing (which is the correct behavior).
749 */
751 {
753 return;
754 }
755
756 /*
757 * If process_shared_preload_libraries_in_progress = false, we're being
758 * asked to start the worker after system startup time. In other words,
759 * unless this is single-user mode, we're not in the postmaster, so we
760 * should use RegisterDynamicBackgroundWorker and then wait for startup to
761 * complete. (If we do happen to be in single-user mode, this will error
762 * out, which is fine.)
763 */
764 worker.bgw_notify_pid = MyProcPid;
765 if (!RegisterDynamicBackgroundWorker(&worker, &handle))
768 errmsg("could not register background process"),
769 errhint("You may need to increase \"max_worker_processes\".")));
770 status = WaitForBackgroundWorkerStartup(handle, &pid);
771 if (status != BGWH_STARTED)
774 errmsg("could not start background process"),
775 errhint("More details may be available in the server log.")));
776}
void RegisterBackgroundWorker(BackgroundWorker *worker)
Definition bgworker.c:962
BgwHandleStatus WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp)
Definition bgworker.c:1235
bool RegisterDynamicBackgroundWorker(BackgroundWorker *worker, BackgroundWorkerHandle **handle)
Definition bgworker.c:1068
BgwHandleStatus
Definition bgworker.h:111
@ BGWH_STARTED
Definition bgworker.h:112
@ BgWorkerStart_ConsistentState
Definition bgworker.h:87
#define BGWORKER_SHMEM_ACCESS
Definition bgworker.h:53
#define BGW_DEFAULT_RESTART_INTERVAL
Definition bgworker.h:91
int errhint(const char *fmt,...) pg_attribute_printf(1
int MyProcPid
Definition globals.c:49
bool process_shared_preload_libraries_in_progress
Definition miscinit.c:1790
char bgw_function_name[BGW_MAXLEN]
Definition bgworker.h:104
char bgw_name[BGW_MAXLEN]
Definition bgworker.h:98
char bgw_type[BGW_MAXLEN]
Definition bgworker.h:99
BgWorkerStartTime bgw_start_time
Definition bgworker.h:101
pid_t bgw_notify_pid
Definition bgworker.h:107
char bgw_library_name[MAXPGPATH]
Definition bgworker.h:103

References BGW_DEFAULT_RESTART_INTERVAL, BackgroundWorker::bgw_flags, BackgroundWorker::bgw_function_name, BackgroundWorker::bgw_library_name, BackgroundWorker::bgw_name, BackgroundWorker::bgw_notify_pid, BackgroundWorker::bgw_restart_time, BackgroundWorker::bgw_start_time, BackgroundWorker::bgw_type, BGWH_STARTED, BGWORKER_SHMEM_ACCESS, BgWorkerStart_ConsistentState, ereport, errcode(), errhint(), errmsg, ERROR, fb(), MyProcPid, process_shared_preload_libraries_in_progress, RegisterBackgroundWorker(), RegisterDynamicBackgroundWorker(), and WaitForBackgroundWorkerStartup().

Referenced by _PG_init(), and pg_start_stash_advice_worker().

Variable Documentation

◆ pg_stash_advice_persist

bool pg_stash_advice_persist
extern

Definition at line 51 of file pg_stash_advice.c.

Referenced by _PG_init(), and pgsa_init_shared_state().

◆ pg_stash_advice_persist_interval

int pg_stash_advice_persist_interval
extern

Definition at line 52 of file pg_stash_advice.c.

Referenced by _PG_init(), and pg_stash_advice_worker_main().

◆ pgsa_dsa_area

◆ pgsa_entry_dshash

◆ pgsa_stash_dshash

◆ pgsa_state