Line data Source code
1 : use crate::PgMajorVersion;
2 :
3 : pub const MY_PGVERSION: PgMajorVersion = PgMajorVersion::PG14;
4 :
5 : pub const XLOG_DBASE_CREATE: u8 = 0x00;
6 : pub const XLOG_DBASE_DROP: u8 = 0x10;
7 :
8 : pub const BKPIMAGE_IS_COMPRESSED: u8 = 0x02; /* page image is compressed */
9 : pub const BKPIMAGE_APPLY: u8 = 0x04; /* page image should be restored during replay */
10 : pub const SIZEOF_RELMAPFILE: usize = 512; /* sizeof(RelMapFile) in relmapper.c */
11 :
12 : // List of subdirectories inside pgdata.
13 : // Copied from src/bin/initdb/initdb.c
14 : pub const PGDATA_SUBDIRS: [&str; 22] = [
15 : "global",
16 : "pg_wal/archive_status",
17 : "pg_commit_ts",
18 : "pg_dynshmem",
19 : "pg_notify",
20 : "pg_serial",
21 : "pg_snapshots",
22 : "pg_subtrans",
23 : "pg_twophase",
24 : "pg_multixact",
25 : "pg_multixact/members",
26 : "pg_multixact/offsets",
27 : "base",
28 : "base/1",
29 : "pg_replslot",
30 : "pg_tblspc",
31 : "pg_stat",
32 : "pg_stat_tmp",
33 : "pg_xact",
34 : "pg_logical",
35 : "pg_logical/snapshots",
36 : "pg_logical/mappings",
37 : ];
38 :
39 0 : pub fn bkpimg_is_compressed(bimg_info: u8) -> bool {
40 0 : (bimg_info & BKPIMAGE_IS_COMPRESSED) != 0
41 0 : }
|