Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 492c691

Browse files
committed
derive server_version_string from server_version_num, because server_version can be changed at compile time by --with-extra-version
1 parent f9e36ee commit 492c691

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/backup.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,6 @@ do_backup(time_t start_time)
877877
static void
878878
check_server_version(void)
879879
{
880-
PGresult *res;
881880

882881
/* confirm server version */
883882
server_version = PQserverVersion(backup_conn);
@@ -901,9 +900,7 @@ check_server_version(void)
901900
current.backup_mode == BACKUP_MODE_DIFF_PTRACK;
902901

903902
/* Save server_version to use it in future */
904-
res = pgut_execute(backup_conn, "show server_version", 0, NULL, true);
905-
StrNCpy(server_version_str, PQgetvalue(res, 0, 0), sizeof(server_version_str));
906-
PQclear(res);
903+
sprintf(server_version_str, "%d.%d", server_version / 10000, (server_version / 100) % 100);
907904
}
908905

909906
/*

0 commit comments

Comments
 (0)