PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "funcapi.h"
#include "storage/lwlock.h"
#include "utils/old_snapshot.h"
#include "utils/snapmgr.h"
#include "utils/timestamp.h"
Go to the source code of this file.
Data Structures | |
struct | OldSnapshotTimeMapping |
Macros | |
#define | NUM_TIME_MAPPING_COLUMNS 3 |
Functions | |
PG_FUNCTION_INFO_V1 (pg_old_snapshot_time_mapping) | |
static OldSnapshotTimeMapping * | GetOldSnapshotTimeMapping (void) |
static TupleDesc | MakeOldSnapshotTimeMappingTupleDesc (void) |
static HeapTuple | MakeOldSnapshotTimeMappingTuple (TupleDesc tupdesc, OldSnapshotTimeMapping *mapping) |
Datum | pg_old_snapshot_time_mapping (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
#define NUM_TIME_MAPPING_COLUMNS 3 |
Definition at line 35 of file time_mapping.c.
Referenced by MakeOldSnapshotTimeMappingTuple(), and MakeOldSnapshotTimeMappingTupleDesc().
|
static |
Definition at line 85 of file time_mapping.c.
References OldSnapshotTimeMapping::count_used, OldSnapshotControlData::count_used, OldSnapshotTimeMapping::current_index, OldSnapshotTimeMapping::head_offset, OldSnapshotControlData::head_offset, OldSnapshotTimeMapping::head_timestamp, OldSnapshotControlData::head_timestamp, i, LW_SHARED, LWLockAcquire(), LWLockRelease(), offsetof, OLD_SNAPSHOT_TIME_MAP_ENTRIES, oldSnapshotControl, palloc(), OldSnapshotTimeMapping::xid_by_minute, and OldSnapshotControlData::xid_by_minute.
Referenced by pg_old_snapshot_time_mapping().
|
static |
Definition at line 128 of file time_mapping.c.
References array_position(), OldSnapshotTimeMapping::current_index, OldSnapshotTimeMapping::head_offset, OldSnapshotTimeMapping::head_timestamp, heap_form_tuple(), Int32GetDatum, NUM_TIME_MAPPING_COLUMNS, OLD_SNAPSHOT_TIME_MAP_ENTRIES, TimestampTzGetDatum, TimestampTzPlusMilliseconds, TransactionIdGetDatum, values, and OldSnapshotTimeMapping::xid_by_minute.
Referenced by pg_old_snapshot_time_mapping().
|
static |
Definition at line 108 of file time_mapping.c.
References BlessTupleDesc(), CreateTemplateTupleDesc(), NUM_TIME_MAPPING_COLUMNS, and TupleDescInitEntry().
Referenced by pg_old_snapshot_time_mapping().
PG_FUNCTION_INFO_V1 | ( | pg_old_snapshot_time_mapping | ) |
Datum pg_old_snapshot_time_mapping | ( | PG_FUNCTION_ARGS | ) |
Definition at line 49 of file time_mapping.c.
References OldSnapshotTimeMapping::count_used, OldSnapshotTimeMapping::current_index, GetOldSnapshotTimeMapping(), HeapTupleGetDatum, MakeOldSnapshotTimeMappingTuple(), MakeOldSnapshotTimeMappingTupleDesc(), MemoryContextSwitchTo(), FuncCallContext::multi_call_memory_ctx, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, FuncCallContext::tuple_desc, and FuncCallContext::user_fctx.
PG_MODULE_MAGIC |
Definition at line 37 of file time_mapping.c.