|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "fmgr.h"#include "storage/dsm_registry.h"#include "storage/lwlock.h"#include "utils/builtins.h"
Go to the source code of this file.
Data Structures | |
| struct | TestDSMRegistryStruct |
| struct | TestDSMRegistryHashEntry |
Typedefs | |
| typedef struct TestDSMRegistryStruct | TestDSMRegistryStruct |
| typedef struct TestDSMRegistryHashEntry | TestDSMRegistryHashEntry |
Variables | |
| PG_MODULE_MAGIC | |
| static TestDSMRegistryStruct * | tdr_dsm |
| static dsa_area * | tdr_dsa |
| static dshash_table * | tdr_hash |
| static const dshash_parameters | dsh_params |
| Datum get_val_in_hash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 132 of file test_dsm_registry.c.
References cstring_to_text(), dsa_get_address(), dshash_find(), dshash_release_lock(), fb(), PG_GETARG_DATUM, PG_RETURN_NULL, PG_RETURN_TEXT_P, tdr_attach_shmem(), tdr_dsa, tdr_hash, TextDatumGetCString, val, and TestDSMRegistryHashEntry::val.
| Datum get_val_in_shmem | ( | PG_FUNCTION_ARGS | ) |
Definition at line 90 of file test_dsm_registry.c.
References TestDSMRegistryStruct::lck, LW_SHARED, LWLockAcquire(), LWLockRelease(), PG_RETURN_INT32, tdr_attach_shmem(), tdr_dsm, and TestDSMRegistryStruct::val.
Definition at line 47 of file test_dsm_registry.c.
References arg, elog, ERROR, fb(), TestDSMRegistryStruct::lck, LWLockInitialize(), LWLockNewTrancheId(), and TestDSMRegistryStruct::val.
Referenced by tdr_attach_shmem().
| PG_FUNCTION_INFO_V1 | ( | get_val_in_hash | ) |
| PG_FUNCTION_INFO_V1 | ( | get_val_in_shmem | ) |
| PG_FUNCTION_INFO_V1 | ( | set_val_in_hash | ) |
| PG_FUNCTION_INFO_V1 | ( | set_val_in_shmem | ) |
| Datum set_val_in_hash | ( | PG_FUNCTION_ARGS | ) |
Definition at line 105 of file test_dsm_registry.c.
References dsa_allocate, dsa_free(), dsa_get_address(), dshash_find_or_insert(), dshash_release_lock(), ereport, errmsg(), ERROR, fb(), PG_GETARG_DATUM, PG_RETURN_VOID, tdr_attach_shmem(), tdr_dsa, tdr_hash, TextDatumGetCString, val, and TestDSMRegistryHashEntry::val.
| Datum set_val_in_shmem | ( | PG_FUNCTION_ARGS | ) |
Definition at line 77 of file test_dsm_registry.c.
References TestDSMRegistryStruct::lck, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), PG_GETARG_INT32, PG_RETURN_VOID, tdr_attach_shmem(), tdr_dsm, and TestDSMRegistryStruct::val.
Definition at line 59 of file test_dsm_registry.c.
References dsh_params, fb(), GetNamedDSA(), GetNamedDSHash(), GetNamedDSMSegment(), init_tdr_dsm(), tdr_dsa, tdr_dsm, and tdr_hash.
Referenced by get_val_in_hash(), get_val_in_shmem(), set_val_in_hash(), and set_val_in_shmem().
|
static |
Definition at line 38 of file test_dsm_registry.c.
Referenced by tdr_attach_shmem().
| PG_MODULE_MAGIC |
Definition at line 20 of file test_dsm_registry.c.
|
static |
Definition at line 35 of file test_dsm_registry.c.
Referenced by get_val_in_hash(), set_val_in_hash(), and tdr_attach_shmem().
|
static |
Definition at line 34 of file test_dsm_registry.c.
Referenced by get_val_in_shmem(), set_val_in_shmem(), and tdr_attach_shmem().
|
static |
Definition at line 36 of file test_dsm_registry.c.
Referenced by get_val_in_hash(), set_val_in_hash(), and tdr_attach_shmem().