|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/reloptions.h"#include "catalog/pg_tablespace.h"#include "commands/tablespace.h"#include "miscadmin.h"#include "optimizer/optimizer.h"#include "storage/bufmgr.h"#include "utils/catcache.h"#include "utils/hsearch.h"#include "utils/inval.h"#include "utils/spccache.h"#include "utils/syscache.h"#include "varatt.h"
Go to the source code of this file.
Data Structures | |
| struct | TableSpaceCacheEntry |
Functions | |
| static void | InvalidateTableSpaceCacheCallback (Datum arg, int cacheid, uint32 hashvalue) |
| static void | InitializeTableSpaceCache (void) |
| static TableSpaceCacheEntry * | get_tablespace (Oid spcid) |
| void | get_tablespace_page_costs (Oid spcid, double *spc_random_page_cost, double *spc_seq_page_cost) |
| int | get_tablespace_io_concurrency (Oid spcid) |
| int | get_tablespace_maintenance_io_concurrency (Oid spcid) |
Variables | |
| static HTAB * | TableSpaceCacheHash = NULL |
|
static |
Definition at line 107 of file spccache.c.
References CacheMemoryContext, fb(), HASH_ENTER, HASH_FIND, hash_search(), HeapTupleIsValid, InitializeTableSpaceCache(), InvalidOid, MemoryContextAlloc(), MyDatabaseTableSpace, ObjectIdGetDatum(), opts, ReleaseSysCache(), SearchSysCache1(), SysCacheGetAttr(), tablespace_reloptions(), TableSpaceCacheHash, and VARSIZE().
Referenced by get_tablespace_io_concurrency(), get_tablespace_maintenance_io_concurrency(), and get_tablespace_page_costs().
Definition at line 215 of file spccache.c.
References effective_io_concurrency, fb(), and get_tablespace().
Referenced by read_stream_begin_impl().
Definition at line 229 of file spccache.c.
References fb(), get_tablespace(), and maintenance_io_concurrency.
Referenced by heap_index_delete_tuples(), and read_stream_begin_impl().
| void get_tablespace_page_costs | ( | Oid | spcid, |
| double * | spc_random_page_cost, | ||
| double * | spc_seq_page_cost | ||
| ) |
Definition at line 182 of file spccache.c.
References Assert, fb(), get_tablespace(), random_page_cost, and seq_page_cost.
Referenced by brincostestimate(), cost_bitmap_heap_scan(), cost_index(), cost_samplescan(), cost_seqscan(), cost_tidrangescan(), cost_tidscan(), genericcostestimate(), gincostestimate(), and system_time_samplescangetsamplesize().
Definition at line 78 of file spccache.c.
References CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), ctl, fb(), HASH_BLOBS, hash_create(), HASH_ELEM, InvalidateTableSpaceCacheCallback(), HASHCTL::keysize, and TableSpaceCacheHash.
Referenced by get_tablespace().
Definition at line 55 of file spccache.c.
References elog, ERROR, fb(), HASH_REMOVE, hash_search(), hash_seq_init(), hash_seq_search(), pfree(), and TableSpaceCacheHash.
Referenced by InitializeTableSpaceCache().
Definition at line 36 of file spccache.c.
Referenced by get_tablespace(), InitializeTableSpaceCache(), and InvalidateTableSpaceCacheCallback().