PostgreSQL Source Code git master
|
#include "postgres.h"
#include "port/atomics.h"
#include "storage/shm_toc.h"
#include "storage/spin.h"
Go to the source code of this file.
Data Structures | |
struct | shm_toc_entry |
struct | shm_toc |
Typedefs | |
typedef struct shm_toc_entry | shm_toc_entry |
Functions | |
shm_toc * | shm_toc_create (uint64 magic, void *address, Size nbytes) |
shm_toc * | shm_toc_attach (uint64 magic, void *address) |
void * | shm_toc_allocate (shm_toc *toc, Size nbytes) |
Size | shm_toc_freespace (shm_toc *toc) |
void | shm_toc_insert (shm_toc *toc, uint64 key, void *address) |
void * | shm_toc_lookup (shm_toc *toc, uint64 key, bool noError) |
Size | shm_toc_estimate (shm_toc_estimator *e) |
typedef struct shm_toc_entry shm_toc_entry |
Definition at line 88 of file shm_toc.c.
References BUFFERALIGN, ereport, errcode(), errmsg(), ERROR, SpinLockAcquire, SpinLockRelease, shm_toc::toc_allocated_bytes, shm_toc::toc_mutex, shm_toc::toc_nentry, and shm_toc::toc_total_bytes.
Referenced by _brin_begin_parallel(), _bt_begin_parallel(), ExecAggInitializeDSM(), ExecAppendInitializeDSM(), ExecBitmapHeapInitializeDSM(), ExecCustomScanInitializeDSM(), ExecForeignScanInitializeDSM(), ExecHashInitializeDSM(), ExecHashJoinInitializeDSM(), ExecIncrementalSortInitializeDSM(), ExecIndexOnlyScanInitializeDSM(), ExecIndexScanInitializeDSM(), ExecInitParallelPlan(), ExecMemoizeInitializeDSM(), ExecParallelSetupTupleQueues(), ExecSeqScanInitializeDSM(), ExecSortInitializeDSM(), GetSessionDsmHandle(), InitializeParallelDSM(), pa_setup_dsm(), parallel_vacuum_init(), and setup_dynamic_shared_memory().
Definition at line 64 of file shm_toc.c.
References Assert, shm_toc::toc_allocated_bytes, shm_toc::toc_magic, and shm_toc::toc_total_bytes.
Referenced by AttachSession(), ParallelApplyWorkerMain(), ParallelWorkerMain(), and test_shm_mq_main().
Definition at line 40 of file shm_toc.c.
References Assert, BUFFERALIGN_DOWN, SpinLockInit, shm_toc::toc_allocated_bytes, shm_toc::toc_magic, shm_toc::toc_mutex, shm_toc::toc_nentry, and shm_toc::toc_total_bytes.
Referenced by GetSessionDsmHandle(), InitializeParallelDSM(), pa_setup_dsm(), and setup_dynamic_shared_memory().
Size shm_toc_estimate | ( | shm_toc_estimator * | e | ) |
Definition at line 263 of file shm_toc.c.
References add_size(), BUFFERALIGN, and mul_size().
Referenced by GetSessionDsmHandle(), InitializeParallelDSM(), pa_setup_dsm(), and setup_dynamic_shared_memory().
Definition at line 131 of file shm_toc.c.
References Assert, BUFFERALIGN, SpinLockAcquire, SpinLockRelease, shm_toc::toc_allocated_bytes, shm_toc::toc_mutex, shm_toc::toc_nentry, and shm_toc::toc_total_bytes.
Definition at line 171 of file shm_toc.c.
References Assert, ereport, errcode(), errmsg(), ERROR, shm_toc_entry::key, sort-test::key, shm_toc_entry::offset, PG_UINT32_MAX, pg_write_barrier, SpinLockAcquire, SpinLockRelease, shm_toc::toc_allocated_bytes, shm_toc::toc_entry, shm_toc::toc_mutex, shm_toc::toc_nentry, and shm_toc::toc_total_bytes.
Referenced by _brin_begin_parallel(), _bt_begin_parallel(), ExecAggInitializeDSM(), ExecAppendInitializeDSM(), ExecBitmapHeapInitializeDSM(), ExecCustomScanInitializeDSM(), ExecForeignScanInitializeDSM(), ExecHashInitializeDSM(), ExecHashJoinInitializeDSM(), ExecIncrementalSortInitializeDSM(), ExecIndexOnlyScanInitializeDSM(), ExecIndexScanInitializeDSM(), ExecInitParallelPlan(), ExecMemoizeInitializeDSM(), ExecParallelSetupTupleQueues(), ExecSeqScanInitializeDSM(), ExecSortInitializeDSM(), GetSessionDsmHandle(), InitializeParallelDSM(), pa_setup_dsm(), parallel_vacuum_init(), and setup_dynamic_shared_memory().
Definition at line 232 of file shm_toc.c.
References elog, ERROR, i, shm_toc_entry::key, sort-test::key, pg_read_barrier, shm_toc::toc_entry, shm_toc::toc_nentry, and UINT64_FORMAT.
Referenced by _brin_parallel_build_main(), _bt_parallel_build_main(), attach_to_queues(), AttachSession(), ExecAggInitializeWorker(), ExecAppendInitializeWorker(), ExecBitmapHeapInitializeWorker(), ExecCustomScanInitializeWorker(), ExecCustomScanReInitializeDSM(), ExecForeignScanInitializeWorker(), ExecForeignScanReInitializeDSM(), ExecHashInitializeWorker(), ExecHashJoinInitializeWorker(), ExecHashJoinReInitializeDSM(), ExecIncrementalSortInitializeWorker(), ExecIndexOnlyScanInitializeWorker(), ExecIndexScanInitializeWorker(), ExecMemoizeInitializeWorker(), ExecParallelGetQueryDesc(), ExecParallelGetReceiver(), ExecParallelReinitialize(), ExecParallelSetupTupleQueues(), ExecSeqScanInitializeWorker(), ExecSortInitializeWorker(), parallel_vacuum_main(), ParallelApplyWorkerMain(), ParallelQueryMain(), ParallelWorkerMain(), ReinitializeParallelDSM(), test_shm_mq_main(), and WaitForParallelWorkersToFinish().