|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "access/relation.h"#include "access/visibilitymap.h"#include "access/xloginsert.h"#include "catalog/pg_am_d.h"#include "miscadmin.h"#include "storage/bufmgr.h"#include "utils/acl.h"#include "utils/array.h"#include "utils/rel.h"
Go to the source code of this file.
Typedefs | |
| typedef enum HeapTupleForceOption | HeapTupleForceOption |
Enumerations | |
| enum | HeapTupleForceOption { HEAP_FORCE_KILL , HEAP_FORCE_FREEZE } |
Functions | |
| PG_MODULE_MAGIC_EXT (.name="pg_surgery",.version=PG_VERSION) | |
| PG_FUNCTION_INFO_V1 (heap_force_kill) | |
| PG_FUNCTION_INFO_V1 (heap_force_freeze) | |
| static int32 | tidcmp (const void *a, const void *b) |
| static Datum | heap_force_common (FunctionCallInfo fcinfo, HeapTupleForceOption heap_force_opt) |
| static void | sanity_check_tid_array (ArrayType *ta, int *ntids) |
| static BlockNumber | find_tids_one_page (ItemPointer tids, int ntids, OffsetNumber *next_start_ptr) |
| Datum | heap_force_kill (PG_FUNCTION_ARGS) |
| Datum | heap_force_freeze (PG_FUNCTION_ARGS) |
| Enumerator | |
|---|---|
| HEAP_FORCE_KILL | |
| HEAP_FORCE_FREEZE | |
Definition at line 32 of file heap_surgery.c.
|
static |
Definition at line 398 of file heap_surgery.c.
References fb(), i, InvalidBlockNumber, and ItemPointerGetBlockNumberNoCheck().
Referenced by heap_force_common().
|
static |
Definition at line 85 of file heap_surgery.c.
References aclcheck_error(), ACLCHECK_NOT_OWNER, ARR_DATA_PTR, Assert, buf, BufferGetPage(), CHECK_FOR_INTERRUPTS, END_CRIT_SECTION, ereport, errcode(), errdetail_relkind_not_supported(), errhint(), errmsg(), ERROR, fb(), find_tids_one_page(), FirstOffsetNumber, FrozenTransactionId, get_relkind_objtype(), GetUserId(), HEAP_FORCE_FREEZE, HEAP_FORCE_KILL, HEAP_MOVED, HEAP_MOVED_OFF, HEAP_XMAX_INVALID, HEAP_XMIN_FROZEN, HeapTupleHeaderSetXmax(), HeapTupleHeaderSetXmin(), HeapTupleHeaderSetXvac(), i, InvalidBuffer, InvalidOffsetNumber, InvalidTransactionId, ItemIdGetRedirect, ItemIdIsDead, ItemIdIsNormal, ItemIdIsRedirected, ItemIdIsUsed, ItemIdSetDead, ItemPointerGetOffsetNumberNoCheck(), ItemPointerSet(), LockBufferForCleanup(), log_newpage_buffer(), MarkBufferDirty(), MaxHeapTuplesPerPage, NOTICE, object_ownercheck(), OffsetNumberNext, PageClearAllVisible(), PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageIsAllVisible(), pfree(), PG_GETARG_ARRAYTYPE_P_COPY, PG_GETARG_OID, PG_RETURN_VOID, qsort, RelationData::rd_rel, ReadBuffer(), RecoveryInProgress(), relation_close(), relation_open(), RelationGetNumberOfBlocks, RelationGetRelationName, RelationGetRelid, RelationNeedsWAL, ReleaseBuffer(), RowExclusiveLock, sanity_check_tid_array(), START_CRIT_SECTION, HeapTupleHeaderData::t_ctid, HeapTupleHeaderData::t_infomask, HeapTupleHeaderData::t_infomask2, tidcmp(), UnlockReleaseBuffer(), visibilitymap_clear(), visibilitymap_pin(), and VISIBILITYMAP_VALID_BITS.
Referenced by heap_force_freeze(), and heap_force_kill().
| Datum heap_force_freeze | ( | PG_FUNCTION_ARGS | ) |
Definition at line 73 of file heap_surgery.c.
References heap_force_common(), HEAP_FORCE_FREEZE, and PG_RETURN_DATUM.
| Datum heap_force_kill | ( | PG_FUNCTION_ARGS | ) |
Definition at line 58 of file heap_surgery.c.
References heap_force_common(), HEAP_FORCE_KILL, and PG_RETURN_DATUM.
| PG_FUNCTION_INFO_V1 | ( | heap_force_freeze | ) |
| PG_FUNCTION_INFO_V1 | ( | heap_force_kill | ) |
| PG_MODULE_MAGIC_EXT | ( | . | name = "pg_surgery", |
| . | version = PG_VERSION |
||
| ) |
Definition at line 373 of file heap_surgery.c.
References ARR_DIMS, ARR_HASNULL, ARR_NDIM, array_contains_nulls(), ArrayGetNItems(), ereport, errcode(), errmsg(), ERROR, and fb().
Referenced by heap_force_common().
Definition at line 357 of file heap_surgery.c.
References a, b, fb(), and ItemPointerCompare().
Referenced by heap_force_common().