forked from postgrespro/ptrack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ptrack.h
62 lines (56 loc) · 1.3 KB
/
ptrack.h
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
/*-------------------------------------------------------------------------
*
* ptrack.h
* header for ptrack map for tracking updates of relation's pages
*
*
* Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/storage/ptrack.h
*
*-------------------------------------------------------------------------
*/
#ifndef PTRACK_H
#define PTRACK_H
#include "access/xlogdefs.h"
#include "storage/block.h"
#include "storage/buf.h"
#include "storage/relfilenode.h"
#include "storage/smgr.h"
#include "utils/relcache.h"
/* Ptrack version as a string */
#define PTRACK_VERSION "2.2"
/* Ptrack version as a number */
#define PTRACK_VERSION_NUM 220
/*
* Structure identifying block on the disk.
*/
typedef struct PtBlockId
{
RelFileNode relnode;
ForkNumber forknum;
BlockNumber blocknum;
} PtBlockId;
/*
* Context for ptrack_get_pagemapset set returning function.
*/
typedef struct PtScanCtx
{
XLogRecPtr lsn;
PtBlockId bid;
uint32 relsize;
char *relpath;
List *filelist;
} PtScanCtx;
/*
* List item type for ptrack data files list.
*/
typedef struct PtrackFileList_i
{
RelFileNode relnode;
ForkNumber forknum;
int segno;
char *path;
} PtrackFileList_i;
#endif /* PTRACK_H */