mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-04-17 12:26:29 +02:00
fix missing streamed WAL segments
This commit is contained in:
parent
19c30a8997
commit
d28ea728c4
@ -654,7 +654,7 @@ write_backup_filelist(pgBackup *backup, parray *files, const char *root,
|
|||||||
while(i < parray_num(files))
|
while(i < parray_num(files))
|
||||||
{
|
{
|
||||||
pgFile *file = (pgFile *) parray_get(files, i);
|
pgFile *file = (pgFile *) parray_get(files, i);
|
||||||
char *path = file->path;
|
char *path = file->path; /* for streamed WAL files */
|
||||||
char line[BLCKSZ];
|
char line[BLCKSZ];
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
@ -667,13 +667,13 @@ write_backup_filelist(pgBackup *backup, parray *files, const char *root,
|
|||||||
if (S_ISREG(file->mode) && file->write_size > 0)
|
if (S_ISREG(file->mode) && file->write_size > 0)
|
||||||
backup_size_on_disk += file->write_size;
|
backup_size_on_disk += file->write_size;
|
||||||
|
|
||||||
if (file->external_dir_num && external_list)
|
/* for files from PGDATA and external files use rel_path
|
||||||
{
|
* streamed WAL files has rel_path relative not to "database/"
|
||||||
path = GetRelativePath(path, parray_get(external_list,
|
* but to "database/pg_wal", so for them use path.
|
||||||
file->external_dir_num - 1));
|
*/
|
||||||
}
|
if ((root && strstr(path, root) == path) ||
|
||||||
else
|
(file->external_dir_num && external_list))
|
||||||
path = file->rel_path;
|
path = file->rel_path;
|
||||||
|
|
||||||
len = sprintf(line, "{\"path\":\"%s\", \"size\":\"" INT64_FORMAT "\", "
|
len = sprintf(line, "{\"path\":\"%s\", \"size\":\"" INT64_FORMAT "\", "
|
||||||
"\"mode\":\"%u\", \"is_datafile\":\"%u\", "
|
"\"mode\":\"%u\", \"is_datafile\":\"%u\", "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user