PostgreSQL Source Code git master
Loading...
Searching...
No Matches
spccache.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void get_tablespace_page_costs (Oid spcid, float8 *spc_random_page_cost, float8 *spc_seq_page_cost)
 
int get_tablespace_io_concurrency (Oid spcid)
 
int get_tablespace_maintenance_io_concurrency (Oid spcid)
 

Function Documentation

◆ get_tablespace_io_concurrency()

int get_tablespace_io_concurrency ( Oid  spcid)
extern

Definition at line 216 of file spccache.c.

217{
219
220 if (!spc->opts || spc->opts->effective_io_concurrency < 0)
222 else
223 return spc->opts->effective_io_concurrency;
224}
int effective_io_concurrency
Definition bufmgr.c:185
static int fb(int x)
static TableSpaceCacheEntry * get_tablespace(Oid spcid)
Definition spccache.c:108

References effective_io_concurrency, fb(), and get_tablespace().

Referenced by read_stream_begin_impl().

◆ get_tablespace_maintenance_io_concurrency()

int get_tablespace_maintenance_io_concurrency ( Oid  spcid)
extern

Definition at line 230 of file spccache.c.

231{
233
234 if (!spc->opts || spc->opts->maintenance_io_concurrency < 0)
236 else
237 return spc->opts->maintenance_io_concurrency;
238}
int maintenance_io_concurrency
Definition bufmgr.c:192

References fb(), get_tablespace(), and maintenance_io_concurrency.

Referenced by heap_index_delete_tuples(), and read_stream_begin_impl().

◆ get_tablespace_page_costs()

void get_tablespace_page_costs ( Oid  spcid,
float8 spc_random_page_cost,
float8 spc_seq_page_cost 
)
extern

Definition at line 183 of file spccache.c.

186{
188
189 Assert(spc != NULL);
190
191 if (spc_random_page_cost)
192 {
193 if (!spc->opts || spc->opts->random_page_cost < 0)
194 *spc_random_page_cost = random_page_cost;
195 else
196 *spc_random_page_cost = spc->opts->random_page_cost;
197 }
198
200 {
201 if (!spc->opts || spc->opts->seq_page_cost < 0)
203 else
204 *spc_seq_page_cost = spc->opts->seq_page_cost;
205 }
206}
#define Assert(condition)
Definition c.h:885
double random_page_cost
Definition costsize.c:131
double seq_page_cost
Definition costsize.c:130

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