mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-12-11 11:41:33 +02:00
do not call calc_checksum for non regular files. add an Assert
This commit is contained in:
parent
a5e8a54d82
commit
765524854c
@ -1230,7 +1230,8 @@ pg_stop_backup(pgBackup *backup)
|
|||||||
if (backup_files_list)
|
if (backup_files_list)
|
||||||
{
|
{
|
||||||
file = pgFileNew(tablespace_map, true);
|
file = pgFileNew(tablespace_map, true);
|
||||||
calc_file_checksum(file);
|
if (S_ISREG(file->mode))
|
||||||
|
calc_file_checksum(file);
|
||||||
free(file->path);
|
free(file->path);
|
||||||
file->path = strdup(PG_TABLESPACE_MAP_FILE);
|
file->path = strdup(PG_TABLESPACE_MAP_FILE);
|
||||||
parray_append(backup_files_list, file);
|
parray_append(backup_files_list, file);
|
||||||
|
@ -997,6 +997,7 @@ calc_file_checksum(pgFile *file)
|
|||||||
struct stat st;
|
struct stat st;
|
||||||
pg_crc32 crc;
|
pg_crc32 crc;
|
||||||
|
|
||||||
|
Assert(S_ISREG(file->mode));
|
||||||
INIT_CRC32C(crc);
|
INIT_CRC32C(crc);
|
||||||
|
|
||||||
/* reset size summary */
|
/* reset size summary */
|
||||||
|
Loading…
Reference in New Issue
Block a user