aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_basebackup/pg_receivexlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_basebackup/pg_receivexlog.c')
-rw-r--r--src/bin/pg_basebackup/pg_receivexlog.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/bin/pg_basebackup/pg_receivexlog.c b/src/bin/pg_basebackup/pg_receivexlog.c
index e77d2b6d708..53802af896b 100644
--- a/src/bin/pg_basebackup/pg_receivexlog.c
+++ b/src/bin/pg_basebackup/pg_receivexlog.c
@@ -188,23 +188,11 @@ FindStreamingStart(uint32 *tli)
/*
* Check if the filename looks like an xlog file, or a .partial file.
- * Xlog files are always 24 characters, and .partial files are 32
- * characters.
*/
- if (strlen(dirent->d_name) == 24)
- {
- if (strspn(dirent->d_name, "0123456789ABCDEF") != 24)
- continue;
+ if (IsXLogFileName(dirent->d_name))
ispartial = false;
- }
- else if (strlen(dirent->d_name) == 32)
- {
- if (strspn(dirent->d_name, "0123456789ABCDEF") != 24)
- continue;
- if (strcmp(&dirent->d_name[24], ".partial") != 0)
- continue;
+ else if (IsPartialXLogFileName(dirent->d_name))
ispartial = true;
- }
else
continue;