PostgreSQL Source Code  git master
visibilitymapdefs.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * visibilitymapdefs.h
4  * macros for accessing contents of visibility map pages
5  *
6  *
7  * Copyright (c) 2021-2024, PostgreSQL Global Development Group
8  *
9  * src/include/access/visibilitymapdefs.h
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef VISIBILITYMAPDEFS_H
14 #define VISIBILITYMAPDEFS_H
15 
16 /* Number of bits for one heap page */
17 #define BITS_PER_HEAPBLOCK 2
18 
19 /* Flags for bit map */
20 #define VISIBILITYMAP_ALL_VISIBLE 0x01
21 #define VISIBILITYMAP_ALL_FROZEN 0x02
22 #define VISIBILITYMAP_VALID_BITS 0x03 /* OR of all valid visibilitymap
23  * flags bits */
24 /*
25  * To detect recovery conflicts during logical decoding on a standby, we need
26  * to know if a table is a user catalog table. For that we add an additional
27  * bit into xl_heap_visible.flags, in addition to the above.
28  *
29  * NB: VISIBILITYMAP_XLOG_* may not be passed to visibilitymap_set().
30  */
31 #define VISIBILITYMAP_XLOG_CATALOG_REL 0x04
32 #define VISIBILITYMAP_XLOG_VALID_BITS (VISIBILITYMAP_VALID_BITS | VISIBILITYMAP_XLOG_CATALOG_REL)
33 
34 #endif /* VISIBILITYMAPDEFS_H */