PostgreSQL Source Code  git master
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)

Definition at line 215 of file spccache.c.

216 {
217  TableSpaceCacheEntry *spc = get_tablespace(spcid);
218 
219  if (!spc->opts || spc->opts->effective_io_concurrency < 0)
221  else
222  return spc->opts->effective_io_concurrency;
223 }
int effective_io_concurrency
Definition: bufmgr.c:145
static TableSpaceCacheEntry * get_tablespace(Oid spcid)
Definition: spccache.c:107
TableSpaceOpts * opts
Definition: spccache.c:41
int effective_io_concurrency
Definition: tablespace.h:44

References effective_io_concurrency, TableSpaceOpts::effective_io_concurrency, get_tablespace(), and TableSpaceCacheEntry::opts.

Referenced by ExecInitBitmapHeapScan().

◆ get_tablespace_maintenance_io_concurrency()

int get_tablespace_maintenance_io_concurrency ( Oid  spcid)

Definition at line 229 of file spccache.c.

230 {
231  TableSpaceCacheEntry *spc = get_tablespace(spcid);
232 
233  if (!spc->opts || spc->opts->maintenance_io_concurrency < 0)
235  else
236  return spc->opts->maintenance_io_concurrency;
237 }
int maintenance_io_concurrency
Definition: bufmgr.c:152
int maintenance_io_concurrency
Definition: tablespace.h:45

References get_tablespace(), maintenance_io_concurrency, TableSpaceOpts::maintenance_io_concurrency, and TableSpaceCacheEntry::opts.

Referenced by acquire_sample_rows(), and heap_index_delete_tuples().

◆ get_tablespace_page_costs()

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

Definition at line 182 of file spccache.c.

185 {
186  TableSpaceCacheEntry *spc = get_tablespace(spcid);
187 
188  Assert(spc != NULL);
189 
190  if (spc_random_page_cost)
191  {
192  if (!spc->opts || spc->opts->random_page_cost < 0)
193  *spc_random_page_cost = random_page_cost;
194  else
195  *spc_random_page_cost = spc->opts->random_page_cost;
196  }
197 
198  if (spc_seq_page_cost)
199  {
200  if (!spc->opts || spc->opts->seq_page_cost < 0)
201  *spc_seq_page_cost = seq_page_cost;
202  else
203  *spc_seq_page_cost = spc->opts->seq_page_cost;
204  }
205 }
double random_page_cost
Definition: costsize.c:121
double seq_page_cost
Definition: costsize.c:120
Assert(fmt[strlen(fmt) - 1] !='\n')
float8 random_page_cost
Definition: tablespace.h:42
float8 seq_page_cost
Definition: tablespace.h:43

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