mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
pg_basebackup: Skip only the *contents* of pg_replslot.
Include the directory itself. Fujii Masao
This commit is contained in:
parent
32001ab0b7
commit
278c94209b
@ -862,10 +862,6 @@ sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces)
|
|||||||
if (strcmp(de->d_name, BACKUP_LABEL_FILE) == 0)
|
if (strcmp(de->d_name, BACKUP_LABEL_FILE) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Skip pg_replslot, not useful to copy */
|
|
||||||
if (strcmp(de->d_name, "pg_replslot") == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if the postmaster has signaled us to exit, and abort with an
|
* Check if the postmaster has signaled us to exit, and abort with an
|
||||||
* error in that case. The error handler further up will call
|
* error in that case. The error handler further up will call
|
||||||
@ -920,6 +916,18 @@ sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Skip pg_replslot, not useful to copy. But include it as an empty
|
||||||
|
* directory anyway, so we get permissions right.
|
||||||
|
*/
|
||||||
|
if (strcmp(de->d_name, "pg_replslot") == 0)
|
||||||
|
{
|
||||||
|
if (!sizeonly)
|
||||||
|
_tarWriteHeader(pathbuf + basepathlen + 1, NULL, &statbuf);
|
||||||
|
size += 512; /* Size of the header just added */
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We can skip pg_xlog, the WAL segments need to be fetched from the
|
* We can skip pg_xlog, the WAL segments need to be fetched from the
|
||||||
* WAL archive anyway. But include it as an empty directory anyway, so
|
* WAL archive anyway. But include it as an empty directory anyway, so
|
||||||
|
Loading…
Reference in New Issue
Block a user