|
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, HASH_ENTER, HASH_FIND, hash_search(), HeapTupleIsValid, InitializeTableSpaceCache(), InvalidOid, MemoryContextAlloc(), MyDatabaseTableSpace, ObjectIdGetDatum(), TableSpaceCacheEntry::opts, 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().
| int get_tablespace_io_concurrency | ( | Oid | spcid | ) |
Definition at line 215 of file spccache.c.
References effective_io_concurrency, TableSpaceOpts::effective_io_concurrency, get_tablespace(), and TableSpaceCacheEntry::opts.
Referenced by read_stream_begin_impl().
| int get_tablespace_maintenance_io_concurrency | ( | Oid | spcid | ) |
Definition at line 229 of file spccache.c.
References get_tablespace(), maintenance_io_concurrency, TableSpaceOpts::maintenance_io_concurrency, and TableSpaceCacheEntry::opts.
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(), get_tablespace(), TableSpaceCacheEntry::opts, random_page_cost, TableSpaceOpts::random_page_cost, seq_page_cost, and TableSpaceOpts::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().
|
static |
Definition at line 78 of file spccache.c.
References CacheMemoryContext, CacheRegisterSyscacheCallback(), CreateCacheMemoryContext(), ctl, HASH_BLOBS, hash_create(), HASH_ELEM, InvalidateTableSpaceCacheCallback(), and TableSpaceCacheHash.
Referenced by get_tablespace().
Definition at line 55 of file spccache.c.
References elog, ERROR, HASH_REMOVE, hash_search(), hash_seq_init(), hash_seq_search(), TableSpaceCacheEntry::oid, TableSpaceCacheEntry::opts, pfree(), and TableSpaceCacheHash.
Referenced by InitializeTableSpaceCache().
|
static |
Definition at line 36 of file spccache.c.
Referenced by get_tablespace(), InitializeTableSpaceCache(), and InvalidateTableSpaceCacheCallback().