1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-01-24 11:46:31 +02:00

[Issue #228] a bit of cleaning

This commit is contained in:
Grigory Smolkin 2020-06-22 14:26:24 +03:00
parent c670de211a
commit 1ea48b19de
3 changed files with 5 additions and 10 deletions

View File

@ -816,10 +816,6 @@ restore_data_file(parray *parent_chain, pgFile *dest_file, FILE *out,
/* set stdio buffering for input data file */
setvbuf(in, in_buf, _IOFBF, STDIO_BUFSIZE);
// elog(INFO, "N_HEADERS: %i", tmp_file->n_headers);
// elog(INFO, "File: %s", tmp_file->rel_path);
// elog(INFO, "Backup: %s", base36enc(backup->start_time));
/* get headers for this file */
if (use_headers && tmp_file->n_headers > 0)
headers = get_data_file_headers(&(backup->hdr_map), tmp_file,
@ -934,7 +930,7 @@ restore_data_file_internal(FILE *in, FILE *out, pgFile *file, uint32 backup_vers
else
{
/* We get into this function either when restoring old backup
* or when merging something. Align read_len only in restoring
* or when merging something. Align read_len only when restoring
* or merging old backups.
*/
if (get_page_header(in, from_fullpath, &(page).bph, NULL, false))
@ -1926,10 +1922,9 @@ bool
get_page_header(FILE *in, const char *fullpath, BackupPageHeader* bph,
pg_crc32 *crc, bool use_crc32c)
{
/* read BackupPageHeader */
size_t read_len = fread(bph, 1, sizeof(BackupPageHeader), in);
if (ferror(in))
elog(ERROR, "Cannot read file \"%s\": %s",
fullpath, strerror(errno));

View File

@ -1213,7 +1213,7 @@ read_tablespace_map(parray *files, const char *backup_dir)
*
*
* TODO: maybe when running incremental restore with tablespace remapping, then
* new tablespace directory MUST be empty? because there is no
* new tablespace directory MUST be empty? because there is no way
* we can be sure, that files laying there belong to our instance.
*/
void

View File

@ -1110,8 +1110,8 @@ extern FILE* open_local_file_rw(const char *to_fullpath, char **out_buf, uint32
extern int send_pages(ConnectionArgs* conn_arg, const char *to_fullpath, const char *from_fullpath,
pgFile *file, XLogRecPtr prev_backup_start_lsn, CompressAlg calg, int clevel,
uint32 checksum_version, bool use_pagemap, BackupPageHeader2 **headers,
BackupMode backup_mode, int ptrack_version_num, const char *ptrack_schema);
uint32 checksum_version, bool use_pagemap, BackupPageHeader2 **headers,
BackupMode backup_mode, int ptrack_version_num, const char *ptrack_schema);
/* FIO */
extern int fio_send_pages(const char *to_fullpath, const char *from_fullpath, pgFile *file, XLogRecPtr horizonLsn,