Skip to content

Commit 57339ae

Browse files
dlepikhovaoleg gurev
authored andcommitted
PBCKP-2705: Add PostgreSQL core patch for fixing build with REL_18
In commit 760162f user-callable CRC functions were added. Since pg_probackup uses pg_crc.c from the PostgreSQL source, this change is leading to the undefined reference to pg_detoast_datum_packed errors during the build. See also https://www.postgresql.org/message-id/flat/ME0P300MB0445018F5C924B2D88983F45B66CA%40ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM
1 parent 3689d50 commit 57339ae

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
`pg_probackup` is a utility to manage backup and recovery of PostgreSQL database clusters. It is designed to perform periodic backups of the PostgreSQL instance that enable you to restore the server in case of a failure.
77

88
The utility is compatible with:
9-
* PostgreSQL 13, 14, 15, 16, 17
9+
* PostgreSQL 13, 14, 15, 16, 17, 18
1010

1111
As compared to other backup solutions, `pg_probackup` offers the following benefits that can help you implement different backup strategies and deal with large amounts of data:
1212
* Incremental backup: page-level incremental backup allows you to save disk space, speed up backup and restore. With three different incremental modes, you can plan the backup strategy in accordance with your data flow.
@@ -79,7 +79,7 @@ For users of Postgres Pro products, commercial editions of pg_probackup are avai
7979
## Building from source
8080
### Linux
8181

82-
To compile `pg_probackup`, you must have a PostgreSQL installation and raw source tree. Execute this in the module's directory:
82+
To compile `pg_probackup`, you must have a PostgreSQL installation and raw source tree. For versions under 18 execute this in the module's directory:
8383

8484
```shell
8585
make USE_PGXS=1 PG_CONFIG=<path_to_pg_config> top_srcdir=<path_to_PostgreSQL_source_tree>
@@ -91,6 +91,8 @@ The alternative way, without using the PGXS infrastructure, is to place `pg_prob
9191
cd <path_to_PostgreSQL_source_tree> && git clone https://github.com/postgrespro/pg_probackup contrib/pg_probackup && cd contrib/pg_probackup && make
9292
```
9393

94+
For version 18 you have to apply PostgreSQL core patch (patches/REL_18_STABLE_pg_probackup.patch) first and recompile and reinstall PostgreSQL
95+
9496
### Windows
9597

9698
Currently pg_probackup can be build using only MSVC 2013.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 5809673569d3d95c7bce75ea0aa6f9723e303c7d Mon Sep 17 00:00:00 2001
2+
From: Daria <d.lepikhova@postgrespro.ru>
3+
Date: Mon, 17 Nov 2025 02:57:38 +0100
4+
Subject: [PATCH] REL_18_STABLE_pg_probackup
5+
6+
---
7+
src/backend/utils/hash/pg_crc.c | 2 ++
8+
1 file changed, 2 insertions(+)
9+
10+
diff --git a/src/backend/utils/hash/pg_crc.c b/src/backend/utils/hash/pg_crc.c
11+
index e67a74ef852..6a474e804b5 100644
12+
--- a/src/backend/utils/hash/pg_crc.c
13+
+++ b/src/backend/utils/hash/pg_crc.c
14+
@@ -99,6 +99,7 @@ const uint32 pg_crc32_table[256] = {
15+
0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
16+
};
17+
18+
+#ifndef FRONTEND
19+
/*
20+
* SQL-callable functions
21+
*/
22+
@@ -128,3 +129,4 @@ crc32c_bytea(PG_FUNCTION_ARGS)
23+
24+
PG_RETURN_INT64(crc);
25+
}
26+
+#endif
27+
--
28+
2.39.5 (Apple Git-154)
29+

0 commit comments

Comments
 (0)