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,6 +1230,7 @@ pg_stop_backup(pgBackup *backup)
|
|||||||
if (backup_files_list)
|
if (backup_files_list)
|
||||||
{
|
{
|
||||||
file = pgFileNew(tablespace_map, true);
|
file = pgFileNew(tablespace_map, true);
|
||||||
|
if (S_ISREG(file->mode))
|
||||||
calc_file_checksum(file);
|
calc_file_checksum(file);
|
||||||
free(file->path);
|
free(file->path);
|
||||||
file->path = strdup(PG_TABLESPACE_MAP_FILE);
|
file->path = strdup(PG_TABLESPACE_MAP_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