2025-03-29 10:14:47 -04:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
*
|
2025-09-21 21:32:36 -04:00
|
|
|
* verify_common.h
|
2025-03-29 10:14:47 -04:00
|
|
|
* Shared routines for amcheck verifications.
|
|
|
|
|
*
|
2026-01-01 13:24:10 -05:00
|
|
|
* Copyright (c) 2016-2026, PostgreSQL Global Development Group
|
2025-03-29 10:14:47 -04:00
|
|
|
*
|
|
|
|
|
* IDENTIFICATION
|
2025-09-21 21:32:36 -04:00
|
|
|
* contrib/amcheck/verify_common.h
|
2025-03-29 10:14:47 -04:00
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
#include "storage/bufpage.h"
|
|
|
|
|
#include "storage/lmgr.h"
|
|
|
|
|
#include "storage/lockdefs.h"
|
|
|
|
|
#include "utils/relcache.h"
|
|
|
|
|
#include "miscadmin.h"
|
|
|
|
|
|
2025-07-04 10:25:40 -04:00
|
|
|
/* Typedef for callback function for amcheck_lock_relation_and_check */
|
2025-03-29 10:14:47 -04:00
|
|
|
typedef void (*IndexDoCheckCallback) (Relation rel,
|
|
|
|
|
Relation heaprel,
|
|
|
|
|
void *state,
|
|
|
|
|
bool readonly);
|
|
|
|
|
|
|
|
|
|
extern void amcheck_lock_relation_and_check(Oid indrelid,
|
|
|
|
|
Oid am_id,
|
|
|
|
|
IndexDoCheckCallback check,
|
|
|
|
|
LOCKMODE lockmode, void *state);
|