Skip to content

Commit 6a3c3d3

Browse files
committed
[Issue #277] review, some improvements, refactoring and overhaul, several TODO added
1 parent 69db990 commit 6a3c3d3

File tree

6 files changed

+133
-343
lines changed

6 files changed

+133
-343
lines changed

src/backup.c

+3-7
Original file line numberDiff line numberDiff line change
@@ -528,11 +528,7 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync, bool
528528
}
529529

530530
/* Notify end of backup */
531-
{
532-
char backup_database_dir[MAXPGPATH];
533-
pgBackupGetPath(&current, backup_database_dir, lengthof(backup_database_dir), DATABASE_DIR);
534-
pg_stop_backup(&current, backup_conn, nodeInfo, backup_database_dir);
535-
}
531+
pg_stop_backup(&current, backup_conn, nodeInfo, current.database_dir);
536532

537533
/* In case of backup from replica >= 9.6 we must fix minRecPoint,
538534
* First we must find pg_control in backup_files_list.
@@ -719,7 +715,7 @@ pgdata_basic_setup(ConnectionOptions conn_opt, PGNodeInfo *nodeInfo)
719715

720716
if (nodeInfo->is_superuser)
721717
elog(WARNING, "Current PostgreSQL role is superuser. "
722-
"It is not recommended to run backup or checkdb as superuser.");
718+
"It is not recommended to run pg_probackup under superuser.");
723719

724720
StrNCpy(current.server_version, nodeInfo->server_version_str,
725721
sizeof(current.server_version));
@@ -974,7 +970,7 @@ check_server_version(PGconn *conn, PGNodeInfo *nodeInfo)
974970
* All system identifiers must be equal.
975971
*/
976972
void
977-
check_system_identifiers(PGconn *conn, char *pgdata)
973+
check_system_identifiers(PGconn *conn, const char *pgdata)
978974
{
979975
uint64 system_id_conn;
980976
uint64 system_id_pgdata;

0 commit comments

Comments
 (0)