PostgreSQL Source Code
git master
|
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/xact.h"
#include "executor/tuptable.h"
#include "storage/read_stream.h"
#include "utils/rel.h"
#include "utils/snapshot.h"
Go to the source code of this file.
Data Structures | |
struct | TM_FailureData |
struct | TM_IndexDelete |
struct | TM_IndexStatus |
struct | TM_IndexDeleteOp |
struct | TableAmRoutine |
Macros | |
#define | DEFAULT_TABLE_ACCESS_METHOD "heap" |
#define | TABLE_INSERT_SKIP_FSM 0x0002 |
#define | TABLE_INSERT_FROZEN 0x0004 |
#define | TABLE_INSERT_NO_LOGICAL 0x0008 |
#define | TUPLE_LOCK_FLAG_LOCK_UPDATE_IN_PROGRESS (1 << 0) |
#define | TUPLE_LOCK_FLAG_FIND_LAST_VERSION (1 << 1) |
Typedefs | |
typedef enum ScanOptions | ScanOptions |
typedef enum TM_Result | TM_Result |
typedef enum TU_UpdateIndexes | TU_UpdateIndexes |
typedef struct TM_FailureData | TM_FailureData |
typedef struct TM_IndexDelete | TM_IndexDelete |
typedef struct TM_IndexStatus | TM_IndexStatus |
typedef struct TM_IndexDeleteOp | TM_IndexDeleteOp |
typedef void(* | IndexBuildCallback) (Relation index, ItemPointer tid, Datum *values, bool *isnull, bool tupleIsAlive, void *state) |
typedef struct TableAmRoutine | TableAmRoutine |
Enumerations | |
enum | ScanOptions { SO_TYPE_SEQSCAN = 1 << 0 , SO_TYPE_BITMAPSCAN = 1 << 1 , SO_TYPE_SAMPLESCAN = 1 << 2 , SO_TYPE_TIDSCAN = 1 << 3 , SO_TYPE_TIDRANGESCAN = 1 << 4 , SO_TYPE_ANALYZE = 1 << 5 , SO_ALLOW_STRAT = 1 << 6 , SO_ALLOW_SYNC = 1 << 7 , SO_ALLOW_PAGEMODE = 1 << 8 , SO_TEMP_SNAPSHOT = 1 << 9 , SO_NEED_TUPLES = 1 << 10 } |
enum | TM_Result { TM_Ok , TM_Invisible , TM_SelfModified , TM_Updated , TM_Deleted , TM_BeingModified , TM_WouldBlock } |
enum | TU_UpdateIndexes { TU_None , TU_All , TU_Summarizing } |
Variables | |
PGDLLIMPORT char * | default_table_access_method |
PGDLLIMPORT bool | synchronize_seqscans |
typedef enum ScanOptions ScanOptions |
typedef struct TableAmRoutine TableAmRoutine |
typedef struct TM_FailureData TM_FailureData |
typedef struct TM_IndexDelete TM_IndexDelete |
typedef struct TM_IndexDeleteOp TM_IndexDeleteOp |
typedef struct TM_IndexStatus TM_IndexStatus |
typedef enum TU_UpdateIndexes TU_UpdateIndexes |
enum ScanOptions |
enum TM_Result |
enum TU_UpdateIndexes |
const TableAmRoutine* GetHeapamTableAmRoutine | ( | void | ) |
Definition at line 2682 of file heapam_handler.c.
References heapam_methods.
Referenced by formrdesc(), and heap_getnext().
const TableAmRoutine* GetTableAmRoutine | ( | Oid | amhandler | ) |
Definition at line 28 of file tableamapi.c.
References Assert, DatumGetPointer(), elog, ERROR, TableAmRoutine::index_build_range_scan, TableAmRoutine::index_delete_tuples, TableAmRoutine::index_fetch_begin, TableAmRoutine::index_fetch_end, TableAmRoutine::index_fetch_reset, TableAmRoutine::index_fetch_tuple, TableAmRoutine::index_validate_scan, IsA, TableAmRoutine::multi_insert, OidFunctionCall0, TableAmRoutine::parallelscan_estimate, TableAmRoutine::parallelscan_initialize, TableAmRoutine::parallelscan_reinitialize, TableAmRoutine::relation_copy_data, TableAmRoutine::relation_copy_for_cluster, TableAmRoutine::relation_estimate_size, TableAmRoutine::relation_needs_toast_table, TableAmRoutine::relation_nontransactional_truncate, TableAmRoutine::relation_set_new_filelocator, TableAmRoutine::relation_size, TableAmRoutine::relation_vacuum, TableAmRoutine::scan_analyze_next_block, TableAmRoutine::scan_analyze_next_tuple, TableAmRoutine::scan_begin, TableAmRoutine::scan_bitmap_next_block, TableAmRoutine::scan_bitmap_next_tuple, TableAmRoutine::scan_end, TableAmRoutine::scan_getnextslot, TableAmRoutine::scan_rescan, TableAmRoutine::scan_sample_next_block, TableAmRoutine::scan_sample_next_tuple, TableAmRoutine::tuple_complete_speculative, TableAmRoutine::tuple_delete, TableAmRoutine::tuple_fetch_row_version, TableAmRoutine::tuple_get_latest_tid, TableAmRoutine::tuple_insert, TableAmRoutine::tuple_insert_speculative, TableAmRoutine::tuple_lock, TableAmRoutine::tuple_satisfies_snapshot, TableAmRoutine::tuple_tid_valid, and TableAmRoutine::tuple_update.
Referenced by InitTableAmRoutine().
void simple_table_tuple_delete | ( | Relation | rel, |
ItemPointer | tid, | ||
Snapshot | snapshot | ||
) |
Definition at line 290 of file tableam.c.
References elog, ERROR, GetCurrentCommandId(), InvalidSnapshot, table_tuple_delete(), TM_Deleted, TM_Ok, TM_SelfModified, and TM_Updated.
Referenced by ExecSimpleRelationDelete().
void simple_table_tuple_insert | ( | Relation | rel, |
TupleTableSlot * | slot | ||
) |
Definition at line 276 of file tableam.c.
References GetCurrentCommandId(), and table_tuple_insert().
Referenced by ExecSimpleRelationInsert().
void simple_table_tuple_update | ( | Relation | rel, |
ItemPointer | otid, | ||
TupleTableSlot * | slot, | ||
Snapshot | snapshot, | ||
TU_UpdateIndexes * | update_indexes | ||
) |
Definition at line 335 of file tableam.c.
References elog, ERROR, GetCurrentCommandId(), InvalidSnapshot, table_tuple_update(), TM_Deleted, TM_Ok, TM_SelfModified, and TM_Updated.
Referenced by ExecSimpleRelationUpdate().
|
inlinestatic |
Definition at line 912 of file tableam.h.
References sort-test::key, RelationData::rd_tableam, TableAmRoutine::scan_begin, SO_ALLOW_PAGEMODE, SO_ALLOW_STRAT, SO_ALLOW_SYNC, and SO_TYPE_SEQSCAN.
Referenced by ATRewriteTable(), check_default_partition_contents(), DoCopyTo(), heapam_relation_copy_for_cluster(), pgrowlocks(), RelationFindReplTupleSeq(), SeqNext(), validateDomainCheckConstraint(), validateDomainNotNullConstraint(), and validateForeignKeyConstraint().
|
inlinestatic |
Definition at line 1017 of file tableam.h.
References RelationData::rd_tableam, TableAmRoutine::scan_begin, and SO_TYPE_ANALYZE.
Referenced by acquire_sample_rows().
|
inlinestatic |
Definition at line 957 of file tableam.h.
References TableScanDescData::bitmap, sort-test::key, RelationData::rd_tableam, TableAmRoutine::scan_begin, SO_ALLOW_PAGEMODE, SO_NEED_TUPLES, SO_TYPE_BITMAPSCAN, and TableScanDescData::st.
Referenced by BitmapHeapNext().
TableScanDesc table_beginscan_catalog | ( | Relation | relation, |
int | nkeys, | ||
struct ScanKeyData * | key | ||
) |
Definition at line 112 of file tableam.c.
References GetCatalogSnapshot(), sort-test::key, RelationData::rd_tableam, RegisterSnapshot(), RelationGetRelid, TableAmRoutine::scan_begin, SO_ALLOW_PAGEMODE, SO_ALLOW_STRAT, SO_ALLOW_SYNC, SO_TEMP_SNAPSHOT, and SO_TYPE_SEQSCAN.
Referenced by AlterTableMoveAll(), AlterTableSpaceOptions(), check_db_file_conflict(), CreateDatabaseUsingFileCopy(), do_autovacuum(), DropSetting(), DropTableSpace(), find_typed_table_dependencies(), get_all_vacuum_rels(), get_database_list(), get_subscription_list(), get_tables_to_cluster(), get_tablespace_name(), get_tablespace_oid(), GetAllTablesPublicationRelations(), getRelationsInNamespace(), GetSchemaPublicationRelations(), objectsInSchemaToOids(), populate_typ_list(), ReindexMultipleTables(), remove_dbtablespaces(), RemoveSubscriptionRel(), RenameTableSpace(), ThereIsAtLeastOneRole(), and vac_truncate_clog().
TableScanDesc table_beginscan_parallel | ( | Relation | relation, |
ParallelTableScanDesc | pscan | ||
) |
Definition at line 165 of file tableam.c.
References Assert, ParallelTableScanDescData::phs_locator, ParallelTableScanDescData::phs_snapshot_any, ParallelTableScanDescData::phs_snapshot_off, RelationData::rd_locator, RelationData::rd_tableam, RegisterSnapshot(), RelFileLocatorEquals, RestoreSnapshot(), TableAmRoutine::scan_begin, SnapshotAny, SO_ALLOW_PAGEMODE, SO_ALLOW_STRAT, SO_ALLOW_SYNC, SO_TEMP_SNAPSHOT, and SO_TYPE_SEQSCAN.
Referenced by _brin_parallel_scan_and_build(), _bt_parallel_scan_and_sort(), ExecSeqScanInitializeDSM(), and ExecSeqScanInitializeWorker().
|
inlinestatic |
Definition at line 981 of file tableam.h.
References sort-test::key, RelationData::rd_tableam, TableAmRoutine::scan_begin, SO_ALLOW_PAGEMODE, SO_ALLOW_STRAT, SO_ALLOW_SYNC, and SO_TYPE_SAMPLESCAN.
Referenced by tablesample_init().
|
inlinestatic |
Definition at line 936 of file tableam.h.
References sort-test::key, RelationData::rd_tableam, TableAmRoutine::scan_begin, SO_ALLOW_PAGEMODE, SO_ALLOW_STRAT, SO_ALLOW_SYNC, and SO_TYPE_SEQSCAN.
Referenced by bt_check_every_level(), heapam_index_build_range_scan(), heapam_index_validate_scan(), IndexCheckExclusion(), pgstat_heap(), and systable_beginscan().
|
inlinestatic |
Definition at line 1004 of file tableam.h.
References RelationData::rd_tableam, TableAmRoutine::scan_begin, and SO_TYPE_TIDSCAN.
Referenced by currtid_internal(), and TidListEval().
|
inlinestatic |
Definition at line 1093 of file tableam.h.
References RelationData::rd_tableam, TableScanDescData::rs_rd, TableAmRoutine::scan_begin, TableAmRoutine::scan_set_tidrange, SO_ALLOW_PAGEMODE, and SO_TYPE_TIDRANGESCAN.
Referenced by TidRangeNext().
Size table_block_parallelscan_initialize | ( | Relation | rel, |
ParallelTableScanDesc | pscan | ||
) |
Definition at line 388 of file tableam.c.
References ParallelBlockTableScanDescData::base, InvalidBlockNumber, NBuffers, pg_atomic_init_u64(), ParallelTableScanDescData::phs_locator, ParallelBlockTableScanDescData::phs_mutex, ParallelBlockTableScanDescData::phs_nallocated, ParallelBlockTableScanDescData::phs_nblocks, ParallelBlockTableScanDescData::phs_startblock, ParallelTableScanDescData::phs_syncscan, RelationData::rd_locator, RelationGetNumberOfBlocks, RelationUsesLocalBuffers, SpinLockInit, and synchronize_seqscans.
BlockNumber table_block_parallelscan_nextpage | ( | Relation | rel, |
ParallelBlockTableScanWorker | pbscanwork, | ||
ParallelBlockTableScanDesc | pbscan | ||
) |
Definition at line 491 of file tableam.c.
References ParallelBlockTableScanDescData::base, if(), InvalidBlockNumber, PARALLEL_SEQSCAN_RAMPDOWN_CHUNKS, pg_atomic_fetch_add_u64(), ParallelBlockTableScanDescData::phs_nallocated, ParallelBlockTableScanDescData::phs_nblocks, ParallelBlockTableScanDescData::phs_startblock, ParallelTableScanDescData::phs_syncscan, ParallelBlockTableScanWorkerData::phsw_chunk_remaining, ParallelBlockTableScanWorkerData::phsw_chunk_size, ParallelBlockTableScanWorkerData::phsw_nallocated, and ss_report_location().
Referenced by heap_scan_stream_read_next_parallel().
void table_block_parallelscan_reinitialize | ( | Relation | rel, |
ParallelTableScanDesc | pscan | ||
) |
Definition at line 406 of file tableam.c.
References pg_atomic_write_u64(), and ParallelBlockTableScanDescData::phs_nallocated.
void table_block_parallelscan_startblock_init | ( | Relation | rel, |
ParallelBlockTableScanWorker | pbscanwork, | ||
ParallelBlockTableScanDesc | pbscan | ||
) |
Definition at line 421 of file tableam.c.
References ParallelBlockTableScanDescData::base, InvalidBlockNumber, Max, MaxBlockNumber, Min, PARALLEL_SEQSCAN_MAX_CHUNK_SIZE, PARALLEL_SEQSCAN_NCHUNKS, pg_nextpower2_32(), ParallelBlockTableScanDescData::phs_mutex, ParallelBlockTableScanDescData::phs_nblocks, ParallelBlockTableScanDescData::phs_startblock, ParallelTableScanDescData::phs_syncscan, ParallelBlockTableScanWorkerData::phsw_chunk_size, SpinLockAcquire, SpinLockRelease, ss_get_location(), and StaticAssertStmt.
Referenced by heap_scan_stream_read_next_parallel().
void table_block_relation_estimate_size | ( | Relation | rel, |
int32 * | attr_widths, | ||
BlockNumber * | pages, | ||
double * | tuples, | ||
double * | allvisfrac, | ||
Size | overhead_bytes_per_tuple, | ||
Size | usable_bytes_per_page | ||
) |
Definition at line 653 of file tableam.c.
References fillfactor, get_rel_data_width(), HEAP_DEFAULT_FILLFACTOR, if(), RelationData::rd_rel, RelationGetFillFactor, and RelationGetNumberOfBlocks.
Referenced by heapam_estimate_rel_size().
uint64 table_block_relation_size | ( | Relation | rel, |
ForkNumber | forkNumber | ||
) |
Definition at line 616 of file tableam.c.
References i, InvalidForkNumber, MAX_FORKNUM, RelationGetSmgr(), and smgrnblocks().
|
inlinestatic |
Definition at line 1028 of file tableam.h.
References RelationData::rd_tableam, TableScanDescData::rs_rd, and TableAmRoutine::scan_end.
Referenced by acquire_sample_rows(), AlterTableMoveAll(), AlterTableSpaceOptions(), ATRewriteTable(), check_db_file_conflict(), check_default_partition_contents(), CreateDatabaseUsingFileCopy(), currtid_internal(), do_autovacuum(), DoCopyTo(), DropSetting(), DropTableSpace(), ExecEndBitmapHeapScan(), ExecEndSampleScan(), ExecEndSeqScan(), ExecEndTidRangeScan(), ExecEndTidScan(), find_typed_table_dependencies(), get_all_vacuum_rels(), get_database_list(), get_subscription_list(), get_tables_to_cluster(), get_tablespace_name(), get_tablespace_oid(), GetAllTablesPublicationRelations(), getRelationsInNamespace(), GetSchemaPublicationRelations(), heapam_index_build_range_scan(), heapam_index_validate_scan(), heapam_relation_copy_for_cluster(), IndexCheckExclusion(), objectsInSchemaToOids(), pgrowlocks(), pgstat_heap(), populate_typ_list(), ReindexMultipleTables(), RelationFindReplTupleSeq(), remove_dbtablespaces(), RemoveSubscriptionRel(), RenameTableSpace(), systable_endscan(), ThereIsAtLeastOneRole(), vac_truncate_clog(), validateDomainCheckConstraint(), validateDomainNotNullConstraint(), and validateForeignKeyConstraint().
|
inlinestatic |
Definition at line 1604 of file tableam.h.
References TableAmRoutine::finish_bulk_insert, and RelationData::rd_tableam.
Referenced by ATRewriteTable(), CopyMultiInsertBufferCleanup(), intorel_shutdown(), and transientrel_shutdown().
|
inlinestatic |
Definition at line 1817 of file tableam.h.
References callback(), TableAmRoutine::index_build_range_scan, progress, and RelationData::rd_tableam.
Referenced by summarize_range().
|
inlinestatic |
Definition at line 1784 of file tableam.h.
References callback(), TableAmRoutine::index_build_range_scan, InvalidBlockNumber, progress, and RelationData::rd_tableam.
Referenced by _brin_parallel_scan_and_build(), _bt_parallel_scan_and_sort(), _bt_spools_heapscan(), blbuild(), brinbuild(), bt_check_every_level(), ginbuild(), gistbuild(), hashbuild(), and spgbuild().
|
inlinestatic |
Definition at line 1365 of file tableam.h.
References TableAmRoutine::index_delete_tuples, and RelationData::rd_tableam.
Referenced by _bt_delitems_delete_check(), and index_compute_xid_horizon_for_tuples().
|
inlinestatic |
Definition at line 1201 of file tableam.h.
References TableAmRoutine::index_fetch_begin, and RelationData::rd_tableam.
Referenced by index_beginscan(), index_beginscan_parallel(), and table_index_fetch_tuple_check().
|
inlinestatic |
Definition at line 1220 of file tableam.h.
References TableAmRoutine::index_fetch_end, RelationData::rd_tableam, and IndexFetchTableData::rel.
Referenced by index_endscan(), and table_index_fetch_tuple_check().
|
inlinestatic |
Definition at line 1211 of file tableam.h.
References TableAmRoutine::index_fetch_reset, RelationData::rd_tableam, and IndexFetchTableData::rel.
Referenced by index_getnext_tid(), index_parallelrescan(), index_rescan(), and index_restrpos().
|
inlinestatic |
Definition at line 1250 of file tableam.h.
References bsysscan, CheckXidAlive, elog, ERROR, TableAmRoutine::index_fetch_tuple, RelationData::rd_tableam, IndexFetchTableData::rel, TransactionIdIsValid, and unlikely.
Referenced by index_fetch_heap(), and table_index_fetch_tuple_check().
bool table_index_fetch_tuple_check | ( | Relation | rel, |
ItemPointer | tid, | ||
Snapshot | snapshot, | ||
bool * | all_dead | ||
) |
Definition at line 208 of file tableam.c.
References ExecDropSingleTupleTableSlot(), table_index_fetch_begin(), table_index_fetch_end(), table_index_fetch_tuple(), and table_slot_create().
Referenced by _bt_check_unique().
|
inlinestatic |
Definition at line 1848 of file tableam.h.
References TableAmRoutine::index_validate_scan, and RelationData::rd_tableam.
Referenced by validate_index().
|
inlinestatic |
Definition at line 1466 of file tableam.h.
References TableAmRoutine::multi_insert, and RelationData::rd_tableam.
Referenced by CopyMultiInsertBufferFlush().
Definition at line 130 of file tableam.c.
References add_size(), Assert, EstimateSnapshotSpace(), IsMVCCSnapshot, TableAmRoutine::parallelscan_estimate, RelationData::rd_tableam, and SnapshotAny.
Referenced by _brin_parallel_estimate_shared(), _bt_parallel_estimate_shared(), and ExecSeqScanEstimate().
void table_parallelscan_initialize | ( | Relation | rel, |
ParallelTableScanDesc | pscan, | ||
Snapshot | snapshot | ||
) |
Definition at line 145 of file tableam.c.
References Assert, IsMVCCSnapshot, TableAmRoutine::parallelscan_initialize, ParallelTableScanDescData::phs_snapshot_any, ParallelTableScanDescData::phs_snapshot_off, RelationData::rd_tableam, SerializeSnapshot(), and SnapshotAny.
Referenced by _brin_begin_parallel(), _bt_begin_parallel(), and ExecSeqScanInitializeDSM().
|
inlinestatic |
Definition at line 1183 of file tableam.h.
References TableAmRoutine::parallelscan_reinitialize, and RelationData::rd_tableam.
Referenced by ExecSeqScanReInitializeDSM().
|
inlinestatic |
Definition at line 1660 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::relation_copy_data.
Referenced by ATExecSetTableSpace().
|
inlinestatic |
Definition at line 1687 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::relation_copy_for_cluster.
Referenced by copy_table_data().
|
inlinestatic |
Definition at line 1946 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::relation_estimate_size.
Referenced by estimate_rel_size().
|
inlinestatic |
Definition at line 1925 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::relation_fetch_toast_slice.
Referenced by toast_fetch_datum(), and toast_fetch_datum_slice().
Definition at line 1886 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::relation_needs_toast_table.
Referenced by needs_toast_table().
|
inlinestatic |
Definition at line 1648 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::relation_nontransactional_truncate.
Referenced by heap_truncate_one_rel().
|
inlinestatic |
Definition at line 1630 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::relation_set_new_filelocator.
Referenced by heap_create(), and RelationSetNewRelfilenumber().
|
inlinestatic |
Definition at line 1877 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::relation_size.
Referenced by RelationGetNumberOfBlocksInFork().
Definition at line 1896 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::relation_toast_am.
Referenced by create_toast_table().
|
inlinestatic |
Definition at line 1716 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::relation_vacuum.
Referenced by vacuum_rel().
|
inlinestatic |
Definition at line 1037 of file tableam.h.
References sort-test::key, RelationData::rd_tableam, TableScanDescData::rs_rd, and TableAmRoutine::scan_rescan.
Referenced by ExecReScanBitmapHeapScan(), ExecReScanSeqScan(), ExecReScanTidScan(), and RelationFindReplTupleSeq().
|
inlinestatic |
Definition at line 1052 of file tableam.h.
References sort-test::key, RelationData::rd_tableam, TableScanDescData::rs_rd, and TableAmRoutine::scan_rescan.
Referenced by tablesample_init().
|
inlinestatic |
Definition at line 1114 of file tableam.h.
References Assert, RelationData::rd_tableam, TableScanDescData::rs_flags, TableScanDescData::rs_rd, TableAmRoutine::scan_rescan, TableAmRoutine::scan_set_tidrange, and SO_TYPE_TIDRANGESCAN.
Referenced by TidRangeNext().
|
inlinestatic |
Definition at line 1731 of file tableam.h.
References RelationData::rd_tableam, TableScanDescData::rs_rd, and TableAmRoutine::scan_analyze_next_block.
Referenced by acquire_sample_rows().
|
inlinestatic |
Definition at line 1747 of file tableam.h.
References RelationData::rd_tableam, TableScanDescData::rs_rd, and TableAmRoutine::scan_analyze_next_tuple.
Referenced by acquire_sample_rows().
|
inlinestatic |
Definition at line 1980 of file tableam.h.
References bsysscan, CheckXidAlive, elog, ERROR, RelationData::rd_tableam, TableScanDescData::rs_rd, TableAmRoutine::scan_bitmap_next_block, TransactionIdIsValid, and unlikely.
Referenced by BitmapHeapNext().
|
inlinestatic |
Definition at line 2009 of file tableam.h.
References bsysscan, CheckXidAlive, elog, ERROR, RelationData::rd_tableam, TableScanDescData::rs_rd, TableAmRoutine::scan_bitmap_next_tuple, TransactionIdIsValid, and unlikely.
Referenced by BitmapHeapNext().
|
inlinestatic |
Definition at line 1064 of file tableam.h.
References Assert, BackwardScanDirection, bsysscan, CheckXidAlive, elog, ERROR, ForwardScanDirection, RelationData::rd_tableam, RelationGetRelid, TableScanDescData::rs_rd, TableAmRoutine::scan_getnextslot, TransactionIdIsValid, TupleTableSlot::tts_tableOid, and unlikely.
Referenced by ATRewriteTable(), check_default_partition_contents(), DoCopyTo(), heapam_relation_copy_for_cluster(), IndexCheckExclusion(), RelationFindReplTupleSeq(), SeqNext(), systable_getnext(), validateDomainCheckConstraint(), validateDomainNotNullConstraint(), and validateForeignKeyConstraint().
|
inlinestatic |
Definition at line 1130 of file tableam.h.
References Assert, BackwardScanDirection, ForwardScanDirection, RelationData::rd_tableam, TableScanDescData::rs_flags, TableScanDescData::rs_rd, TableAmRoutine::scan_getnextslot_tidrange, and SO_TYPE_TIDRANGESCAN.
Referenced by TidRangeNext().
|
inlinestatic |
Definition at line 2034 of file tableam.h.
References bsysscan, CheckXidAlive, elog, ERROR, RelationData::rd_tableam, TableScanDescData::rs_rd, TableAmRoutine::scan_sample_next_block, TransactionIdIsValid, and unlikely.
Referenced by tablesample_getnext().
|
inlinestatic |
Definition at line 2056 of file tableam.h.
References bsysscan, CheckXidAlive, elog, ERROR, RelationData::rd_tableam, TableScanDescData::rs_rd, TableAmRoutine::scan_sample_next_tuple, TransactionIdIsValid, and unlikely.
Referenced by tablesample_getnext().
const TupleTableSlotOps* table_slot_callbacks | ( | Relation | relation | ) |
Definition at line 58 of file tableam.c.
References Assert, RelationData::rd_rel, RelationData::rd_tableam, TableAmRoutine::slot_callbacks, TTSOpsHeapTuple, and TTSOpsVirtual.
Referenced by ATRewriteTable(), ExecGetReturningSlot(), ExecGetTriggerNewSlot(), ExecGetTriggerOldSlot(), ExecInitBitmapHeapScan(), ExecInitIndexOnlyScan(), ExecInitIndexScan(), ExecInitSampleScan(), ExecInitSeqScan(), ExecInitTidRangeScan(), ExecInitTidScan(), and table_slot_create().
TupleTableSlot* table_slot_create | ( | Relation | relation, |
List ** | reglist | ||
) |
Definition at line 91 of file tableam.c.
References lappend(), MakeSingleTupleTableSlot(), RelationGetDescr, and table_slot_callbacks().
Referenced by acquire_sample_rows(), apply_handle_tuple_routing(), apply_handle_update_internal(), build_index_value_desc(), check_default_partition_contents(), check_exclusion_or_unique_constraint(), CopyFrom(), CopyMultiInsertInfoNextFreeSlot(), DoCopyTo(), EvalPlanQualSlot(), ExecCrossPartitionUpdate(), ExecInitInsertProjection(), ExecInitMerge(), ExecInitMergeTupleSlots(), ExecInitModifyTable(), ExecInitPartitionInfo(), ExecInitRoutingInfo(), ExecInitUpdateProjection(), FindConflictTuple(), FindReplTupleInLocalRel(), get_actual_variable_range(), heap_entry_is_visible(), heapam_index_build_range_scan(), heapam_relation_copy_for_cluster(), IndexCheckExclusion(), RelationFindReplTupleSeq(), systable_beginscan(), systable_beginscan_ordered(), table_index_fetch_tuple_check(), validateDomainCheckConstraint(), validateDomainNotNullConstraint(), and validateForeignKeyConstraint().
|
inlinestatic |
Definition at line 1444 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::tuple_complete_speculative.
Referenced by ExecInsert().
|
inlinestatic |
Definition at line 1500 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::tuple_delete.
Referenced by ExecDeleteAct(), and simple_table_tuple_delete().
|
inlinestatic |
Definition at line 1297 of file tableam.h.
References bsysscan, CheckXidAlive, elog, ERROR, RelationData::rd_tableam, TransactionIdIsValid, TableAmRoutine::tuple_fetch_row_version, and unlikely.
Referenced by AfterTriggerExecute(), EvalPlanQualFetchRowMark(), ExecCheckTIDVisible(), ExecCrossPartitionUpdate(), ExecDelete(), ExecMergeMatched(), ExecModifyTable(), ExecUpdate(), GetTupleForTrigger(), heap_entry_is_visible(), and TidNext().
void table_tuple_get_latest_tid | ( | TableScanDesc | scan, |
ItemPointer | tid | ||
) |
Definition at line 235 of file tableam.c.
References bsysscan, CheckXidAlive, elog, ereport, errcode(), errmsg(), ERROR, ItemPointerGetBlockNumberNoCheck(), ItemPointerGetOffsetNumberNoCheck(), RelationData::rd_tableam, RelationGetRelationName, TableScanDescData::rs_rd, TransactionIdIsValid, TableAmRoutine::tuple_get_latest_tid, TableAmRoutine::tuple_tid_valid, and unlikely.
Referenced by currtid_internal(), and TidNext().
|
inlinestatic |
Definition at line 1411 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::tuple_insert.
Referenced by ATRewriteTable(), CopyFrom(), ExecInsert(), intorel_receive(), simple_table_tuple_insert(), and transientrel_receive().
|
inlinestatic |
Definition at line 1430 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::tuple_insert_speculative.
Referenced by ExecInsert().
|
inlinestatic |
Definition at line 1589 of file tableam.h.
References mode, RelationData::rd_tableam, and TableAmRoutine::tuple_lock.
Referenced by ExecDelete(), ExecLockRows(), ExecMergeMatched(), ExecOnConflictUpdate(), ExecUpdate(), FindConflictTuple(), GetTupleForTrigger(), RelationFindReplTupleByIndex(), and RelationFindReplTupleSeq().
|
inlinestatic |
Definition at line 1344 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::tuple_satisfies_snapshot.
Referenced by ExecCheckTupleVisible(), RI_FKey_check(), and systable_recheck_tuple().
|
inlinestatic |
Definition at line 1323 of file tableam.h.
References RelationData::rd_tableam, TableScanDescData::rs_rd, and TableAmRoutine::tuple_tid_valid.
Referenced by TidListEval().
|
inlinestatic |
Definition at line 1544 of file tableam.h.
References RelationData::rd_tableam, and TableAmRoutine::tuple_update.
Referenced by ExecUpdateAct(), and simple_table_tuple_update().
|
extern |
Definition at line 48 of file tableam.c.
Referenced by ATPrepSetAccessMethod(), and DefineRelation().
|
extern |
Definition at line 49 of file tableam.c.
Referenced by initscan(), and table_block_parallelscan_initialize().