mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-11-28 09:33:54 +02:00
relaxation of the requirement for calling the old pg_catalog.ptrack_version() function
This commit is contained in:
parent
7eaac77fe5
commit
3cd69fb903
10
src/ptrack.c
10
src/ptrack.c
@ -79,13 +79,17 @@ get_ptrack_version(PGconn *backup_conn, PGNodeInfo *nodeInfo)
|
||||
return;
|
||||
}
|
||||
|
||||
res_db = pgut_execute(backup_conn,
|
||||
/*
|
||||
* it's ok not to have permission to call this old function in PGPRO-11 version (ok_error = true)
|
||||
* see deprication notice https://postgrespro.com/docs/postgrespro/11/release-pro-11-9-1
|
||||
*/
|
||||
res_db = pgut_execute_extended(backup_conn,
|
||||
"SELECT pg_catalog.ptrack_version()",
|
||||
0, NULL);
|
||||
0, NULL, true, true);
|
||||
if (PQntuples(res_db) == 0)
|
||||
{
|
||||
/* TODO: Something went wrong, should we error out here? */
|
||||
PQclear(res_db);
|
||||
elog(WARNING, "Can't call pg_catalog.ptrack_version(), it is assumed that there is no ptrack extension installed.");
|
||||
return;
|
||||
}
|
||||
ptrack_version_str = PQgetvalue(res_db, 0, 0);
|
||||
|
@ -312,16 +312,11 @@ class ProbackupTest(object):
|
||||
self.ptrack = False
|
||||
if 'PG_PROBACKUP_PTRACK' in self.test_env:
|
||||
if self.test_env['PG_PROBACKUP_PTRACK'] == 'ON':
|
||||
self.ptrack = True
|
||||
if self.pg_config_version >= self.version_to_num('11.0'):
|
||||
self.ptrack = True
|
||||
|
||||
os.environ["PGAPPNAME"] = "pg_probackup"
|
||||
|
||||
if self.ptrack:
|
||||
self.assertGreaterEqual(
|
||||
self.pg_config_version,
|
||||
self.version_to_num('11.0'),
|
||||
"ptrack testing require PostgreSQL >= 11")
|
||||
|
||||
@property
|
||||
def pg_config_version(self):
|
||||
return self.version_to_num(
|
||||
|
Loading…
Reference in New Issue
Block a user