Skip to content

Commit fc74e7d

Browse files
committed
Merge branch 'ptrack_to_delta'
2 parents b7a4439 + 8b43cae commit fc74e7d

File tree

3 files changed

+313
-79
lines changed

3 files changed

+313
-79
lines changed

src/ptrack.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,21 @@ get_ptrack_version(PGconn *backup_conn, PGNodeInfo *nodeInfo)
202202
else if (strcmp(ptrack_version_str, "2.1") == 0)
203203
nodeInfo->ptrack_version_num = 21;
204204
else
205-
elog(WARNING, "Update your ptrack to the version 1.5 or upper. Current version is %s",
205+
elog(WARNING, "Update your ptrack to the version 2.1 or upper. Current version is %s",
206206
ptrack_version_str);
207207

208+
/* ptrack 1.X is buggy, so fall back to DELTA backup strategy for safety */
209+
if (nodeInfo->ptrack_version_num >= 15 && nodeInfo->ptrack_version_num < 20)
210+
{
211+
if (current.backup_mode == BACKUP_MODE_DIFF_PTRACK)
212+
{
213+
elog(WARNING, "Update your ptrack to the version 2.1 or upper. Current version is %s. "
214+
"Fall back to DELTA backup.",
215+
ptrack_version_str);
216+
current.backup_mode = BACKUP_MODE_DIFF_DELTA;
217+
}
218+
}
219+
208220
PQclear(res_db);
209221
}
210222

tests/helpers/ptrack_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def make_simple_node(
365365
options['max_wal_senders'] = 10
366366

367367
if ptrack_enable:
368-
if node.major_version > 11:
368+
if node.major_version >= 11:
369369
options['ptrack.map_size'] = '128'
370370
options['shared_preload_libraries'] = 'ptrack'
371371
else:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy