summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/ref/pg_basebackup.sgml8
-rw-r--r--src/backend/access/transam/xlog.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index 14cc88a852..8ce103301f 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -161,6 +161,7 @@ PostgreSQL documentation
tablespaces, the main data directory will be placed in the
target directory, but all other tablespaces will be placed
in the same absolute path as they have on the source server.
+ (See <option>--tablespace-mapping</option> to change that.)
</para>
<para>
This is the default format.
@@ -241,7 +242,12 @@ PostgreSQL documentation
the main data directory are updated to point to the new location. So
the new data directory is ready to be used for a new server instance
with all tablespaces in the updated locations.
- </para>
+ </para>
+
+ <para>
+ Currently, this option only works with plain output format; it is
+ ignored if tar format is selected.
+ </para>
</listitem>
</varlistentry>
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index f4d1ce5dea..9be0cb236d 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -11959,7 +11959,7 @@ read_tablespace_map(List **tablespaces)
}
else if ((ch == '\n' || ch == '\r') && prev_ch == '\\')
str[i - 1] = ch;
- else
+ else if (i < sizeof(str) - 1)
str[i++] = ch;
prev_ch = ch;
}