summaryrefslogtreecommitdiff
path: root/src/include/access/robertam.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/access/robertam.h')
-rw-r--r--src/include/access/robertam.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/src/include/access/robertam.h b/src/include/access/robertam.h
new file mode 100644
index 0000000000..b6c3bc42d9
--- /dev/null
+++ b/src/include/access/robertam.h
@@ -0,0 +1,103 @@
+/*
+ * robertam.h
+ */
+
+#ifndef ROBERTAM_H
+#define ROBERTAM_H
+
+#include "access/hio.h"
+#include "access/skey.h"
+#include "access/tableam.h"
+#include "catalog/index.h"
+#include "commands/vacuum.h"
+#include "nodes/execnodes.h"
+
+/* MVCC. */
+extern bool robert_tuple_fetch_row_version(Relation rel, ItemPointer tid,
+ Snapshot snapshot, TupleTableSlot *slot);
+extern bool robert_tuple_tid_valid(TableScanDesc sscan, ItemPointer tid);
+extern void robert_tuple_get_latest_tid(TableScanDesc scan, ItemPointer tid);
+extern bool robert_tuple_satisfies_snapshot(Relation rel,
+ TupleTableSlot *slot,
+ Snapshot snapshot);
+extern TransactionId robert_compute_xid_horizon_for_tuples(Relation rel,
+ ItemPointerData *items,
+ int nitems);
+
+/* DML */
+extern void robert_tuple_insert(Relation rel, TupleTableSlot *slot,
+ CommandId cid, int options,
+ BulkInsertStateData *bistate);
+extern void robert_tuple_insert_speculative(Relation rel, TupleTableSlot *slot,
+ CommandId cid, int options,
+ BulkInsertStateData *bistate,
+ uint32 specToken);
+extern void robert_tuple_complete_speculative(Relation rel,
+ TupleTableSlot *slot, uint32 specToken,
+ bool succeeded);
+extern void robert_multi_insert(Relation rel,
+ TupleTableSlot **slots, int nslots,
+ CommandId cid, int options,
+ BulkInsertStateData *bistate);
+extern TM_Result robert_tuple_delete(Relation rel, ItemPointer tid,
+ CommandId cid, Snapshot snapshot, Snapshot crosscheck,
+ bool wait, TM_FailureData *tmfd, bool changingPart);
+extern TM_Result robert_tuple_update(Relation rel, ItemPointer otid,
+ TupleTableSlot *slot, CommandId cid, Snapshot snapshot,
+ Snapshot crosscheck, bool wait, TM_FailureData *tmfd,
+ LockTupleMode *lockmode, bool *update_indexes);
+extern TM_Result robert_tuple_lock(Relation rel, ItemPointer tid,
+ Snapshot snapshot, TupleTableSlot *slot, CommandId cid,
+ LockTupleMode mode, LockWaitPolicy wait_policy, uint8 flags,
+ TM_FailureData *tmfd);
+extern void robert_finish_bulk_insert(Relation rel, int options);
+
+
+/* DDL. */
+extern void robert_relation_set_new_filenode(Relation rel,
+ const RelFileNode *newrnode,
+ char persistence,
+ TransactionId *freezeXid,
+ MultiXactId *minmulti);
+extern void robert_relation_nontransactional_truncate(Relation rel);
+extern void robert_relation_copy_data(Relation rel,
+ const RelFileNode *newrnode);
+extern void robert_relation_copy_for_cluster(Relation NewHeap,
+ Relation OldHeap, Relation OldIndex,
+ bool use_sort, TransactionId OldestXmin,
+ TransactionId *xid_cutoff,
+ MultiXactId *multi_cutoff,
+ double *num_tuples, double *tups_vacuumed,
+ double *tups_recently_dead);
+extern void robert_relation_vacuum(Relation onerel, VacuumParams *params,
+ BufferAccessStrategy bstrategy);
+extern bool robert_scan_analyze_next_block(TableScanDesc scan,
+ BlockNumber blockno,
+ BufferAccessStrategy bstrategy);
+extern bool robert_scan_analyze_next_tuple(TableScanDesc scan,
+ TransactionId OldestXmin,
+ double *liverows, double *deadrows,
+ TupleTableSlot *slot);
+extern double robert_index_build_range_scan(Relation heap_rel,
+ Relation index_rel, IndexInfo *index_nfo,
+ bool allow_sync, bool anyvisible, bool progress,
+ BlockNumber start_blockno,
+ BlockNumber end_blockno,
+ IndexBuildCallback callback,
+ void *callback_state,
+ TableScanDesc scan);
+extern void robert_index_validate_scan(Relation heap_rel, Relation index_rel,
+ IndexInfo *index_info, Snapshot snapshot,
+ ValidateIndexState *state);
+
+/* Miscellaneous. */
+extern uint64 robert_relation_size(Relation rel, ForkNumber forkNumber);
+extern bool robert_relation_needs_toast_table(Relation rel);
+extern Oid robert_relation_toast_am(Relation rel);
+
+/* Planner. */
+extern void robert_relation_estimate_size(Relation rel, int32 *attr_widths,
+ BlockNumber *pages, double *tuples,
+ double *allvisfrac);
+
+#endif