|
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 "catalog/pg_control.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 33 of file heap_surgery.c.
|
static |
Definition at line 416 of file heap_surgery.c.
References fb(), i, InvalidBlockNumber, and ItemPointerGetBlockNumberNoCheck().
Referenced by heap_force_common().
|
static |
Definition at line 86 of file heap_surgery.c.
References aclcheck_error(), ACLCHECK_NOT_OWNER, ARR_DATA_PTR, Assert, buf, BUFFER_LOCK_EXCLUSIVE, BUFFER_LOCK_UNLOCK, BufferGetPage(), BufferIsValid(), 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(), LockBuffer(), LockBufferForCleanup(), MarkBufferDirty(), MaxHeapTuplesPerPage, NOTICE, object_ownercheck(), OffsetNumberNext, PageClearAllVisible(), PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageIsAllVisible(), PageSetLSN(), pfree(), PG_GETARG_ARRAYTYPE_P_COPY, PG_GETARG_OID, PG_RETURN_VOID, qsort, RelationData::rd_locator, RelationData::rd_rel, ReadBuffer(), RecoveryInProgress(), REGBUF_FORCE_IMAGE, REGBUF_STANDARD, 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(), VISIBILITYMAP_VALID_BITS, XLOG_FPI, XLogBeginInsert(), XLogInsert(), and XLogRegisterBuffer().
Referenced by heap_force_freeze(), and heap_force_kill().
| Datum heap_force_freeze | ( | PG_FUNCTION_ARGS | ) |
Definition at line 74 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 59 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 391 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 375 of file heap_surgery.c.
References a, b, fb(), and ItemPointerCompare().
Referenced by heap_force_common().