-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathpg_walgettx.h
More file actions
executable file
·87 lines (55 loc) · 2.71 KB
/
pg_walgettx.h
File metadata and controls
executable file
·87 lines (55 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
* This file contains code derived from PostgreSQL.
* Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 2024-2025 ZhangChen
*
* PostgreSQL-derived portions licensed under the PostgreSQL License;
* see LICENSE-PostgreSQL.
*
* Original portions by ZhangChen licensed under the Apache License, Version 2.0;
* see LICENSE.
*/
#include "pg_xlogreader.h"
static inline void *
pg_malloc_internal(size_t size, int flags);
void *
palloc_extended(Size size, int flags);
void
WALOpenSegmentInit(WALOpenSegment *seg, WALSegmentContext *segcxt,
int segsize, const char *waldir);
bool
allocate_recordbuf(XLogReaderState *state, uint32 reclength);
XLogReaderState *
XLogReaderAllocate(int wal_segment_size, const char *waldir,
XLogReaderRoutine *routine, void *private_data);
int
open_file_in_directory(const char *directory, const char *fname);
bool search_directory(const char *directory, const char *fname);
char *pg_strdup(const char *in);
char *identify_target_directory(char *directory, char *fname);
void XLogDumpRecordLen(XLogReaderState *record, uint32 *rec_len, uint32 *fpi_len);
void XLogScanRecordForDisplay(XLogDumpConfig *config, XLogReaderState *record);
void WALDumpOpenSegment(XLogReaderState *state, XLogSegNo nextSegNo,
TimeLineID *tli_p);
bool WALRead(XLogReaderState *state,
char *buf, XLogRecPtr startptr, Size count, TimeLineID tli,
WALReadError *errinfo);
int WALDumpReadPage(XLogReaderState *state, XLogRecPtr targetPagePtr, int reqLen,
XLogRecPtr targetPtr, char *readBuff);
void WALDumpCloseSegment(XLogReaderState *state);
int ReadPageInternal(XLogReaderState *state, XLogRecPtr pageptr, int reqLen);
XLogRecord *XLogReadRecord(XLogReaderState *state, char **errormsg);
XLogRecPtr XLogFindNextRecord(XLogReaderState *state, XLogRecPtr RecPtr);
void pgGetTxforArch();
void setRestoreMode_there(int setting);
void setExportMode_there(int setting);
void setResTyp_there(int setting);
int restoreUPDATE(pg_attributeDesc *allDesc,XLogReaderState *record,parray *Tx_parray,FILE *bootFile,decodeFunc *array2Process,char *tabname,char *page,BlockNumber blk,bool hot_update,TransactionId currentTx);
void xact_desc_pg_drop(TimestampTz *TimeFromRecord,Oid *datafileOid,Oid *toastOid, XLogReaderState *record,RmgrId rmid,parray *TxTime_parray);
void mergeTxDelElems(parray *TxTime_parray);
bool FPWfileExist(BlockNumber blk, RelFileNumber filenode);
void FPW2File(BlockNumber blk,char* page,RelFileNumber filenode);
int FPWfromFile(BlockNumber blk, char* page, RelFileNumber filenode);
void FPWHashCleanup();
int XLogRecordRedoDropFPW(systemDropContext *sdc,XLogReaderState *record);