Skip to content

Commit 6e59b62

Browse files
committed
Fix various compile time typos
1 parent 4f95233 commit 6e59b62

File tree

7 files changed

+23
-14
lines changed

7 files changed

+23
-14
lines changed

src/backup.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,11 @@ do_backup_instance(void)
543543

544544
if (ptrack_lsn > prev_backup->stop_lsn || ptrack_lsn == InvalidXLogRecPtr)
545545
{
546-
elog(ERROR, "LSN from ptrack_control %lx differs from STOP LSN of previous backup %lx.\n"
546+
elog(ERROR, "LSN from ptrack_control %X/%X differs from STOP LSN of previous backup %X/%X.\n"
547547
"Create new full backup before an incremental one.",
548-
ptrack_lsn, prev_backup->stop_lsn);
548+
(uint32) (ptrack_lsn >> 32), (uint32) (ptrack_lsn),
549+
(uint32) (prev_backup->stop_lsn >> 32),
550+
(uint32) (prev_backup->stop_lsn));
549551
}
550552
}
551553

@@ -1032,11 +1034,13 @@ check_system_identifiers(void)
10321034
system_id_conn = get_remote_system_identifier(backup_conn);
10331035

10341036
if (system_id_conn != system_identifier)
1035-
elog(ERROR, "Backup data directory was initialized for system id %ld, but connected instance system id is %ld",
1036-
system_identifier, system_id_conn);
1037+
elog(ERROR, "Backup data directory was initialized for system id " UINT64_FORMAT ", "
1038+
"but connected instance system id is " UINT64_FORMAT,
1039+
system_identifier, system_id_conn);
10371040
if (system_id_pgdata != system_identifier)
1038-
elog(ERROR, "Backup data directory was initialized for system id %ld, but target backup directory system id is %ld",
1039-
system_identifier, system_id_pgdata);
1041+
elog(ERROR, "Backup data directory was initialized for system id " UINT64_FORMAT ", "
1042+
"but target backup directory system id is " UINT64_FORMAT,
1043+
system_identifier, system_id_pgdata);
10401044
}
10411045

10421046
/*

src/parsexlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ PrintXLogCorruptionMsg(XLogPageReadPrivate *private_data, int elevel)
897897
"Error has occured during reading WAL segment \"%s\"",
898898
private_data->xlogpath);
899899
#ifdef HAVE_LIBZ
900-
else if (private_data->gz_xlogpath != NULL)
900+
else if (private_data->gz_xlogfile != NULL)
901901
elog(elevel, "Possible WAL corruption. "
902902
"Error has occured during reading WAL segment \"%s\"",
903903
private_data->gz_xlogpath);

src/pg_probackup.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@
6363
#define PG_BLACK_LIST "black_list"
6464
#define PG_TABLESPACE_MAP_FILE "tablespace_map"
6565

66-
#define LOG_FILENAME_DEFAULT "pg_probackup.log"
67-
#define LOG_DIRECTORY_DEFAULT "log"
6866
/* Direcotry/File permission */
6967
#define DIR_PERMISSION (0700)
7068
#define FILE_PERMISSION (0600)
@@ -206,7 +204,7 @@ typedef struct pgBackupConfig
206204
typedef struct pgBackup pgBackup;
207205

208206
/* Information about single backup stored in backup.conf */
209-
typedef struct pgBackup
207+
struct pgBackup
210208
{
211209
BackupMode backup_mode; /* Mode - one of BACKUP_MODE_xxx above*/
212210
time_t backup_id; /* Identifier of the backup.
@@ -255,7 +253,7 @@ typedef struct pgBackup
255253
pgBackup *parent_backup_link;
256254
char *primary_conninfo; /* Connection parameters of the backup
257255
* in the format suitable for recovery.conf */
258-
} pgBackup;
256+
};
259257

260258
/* Recovery target for restore and validate subcommands */
261259
typedef struct pgRecoveryTarget
@@ -406,7 +404,7 @@ extern void process_block_change(ForkNumber forknum, RelFileNode rnode,
406404
BlockNumber blkno);
407405

408406
extern char *pg_ptrack_get_block(backup_files_arg *arguments,
409-
Oid dbOid, Oid tblsOid, Oid relOid,
407+
Oid dbOid, Oid tblsOid, Oid relOid,
410408
BlockNumber blknum,
411409
size_t *result_size);
412410
/* in restore.c */

src/utils/logger.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include "logger.h"
1717
#include "pgut.h"
18-
#include "pg_probackup.h"
1918
#include "thread.h"
2019

2120
/* Logger parameters */

src/utils/logger.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ extern int log_rotation_age;
4242
#define LOG_LEVEL_CONSOLE_DEFAULT INFO
4343
#define LOG_LEVEL_FILE_DEFAULT LOG_OFF
4444

45+
#define LOG_FILENAME_DEFAULT "pg_probackup.log"
46+
#define LOG_DIRECTORY_DEFAULT "log"
47+
4548
#undef elog
4649
extern void elog(int elevel, const char *fmt, ...) pg_attribute_printf(2, 3);
4750
extern void elog_file(int elevel, const char *fmt, ...) pg_attribute_printf(2, 3);

src/utils/parray.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
*-------------------------------------------------------------------------
88
*/
99

10-
#include "src/pg_probackup.h"
10+
#include "parray.h"
11+
#include "pgut.h"
1112

1213
/* members of struct parray are hidden from client. */
1314
struct parray

src/utils/parray.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#ifndef PARRAY_H
1111
#define PARRAY_H
1212

13+
#include "postgres_fe.h"
14+
15+
#include <stdlib.h>
16+
1317
/*
1418
* "parray" hold pointers to objects in a linear memory area.
1519
* Client use "parray *" to access parray object.

0 commit comments

Comments
 (0)