PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
verify_common.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * amcheck.h
4 * Shared routines for amcheck verifications.
5 *
6 * Copyright (c) 2016-2025, PostgreSQL Global Development Group
7 *
8 * IDENTIFICATION
9 * contrib/amcheck/amcheck.h
10 *
11 *-------------------------------------------------------------------------
12 */
13#include "storage/bufpage.h"
14#include "storage/lmgr.h"
15#include "storage/lockdefs.h"
16#include "utils/relcache.h"
17#include "miscadmin.h"
18
19/* Typedefs for callback functions for amcheck_lock_relation_and_check */
21typedef void (*IndexDoCheckCallback) (Relation rel,
22 Relation heaprel,
23 void *state,
24 bool readonly);
25
26extern void amcheck_lock_relation_and_check(Oid indrelid,
27 Oid am_id,
29 LOCKMODE lockmode, void *state);
30
31extern bool index_checkable(Relation rel, Oid am_id);
int LOCKMODE
Definition: lockdefs.h:26
unsigned int Oid
Definition: postgres_ext.h:30
Definition: type.h:96
Definition: regguts.h:323
void amcheck_lock_relation_and_check(Oid indrelid, Oid am_id, IndexDoCheckCallback check, LOCKMODE lockmode, void *state)
Definition: verify_common.c:60
void(* IndexCheckableCallback)(Relation index)
Definition: verify_common.h:20
bool index_checkable(Relation rel, Oid am_id)
void(* IndexDoCheckCallback)(Relation rel, Relation heaprel, void *state, bool readonly)
Definition: verify_common.h:21