Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3cd69fb

Browse files
committed
relaxation of the requirement for calling the old pg_catalog.ptrack_version() function
1 parent7eaac77 commit3cd69fb

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

‎src/ptrack.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,17 @@ get_ptrack_version(PGconn *backup_conn, PGNodeInfo *nodeInfo)
7979
return;
8080
}
8181

82-
res_db=pgut_execute(backup_conn,
82+
/*
83+
* it's ok not to have permission to call this old function in PGPRO-11 version (ok_error = true)
84+
* see deprication notice https://postgrespro.com/docs/postgrespro/11/release-pro-11-9-1
85+
*/
86+
res_db=pgut_execute_extended(backup_conn,
8387
"SELECT pg_catalog.ptrack_version()",
84-
0,NULL);
88+
0,NULL, true, true);
8589
if (PQntuples(res_db)==0)
8690
{
87-
/* TODO: Something went wrong, should we error out here? */
8891
PQclear(res_db);
92+
elog(WARNING,"Can't call pg_catalog.ptrack_version(), it is assumed that there is no ptrack extension installed.");
8993
return;
9094
}
9195
ptrack_version_str=PQgetvalue(res_db,0,0);

‎tests/helpers/ptrack_helpers.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -312,16 +312,11 @@ def __init__(self, *args, **kwargs):
312312
self.ptrack=False
313313
if'PG_PROBACKUP_PTRACK'inself.test_env:
314314
ifself.test_env['PG_PROBACKUP_PTRACK']=='ON':
315-
self.ptrack=True
315+
ifself.pg_config_version>=self.version_to_num('11.0'):
316+
self.ptrack=True
316317

317318
os.environ["PGAPPNAME"]="pg_probackup"
318319

319-
ifself.ptrack:
320-
self.assertGreaterEqual(
321-
self.pg_config_version,
322-
self.version_to_num('11.0'),
323-
"ptrack testing require PostgreSQL >= 11")
324-
325320
@property
326321
defpg_config_version(self):
327322
returnself.version_to_num(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp