38 if (rel->
rd_rel->relpersistence != RELPERSISTENCE_UNLOGGED ||
43 (
errcode(ERRCODE_READ_ONLY_SQL_TRANSACTION),
44 errmsg(
"cannot verify unlogged index \"%s\" during recovery, skipping",
101 save_sec_context = -1;
127 errmsg(
"could not open parent table of index \"%s\"",
161 if (rel->
rd_rel->relkind != RELKIND_INDEX ||
162 rel->
rd_rel->relam != am_id)
170 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
172 errdetail(
"Relation \"%s\" is a %s index.",
178 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
179 errmsg(
"cannot access temporary tables of other sessions"),
180 errdetail(
"Index \"%s\" is associated with temporary relation.",
185 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
186 errmsg(
"cannot check index \"%s\"",
#define OidIsValid(objectId)
int errdetail(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
int NewGUCNestLevel(void)
void AtEOXact_GUC(bool isCommit, int nestLevel)
static void * GETSTRUCT(const HeapTupleData *tuple)
Oid IndexGetRelation(Oid indexId, bool missing_ok)
void index_close(Relation relation, LOCKMODE lockmode)
Relation index_open(Oid relationId, LOCKMODE lockmode)
#define SECURITY_RESTRICTED_OPERATION
void GetUserIdAndSecContext(Oid *userid, int *sec_context)
void SetUserIdAndSecContext(Oid userid, int sec_context)
FormData_pg_am * Form_pg_am
#define ERRCODE_UNDEFINED_TABLE
static Datum ObjectIdGetDatum(Oid X)
#define RelationGetRelationName(relation)
#define RELATION_IS_OTHER_TEMP(relation)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
void amcheck_lock_relation_and_check(Oid indrelid, Oid am_id, IndexDoCheckCallback check, LOCKMODE lockmode, void *state)
bool index_checkable(Relation rel, Oid am_id)
static bool amcheck_index_mainfork_expected(Relation rel)
void(* IndexDoCheckCallback)(Relation rel, Relation heaprel, void *state, bool readonly)
bool RecoveryInProgress(void)