PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/slru.h"
#include "access/transam.h"
#include "miscadmin.h"
#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/shmem.h"
#include "utils/builtins.h"
Go to the source code of this file.
Macros | |
#define | NUM_TEST_BUFFERS 16 |
#define | TestSlruCtl (&TestSlruCtlData) |
Variables | |
PG_MODULE_MAGIC | |
static SlruCtlData | TestSlruCtlData |
static shmem_request_hook_type | prev_shmem_request_hook = NULL |
static shmem_startup_hook_type | prev_shmem_startup_hook = NULL |
#define NUM_TEST_BUFFERS 16 |
Definition at line 41 of file test_slru.c.
#define TestSlruCtl (&TestSlruCtlData) |
Definition at line 44 of file test_slru.c.
void _PG_init | ( | void | ) |
Definition at line 249 of file test_slru.c.
References ereport, errdetail(), errmsg(), ERROR, prev_shmem_request_hook, prev_shmem_startup_hook, process_shared_preload_libraries_in_progress, shmem_request_hook, shmem_startup_hook, test_slru_shmem_request(), and test_slru_shmem_startup().
PG_FUNCTION_INFO_V1 | ( | test_slru_delete_all | ) |
PG_FUNCTION_INFO_V1 | ( | test_slru_page_delete | ) |
PG_FUNCTION_INFO_V1 | ( | test_slru_page_exists | ) |
PG_FUNCTION_INFO_V1 | ( | test_slru_page_read | ) |
PG_FUNCTION_INFO_V1 | ( | test_slru_page_readonly | ) |
PG_FUNCTION_INFO_V1 | ( | test_slru_page_sync | ) |
PG_FUNCTION_INFO_V1 | ( | test_slru_page_truncate | ) |
PG_FUNCTION_INFO_V1 | ( | test_slru_page_write | ) |
PG_FUNCTION_INFO_V1 | ( | test_slru_page_writeall | ) |
Datum test_slru_delete_all | ( | PG_FUNCTION_ARGS | ) |
Definition at line 185 of file test_slru.c.
References PG_RETURN_VOID, SlruScanDirectory(), test_slru_scan_cb(), and TestSlruCtl.
Datum test_slru_page_delete | ( | PG_FUNCTION_ARGS | ) |
Definition at line 161 of file test_slru.c.
References elog, NOTICE, PG_GETARG_INT64, PG_RETURN_VOID, FileTag::segno, SLRU_PAGES_PER_SEGMENT, SlruDeleteSegment(), and TestSlruCtl.
Datum test_slru_page_exists | ( | PG_FUNCTION_ARGS | ) |
Definition at line 130 of file test_slru.c.
References LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), PG_GETARG_INT64, PG_RETURN_BOOL, SimpleLruDoesPhysicalPageExist(), SimpleLruGetBankLock(), and TestSlruCtl.
|
static |
Definition at line 208 of file test_slru.c.
Referenced by test_slru_shmem_startup().
Datum test_slru_page_read | ( | PG_FUNCTION_ARGS | ) |
Definition at line 92 of file test_slru.c.
References cstring_to_text(), data, InvalidTransactionId, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), PG_GETARG_BOOL, PG_GETARG_INT64, PG_RETURN_TEXT_P, SimpleLruGetBankLock(), SimpleLruReadPage(), and TestSlruCtl.
Datum test_slru_page_readonly | ( | PG_FUNCTION_ARGS | ) |
Definition at line 111 of file test_slru.c.
References Assert, cstring_to_text(), data, InvalidTransactionId, LWLockHeldByMe(), LWLockRelease(), PG_GETARG_INT64, PG_RETURN_TEXT_P, SimpleLruGetBankLock(), SimpleLruReadPage_ReadOnly(), and TestSlruCtl.
Datum test_slru_page_sync | ( | PG_FUNCTION_ARGS | ) |
Definition at line 144 of file test_slru.c.
References elog, MAXPGPATH, NOTICE, PG_GETARG_INT64, PG_RETURN_VOID, FileTag::segno, SLRU_PAGES_PER_SEGMENT, SlruSyncFileTag(), and TestSlruCtl.
Datum test_slru_page_truncate | ( | PG_FUNCTION_ARGS | ) |
Definition at line 176 of file test_slru.c.
References PG_GETARG_INT64, PG_RETURN_VOID, SimpleLruTruncate(), and TestSlruCtl.
Datum test_slru_page_write | ( | PG_FUNCTION_ARGS | ) |
Definition at line 57 of file test_slru.c.
References Assert, data, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), PG_GETARG_INT64, PG_GETARG_TEXT_PP, PG_RETURN_VOID, SimpleLruGetBankLock(), SimpleLruWritePage(), SimpleLruZeroPage(), SLRU_PAGE_VALID, TestSlruCtl, and text_to_cstring().
Datum test_slru_page_writeall | ( | PG_FUNCTION_ARGS | ) |
Definition at line 85 of file test_slru.c.
References PG_RETURN_VOID, SimpleLruWriteAll(), and TestSlruCtl.
|
static |
Definition at line 50 of file test_slru.c.
References ctl, data, elog, filename, NOTICE, and SlruScanDirCbDeleteAll().
Referenced by test_slru_delete_all().
|
static |
Definition at line 198 of file test_slru.c.
References NUM_TEST_BUFFERS, prev_shmem_request_hook, RequestAddinShmemSpace(), and SimpleLruShmemSize().
Referenced by _PG_init().
|
static |
Definition at line 214 of file test_slru.c.
References LWLockNewTrancheId(), LWLockRegisterTranche(), MakePGDirectory(), NUM_TEST_BUFFERS, prev_shmem_startup_hook, SimpleLruInit(), SYNC_HANDLER_NONE, test_slru_page_precedes_logically(), and TestSlruCtl.
Referenced by _PG_init().
PG_MODULE_MAGIC |
Definition at line 25 of file test_slru.c.
|
static |
Definition at line 46 of file test_slru.c.
Referenced by _PG_init(), and test_slru_shmem_request().
|
static |
Definition at line 47 of file test_slru.c.
Referenced by _PG_init(), and test_slru_shmem_startup().
|
static |
Definition at line 43 of file test_slru.c.