PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/bufmask.h"
#include "access/generic_xlog.h"
#include "access/xlogutils.h"
#include "miscadmin.h"
Go to the source code of this file.
Data Structures | |
struct | GenericXLogPageData |
struct | GenericXLogState |
Macros | |
#define | FRAGMENT_HEADER_SIZE (2 * sizeof(OffsetNumber)) |
#define | MATCH_THRESHOLD FRAGMENT_HEADER_SIZE |
#define | MAX_DELTA_SIZE (BLCKSZ + 2 * FRAGMENT_HEADER_SIZE) |
Functions | |
static void | writeFragment (GenericXLogPageData *pageData, OffsetNumber offset, OffsetNumber length, const char *data) |
static void | computeRegionDelta (GenericXLogPageData *pageData, const char *curpage, const char *targetpage, int targetStart, int targetEnd, int validStart, int validEnd) |
static void | computeDelta (GenericXLogPageData *pageData, Page curpage, Page targetpage) |
static void | applyPageRedo (Page page, const char *delta, Size deltaSize) |
GenericXLogState * | GenericXLogStart (Relation relation) |
Page | GenericXLogRegisterBuffer (GenericXLogState *state, Buffer buffer, int flags) |
XLogRecPtr | GenericXLogFinish (GenericXLogState *state) |
void | GenericXLogAbort (GenericXLogState *state) |
void | generic_redo (XLogReaderState *record) |
void | generic_mask (char *page, BlockNumber blkno) |
#define FRAGMENT_HEADER_SIZE (2 * sizeof(OffsetNumber)) |
Definition at line 45 of file generic_xlog.c.
#define MATCH_THRESHOLD FRAGMENT_HEADER_SIZE |
Definition at line 46 of file generic_xlog.c.
#define MAX_DELTA_SIZE (BLCKSZ + 2 * FRAGMENT_HEADER_SIZE) |
Definition at line 47 of file generic_xlog.c.
Definition at line 453 of file generic_xlog.c.
Referenced by computeDelta(), and generic_redo().
|
static |
Definition at line 228 of file generic_xlog.c.
References applyPageRedo(), computeRegionDelta(), PGAlignedBlock::data, GenericXLogPageData::delta, GenericXLogPageData::deltaLen, elog, and ERROR.
Referenced by GenericXLogFinish().
|
static |
Definition at line 121 of file generic_xlog.c.
References i, MATCH_THRESHOLD, Min, and writeFragment().
Referenced by computeDelta().
void generic_mask | ( | char * | page, |
BlockNumber | blkno | ||
) |
Definition at line 539 of file generic_xlog.c.
References mask_page_lsn_and_checksum(), and mask_unused_space().
void generic_redo | ( | XLogReaderState * | record | ) |
Definition at line 478 of file generic_xlog.c.
References generate_unaccent_rules::action, applyPageRedo(), Assert, BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, InvalidBuffer, MarkBufferDirty(), MAX_GENERIC_XLOG_PAGES, PageSetLSN(), PageHeaderData::pd_lower, PageHeaderData::pd_upper, UnlockReleaseBuffer(), XLogReadBufferForRedo(), XLogRecGetBlockData(), XLogRecHasBlockRef, and XLogRecMaxBlockId.
void GenericXLogAbort | ( | GenericXLogState * | state | ) |
Definition at line 444 of file generic_xlog.c.
References pfree().
Referenced by blbulkdelete(), and blinsert().
XLogRecPtr GenericXLogFinish | ( | GenericXLogState * | state | ) |
Definition at line 337 of file generic_xlog.c.
References GenericXLogPageData::buffer, BufferGetPage(), BufferIsInvalid, computeDelta(), GenericXLogPageData::delta, GenericXLogPageData::deltaLen, END_CRIT_SECTION, GenericXLogPageData::flags, GENERIC_XLOG_FULL_IMAGE, i, if(), GenericXLogPageData::image, InvalidXLogRecPtr, MarkBufferDirty(), MAX_GENERIC_XLOG_PAGES, PageSetLSN(), PageHeaderData::pd_lower, PageHeaderData::pd_upper, pfree(), REGBUF_FORCE_IMAGE, REGBUF_STANDARD, START_CRIT_SECTION, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), and XLogRegisterBuffer().
Referenced by blbulkdelete(), blinsert(), BloomInitMetapage(), and flushCachedPage().
Page GenericXLogRegisterBuffer | ( | GenericXLogState * | state, |
Buffer | buffer, | ||
int | flags | ||
) |
Definition at line 299 of file generic_xlog.c.
References GenericXLogPageData::buffer, BufferGetPage(), BufferIsInvalid, elog, ERROR, GenericXLogPageData::flags, GenericXLogPageData::image, and MAX_GENERIC_XLOG_PAGES.
Referenced by blbulkdelete(), blinsert(), BloomInitMetapage(), and flushCachedPage().
GenericXLogState * GenericXLogStart | ( | Relation | relation | ) |
Definition at line 269 of file generic_xlog.c.
References i, InvalidBuffer, MAX_GENERIC_XLOG_PAGES, palloc_aligned(), PG_IO_ALIGN_SIZE, and RelationNeedsWAL.
Referenced by blbulkdelete(), blinsert(), BloomInitMetapage(), and flushCachedPage().
|
static |
Definition at line 90 of file generic_xlog.c.
References Assert, data, GenericXLogPageData::delta, and GenericXLogPageData::deltaLen.
Referenced by computeRegionDelta().