summaryrefslogtreecommitdiffstats
path: root/src/bin/pg_basebackup
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
commit46651ce6fe013220ed397add242004d764fc0153 (patch)
tree6e5299f990f88e60174a1d3ae6e48eedd2688b2b /src/bin/pg_basebackup
parentInitial commit. (diff)
downloadpostgresql-14-upstream.tar.xz
postgresql-14-upstream.zip
Adding upstream version 14.5.upstream/14.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/bin/pg_basebackup')
-rw-r--r--src/bin/pg_basebackup/.gitignore5
-rw-r--r--src/bin/pg_basebackup/Makefile67
-rw-r--r--src/bin/pg_basebackup/nls.mk6
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c2658
-rw-r--r--src/bin/pg_basebackup/pg_receivewal.c782
-rw-r--r--src/bin/pg_basebackup/pg_recvlogical.c1055
-rw-r--r--src/bin/pg_basebackup/po/cs.po1647
-rw-r--r--src/bin/pg_basebackup/po/de.po1484
-rw-r--r--src/bin/pg_basebackup/po/el.po1476
-rw-r--r--src/bin/pg_basebackup/po/es.po1487
-rw-r--r--src/bin/pg_basebackup/po/fr.po1790
-rw-r--r--src/bin/pg_basebackup/po/ja.po1487
-rw-r--r--src/bin/pg_basebackup/po/ko.po1588
-rw-r--r--src/bin/pg_basebackup/po/ru.po1776
-rw-r--r--src/bin/pg_basebackup/po/sv.po1497
-rw-r--r--src/bin/pg_basebackup/po/tr.po1535
-rw-r--r--src/bin/pg_basebackup/po/uk.po1439
-rw-r--r--src/bin/pg_basebackup/po/zh_CN.po1463
-rw-r--r--src/bin/pg_basebackup/receivelog.c1276
-rw-r--r--src/bin/pg_basebackup/receivelog.h57
-rw-r--r--src/bin/pg_basebackup/streamutil.c680
-rw-r--r--src/bin/pg_basebackup/streamutil.h53
-rw-r--r--src/bin/pg_basebackup/t/010_pg_basebackup.pl612
-rw-r--r--src/bin/pg_basebackup/t/020_pg_receivewal.pl77
-rw-r--r--src/bin/pg_basebackup/t/030_pg_recvlogical.pl65
-rw-r--r--src/bin/pg_basebackup/walmethods.c1161
-rw-r--r--src/bin/pg_basebackup/walmethods.h103
27 files changed, 27326 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/.gitignore b/src/bin/pg_basebackup/.gitignore
new file mode 100644
index 0000000..26048bd
--- /dev/null
+++ b/src/bin/pg_basebackup/.gitignore
@@ -0,0 +1,5 @@
+/pg_basebackup
+/pg_receivewal
+/pg_recvlogical
+
+/tmp_check/
diff --git a/src/bin/pg_basebackup/Makefile b/src/bin/pg_basebackup/Makefile
new file mode 100644
index 0000000..66e0070
--- /dev/null
+++ b/src/bin/pg_basebackup/Makefile
@@ -0,0 +1,67 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/bin/pg_basebackup
+#
+# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/bin/pg_basebackup/Makefile
+#
+#-------------------------------------------------------------------------
+
+PGFILEDESC = "pg_basebackup/pg_receivewal/pg_recvlogical - streaming WAL and backup receivers"
+PGAPPICON=win32
+
+EXTRA_INSTALL=contrib/test_decoding
+
+subdir = src/bin/pg_basebackup
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+# make this available to TAP test scripts
+export TAR
+
+override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
+LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport)
+
+OBJS = \
+ $(WIN32RES) \
+ receivelog.o \
+ streamutil.o \
+ walmethods.o
+
+all: pg_basebackup pg_receivewal pg_recvlogical
+
+pg_basebackup: pg_basebackup.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
+ $(CC) $(CFLAGS) pg_basebackup.o $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+
+pg_receivewal: pg_receivewal.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
+ $(CC) $(CFLAGS) pg_receivewal.o $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+
+pg_recvlogical: pg_recvlogical.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
+ $(CC) $(CFLAGS) pg_recvlogical.o $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+
+install: all installdirs
+ $(INSTALL_PROGRAM) pg_basebackup$(X) '$(DESTDIR)$(bindir)/pg_basebackup$(X)'
+ $(INSTALL_PROGRAM) pg_receivewal$(X) '$(DESTDIR)$(bindir)/pg_receivewal$(X)'
+ $(INSTALL_PROGRAM) pg_recvlogical$(X) '$(DESTDIR)$(bindir)/pg_recvlogical$(X)'
+
+installdirs:
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
+
+uninstall:
+ rm -f '$(DESTDIR)$(bindir)/pg_basebackup$(X)'
+ rm -f '$(DESTDIR)$(bindir)/pg_receivewal$(X)'
+ rm -f '$(DESTDIR)$(bindir)/pg_recvlogical$(X)'
+
+clean distclean maintainer-clean:
+ rm -f pg_basebackup$(X) pg_receivewal$(X) pg_recvlogical$(X) \
+ pg_basebackup.o pg_receivewal.o pg_recvlogical.o \
+ $(OBJS)
+ rm -rf tmp_check
+
+check:
+ $(prove_check)
+
+installcheck:
+ $(prove_installcheck)
diff --git a/src/bin/pg_basebackup/nls.mk b/src/bin/pg_basebackup/nls.mk
new file mode 100644
index 0000000..3fd4266
--- /dev/null
+++ b/src/bin/pg_basebackup/nls.mk
@@ -0,0 +1,6 @@
+# src/bin/pg_basebackup/nls.mk
+CATALOG_NAME = pg_basebackup
+AVAIL_LANGUAGES = cs de el es fr ja ko ru sv tr uk zh_CN
+GETTEXT_FILES = $(FRONTEND_COMMON_GETTEXT_FILES) pg_basebackup.c pg_receivewal.c pg_recvlogical.c receivelog.c streamutil.c walmethods.c ../../common/fe_memutils.c ../../common/file_utils.c ../../fe_utils/recovery_gen.c
+GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) simple_prompt tar_set_error
+GETTEXT_FLAGS = $(FRONTEND_COMMON_GETTEXT_FLAGS)
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
new file mode 100644
index 0000000..fa2ce75
--- /dev/null
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -0,0 +1,2658 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_basebackup.c - receive a base backup using streaming replication protocol
+ *
+ * Author: Magnus Hagander <magnus@hagander.net>
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_basebackup/pg_basebackup.c
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <unistd.h>
+#include <dirent.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <time.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#ifdef HAVE_LIBZ
+#include <zlib.h>
+#endif
+
+#include "access/xlog_internal.h"
+#include "common/file_perm.h"
+#include "common/file_utils.h"
+#include "common/logging.h"
+#include "common/string.h"
+#include "fe_utils/recovery_gen.h"
+#include "fe_utils/string_utils.h"
+#include "getopt_long.h"
+#include "libpq-fe.h"
+#include "pgtar.h"
+#include "pgtime.h"
+#include "pqexpbuffer.h"
+#include "receivelog.h"
+#include "replication/basebackup.h"
+#include "streamutil.h"
+
+#define ERRCODE_DATA_CORRUPTED "XX001"
+
+typedef struct TablespaceListCell
+{
+ struct TablespaceListCell *next;
+ char old_dir[MAXPGPATH];
+ char new_dir[MAXPGPATH];
+} TablespaceListCell;
+
+typedef struct TablespaceList
+{
+ TablespaceListCell *head;
+ TablespaceListCell *tail;
+} TablespaceList;
+
+typedef struct WriteTarState
+{
+ int tablespacenum;
+ char filename[MAXPGPATH];
+ FILE *tarfile;
+ char tarhdr[TAR_BLOCK_SIZE];
+ bool basetablespace;
+ bool in_tarhdr;
+ bool skip_file;
+ bool is_recovery_guc_supported;
+ bool is_postgresql_auto_conf;
+ bool found_postgresql_auto_conf;
+ int file_padding_len;
+ size_t tarhdrsz;
+ pgoff_t filesz;
+#ifdef HAVE_LIBZ
+ gzFile ztarfile;
+#endif
+} WriteTarState;
+
+typedef struct UnpackTarState
+{
+ int tablespacenum;
+ char current_path[MAXPGPATH];
+ char filename[MAXPGPATH];
+ const char *mapped_tblspc_path;
+ pgoff_t current_len_left;
+ int current_padding;
+ FILE *file;
+} UnpackTarState;
+
+typedef struct WriteManifestState
+{
+ char filename[MAXPGPATH];
+ FILE *file;
+} WriteManifestState;
+
+typedef void (*WriteDataCallback) (size_t nbytes, char *buf,
+ void *callback_data);
+
+/*
+ * pg_xlog has been renamed to pg_wal in version 10. This version number
+ * should be compared with PQserverVersion().
+ */
+#define MINIMUM_VERSION_FOR_PG_WAL 100000
+
+/*
+ * Temporary replication slots are supported from version 10.
+ */
+#define MINIMUM_VERSION_FOR_TEMP_SLOTS 100000
+
+/*
+ * Backup manifests are supported from version 13.
+ */
+#define MINIMUM_VERSION_FOR_MANIFESTS 130000
+
+/*
+ * Different ways to include WAL
+ */
+typedef enum
+{
+ NO_WAL,
+ FETCH_WAL,
+ STREAM_WAL
+} IncludeWal;
+
+/* Global options */
+static char *basedir = NULL;
+static TablespaceList tablespace_dirs = {NULL, NULL};
+static char *xlog_dir = NULL;
+static char format = 'p'; /* p(lain)/t(ar) */
+static char *label = "pg_basebackup base backup";
+static bool noclean = false;
+static bool checksum_failure = false;
+static bool showprogress = false;
+static bool estimatesize = true;
+static int verbose = 0;
+static int compresslevel = 0;
+static IncludeWal includewal = STREAM_WAL;
+static bool fastcheckpoint = false;
+static bool writerecoveryconf = false;
+static bool do_sync = true;
+static int standby_message_timeout = 10 * 1000; /* 10 sec = default */
+static pg_time_t last_progress_report = 0;
+static int32 maxrate = 0; /* no limit by default */
+static char *replication_slot = NULL;
+static bool temp_replication_slot = true;
+static bool create_slot = false;
+static bool no_slot = false;
+static bool verify_checksums = true;
+static bool manifest = true;
+static bool manifest_force_encode = false;
+static char *manifest_checksums = NULL;
+
+static bool success = false;
+static bool made_new_pgdata = false;
+static bool found_existing_pgdata = false;
+static bool made_new_xlogdir = false;
+static bool found_existing_xlogdir = false;
+static bool made_tablespace_dirs = false;
+static bool found_tablespace_dirs = false;
+
+/* Progress counters */
+static uint64 totalsize_kb;
+static uint64 totaldone;
+static int tablespacecount;
+
+/* Pipe to communicate with background wal receiver process */
+#ifndef WIN32
+static int bgpipe[2] = {-1, -1};
+#endif
+
+/* Handle to child process */
+static pid_t bgchild = -1;
+static bool in_log_streamer = false;
+
+/* End position for xlog streaming, empty string if unknown yet */
+static XLogRecPtr xlogendptr;
+
+#ifndef WIN32
+static int has_xlogendptr = 0;
+#else
+static volatile LONG has_xlogendptr = 0;
+#endif
+
+/* Contents of configuration file to be generated */
+static PQExpBuffer recoveryconfcontents = NULL;
+
+/* Function headers */
+static void usage(void);
+static void verify_dir_is_empty_or_create(char *dirname, bool *created, bool *found);
+static void progress_report(int tablespacenum, const char *filename, bool force,
+ bool finished);
+
+static void ReceiveTarFile(PGconn *conn, PGresult *res, int rownum);
+static void ReceiveTarCopyChunk(size_t r, char *copybuf, void *callback_data);
+static void ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum);
+static void ReceiveTarAndUnpackCopyChunk(size_t r, char *copybuf,
+ void *callback_data);
+static void ReceiveBackupManifest(PGconn *conn);
+static void ReceiveBackupManifestChunk(size_t r, char *copybuf,
+ void *callback_data);
+static void ReceiveBackupManifestInMemory(PGconn *conn, PQExpBuffer buf);
+static void ReceiveBackupManifestInMemoryChunk(size_t r, char *copybuf,
+ void *callback_data);
+static void BaseBackup(void);
+
+static bool reached_end_position(XLogRecPtr segendpos, uint32 timeline,
+ bool segment_finished);
+
+static const char *get_tablespace_mapping(const char *dir);
+static void tablespace_list_append(const char *arg);
+
+
+static void
+cleanup_directories_atexit(void)
+{
+ if (success || in_log_streamer)
+ return;
+
+ if (!noclean && !checksum_failure)
+ {
+ if (made_new_pgdata)
+ {
+ pg_log_info("removing data directory \"%s\"", basedir);
+ if (!rmtree(basedir, true))
+ pg_log_error("failed to remove data directory");
+ }
+ else if (found_existing_pgdata)
+ {
+ pg_log_info("removing contents of data directory \"%s\"", basedir);
+ if (!rmtree(basedir, false))
+ pg_log_error("failed to remove contents of data directory");
+ }
+
+ if (made_new_xlogdir)
+ {
+ pg_log_info("removing WAL directory \"%s\"", xlog_dir);
+ if (!rmtree(xlog_dir, true))
+ pg_log_error("failed to remove WAL directory");
+ }
+ else if (found_existing_xlogdir)
+ {
+ pg_log_info("removing contents of WAL directory \"%s\"", xlog_dir);
+ if (!rmtree(xlog_dir, false))
+ pg_log_error("failed to remove contents of WAL directory");
+ }
+ }
+ else
+ {
+ if ((made_new_pgdata || found_existing_pgdata) && !checksum_failure)
+ pg_log_info("data directory \"%s\" not removed at user's request", basedir);
+
+ if (made_new_xlogdir || found_existing_xlogdir)
+ pg_log_info("WAL directory \"%s\" not removed at user's request", xlog_dir);
+ }
+
+ if ((made_tablespace_dirs || found_tablespace_dirs) && !checksum_failure)
+ pg_log_info("changes to tablespace directories will not be undone");
+}
+
+static void
+disconnect_atexit(void)
+{
+ if (conn != NULL)
+ PQfinish(conn);
+}
+
+#ifndef WIN32
+/*
+ * On windows, our background thread dies along with the process. But on
+ * Unix, if we have started a subprocess, we want to kill it off so it
+ * doesn't remain running trying to stream data.
+ */
+static void
+kill_bgchild_atexit(void)
+{
+ if (bgchild > 0)
+ kill(bgchild, SIGTERM);
+}
+#endif
+
+/*
+ * Split argument into old_dir and new_dir and append to tablespace mapping
+ * list.
+ */
+static void
+tablespace_list_append(const char *arg)
+{
+ TablespaceListCell *cell = (TablespaceListCell *) pg_malloc0(sizeof(TablespaceListCell));
+ char *dst;
+ char *dst_ptr;
+ const char *arg_ptr;
+
+ dst_ptr = dst = cell->old_dir;
+ for (arg_ptr = arg; *arg_ptr; arg_ptr++)
+ {
+ if (dst_ptr - dst >= MAXPGPATH)
+ {
+ pg_log_error("directory name too long");
+ exit(1);
+ }
+
+ if (*arg_ptr == '\\' && *(arg_ptr + 1) == '=')
+ ; /* skip backslash escaping = */
+ else if (*arg_ptr == '=' && (arg_ptr == arg || *(arg_ptr - 1) != '\\'))
+ {
+ if (*cell->new_dir)
+ {
+ pg_log_error("multiple \"=\" signs in tablespace mapping");
+ exit(1);
+ }
+ else
+ dst = dst_ptr = cell->new_dir;
+ }
+ else
+ *dst_ptr++ = *arg_ptr;
+ }
+
+ if (!*cell->old_dir || !*cell->new_dir)
+ {
+ pg_log_error("invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\"", arg);
+ exit(1);
+ }
+
+ /*
+ * This check isn't absolutely necessary. But all tablespaces are created
+ * with absolute directories, so specifying a non-absolute path here would
+ * just never match, possibly confusing users. It's also good to be
+ * consistent with the new_dir check.
+ */
+ if (!is_absolute_path(cell->old_dir))
+ {
+ pg_log_error("old directory is not an absolute path in tablespace mapping: %s",
+ cell->old_dir);
+ exit(1);
+ }
+
+ if (!is_absolute_path(cell->new_dir))
+ {
+ pg_log_error("new directory is not an absolute path in tablespace mapping: %s",
+ cell->new_dir);
+ exit(1);
+ }
+
+ /*
+ * Comparisons done with these values should involve similarly
+ * canonicalized path values. This is particularly sensitive on Windows
+ * where path values may not necessarily use Unix slashes.
+ */
+ canonicalize_path(cell->old_dir);
+ canonicalize_path(cell->new_dir);
+
+ if (tablespace_dirs.tail)
+ tablespace_dirs.tail->next = cell;
+ else
+ tablespace_dirs.head = cell;
+ tablespace_dirs.tail = cell;
+}
+
+
+#ifdef HAVE_LIBZ
+static const char *
+get_gz_error(gzFile gzf)
+{
+ int errnum;
+ const char *errmsg;
+
+ errmsg = gzerror(gzf, &errnum);
+ if (errnum == Z_ERRNO)
+ return strerror(errno);
+ else
+ return errmsg;
+}
+#endif
+
+static void
+usage(void)
+{
+ printf(_("%s takes a base backup of a running PostgreSQL server.\n\n"),
+ progname);
+ printf(_("Usage:\n"));
+ printf(_(" %s [OPTION]...\n"), progname);
+ printf(_("\nOptions controlling the output:\n"));
+ printf(_(" -D, --pgdata=DIRECTORY receive base backup into directory\n"));
+ printf(_(" -F, --format=p|t output format (plain (default), tar)\n"));
+ printf(_(" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+ " (in kB/s, or use suffix \"k\" or \"M\")\n"));
+ printf(_(" -R, --write-recovery-conf\n"
+ " write configuration for replication\n"));
+ printf(_(" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+ " relocate tablespace in OLDDIR to NEWDIR\n"));
+ printf(_(" --waldir=WALDIR location for the write-ahead log directory\n"));
+ printf(_(" -X, --wal-method=none|fetch|stream\n"
+ " include required WAL files with specified method\n"));
+ printf(_(" -z, --gzip compress tar output\n"));
+ printf(_(" -Z, --compress=0-9 compress tar output with given compression level\n"));
+ printf(_("\nGeneral options:\n"));
+ printf(_(" -c, --checkpoint=fast|spread\n"
+ " set fast or spread checkpointing\n"));
+ printf(_(" -C, --create-slot create replication slot\n"));
+ printf(_(" -l, --label=LABEL set backup label\n"));
+ printf(_(" -n, --no-clean do not clean up after errors\n"));
+ printf(_(" -N, --no-sync do not wait for changes to be written safely to disk\n"));
+ printf(_(" -P, --progress show progress information\n"));
+ printf(_(" -S, --slot=SLOTNAME replication slot to use\n"));
+ printf(_(" -v, --verbose output verbose messages\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+ " use algorithm for manifest checksums\n"));
+ printf(_(" --manifest-force-encode\n"
+ " hex encode all file names in manifest\n"));
+ printf(_(" --no-estimate-size do not estimate backup size in server side\n"));
+ printf(_(" --no-manifest suppress generation of backup manifest\n"));
+ printf(_(" --no-slot prevent creation of temporary replication slot\n"));
+ printf(_(" --no-verify-checksums\n"
+ " do not verify checksums\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
+ printf(_("\nConnection options:\n"));
+ printf(_(" -d, --dbname=CONNSTR connection string\n"));
+ printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
+ printf(_(" -p, --port=PORT database server port number\n"));
+ printf(_(" -s, --status-interval=INTERVAL\n"
+ " time between status packets sent to server (in seconds)\n"));
+ printf(_(" -U, --username=NAME connect as specified database user\n"));
+ printf(_(" -w, --no-password never prompt for password\n"));
+ printf(_(" -W, --password force password prompt (should happen automatically)\n"));
+ printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
+ printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
+}
+
+
+/*
+ * Called in the background process every time data is received.
+ * On Unix, we check to see if there is any data on our pipe
+ * (which would mean we have a stop position), and if it is, check if
+ * it is time to stop.
+ * On Windows, we are in a single process, so we can just check if it's
+ * time to stop.
+ */
+static bool
+reached_end_position(XLogRecPtr segendpos, uint32 timeline,
+ bool segment_finished)
+{
+ if (!has_xlogendptr)
+ {
+#ifndef WIN32
+ fd_set fds;
+ struct timeval tv;
+ int r;
+
+ /*
+ * Don't have the end pointer yet - check our pipe to see if it has
+ * been sent yet.
+ */
+ FD_ZERO(&fds);
+ FD_SET(bgpipe[0], &fds);
+
+ MemSet(&tv, 0, sizeof(tv));
+
+ r = select(bgpipe[0] + 1, &fds, NULL, NULL, &tv);
+ if (r == 1)
+ {
+ char xlogend[64];
+ uint32 hi,
+ lo;
+
+ MemSet(xlogend, 0, sizeof(xlogend));
+ r = read(bgpipe[0], xlogend, sizeof(xlogend) - 1);
+ if (r < 0)
+ {
+ pg_log_error("could not read from ready pipe: %m");
+ exit(1);
+ }
+
+ if (sscanf(xlogend, "%X/%X", &hi, &lo) != 2)
+ {
+ pg_log_error("could not parse write-ahead log location \"%s\"",
+ xlogend);
+ exit(1);
+ }
+ xlogendptr = ((uint64) hi) << 32 | lo;
+ has_xlogendptr = 1;
+
+ /*
+ * Fall through to check if we've reached the point further
+ * already.
+ */
+ }
+ else
+ {
+ /*
+ * No data received on the pipe means we don't know the end
+ * position yet - so just say it's not time to stop yet.
+ */
+ return false;
+ }
+#else
+
+ /*
+ * On win32, has_xlogendptr is set by the main thread, so if it's not
+ * set here, we just go back and wait until it shows up.
+ */
+ return false;
+#endif
+ }
+
+ /*
+ * At this point we have an end pointer, so compare it to the current
+ * position to figure out if it's time to stop.
+ */
+ if (segendpos >= xlogendptr)
+ return true;
+
+ /*
+ * Have end pointer, but haven't reached it yet - so tell the caller to
+ * keep streaming.
+ */
+ return false;
+}
+
+typedef struct
+{
+ PGconn *bgconn;
+ XLogRecPtr startptr;
+ char xlog[MAXPGPATH]; /* directory or tarfile depending on mode */
+ char *sysidentifier;
+ int timeline;
+} logstreamer_param;
+
+static int
+LogStreamerMain(logstreamer_param *param)
+{
+ StreamCtl stream;
+
+ in_log_streamer = true;
+
+ MemSet(&stream, 0, sizeof(stream));
+ stream.startpos = param->startptr;
+ stream.timeline = param->timeline;
+ stream.sysidentifier = param->sysidentifier;
+ stream.stream_stop = reached_end_position;
+#ifndef WIN32
+ stream.stop_socket = bgpipe[0];
+#else
+ stream.stop_socket = PGINVALID_SOCKET;
+#endif
+ stream.standby_message_timeout = standby_message_timeout;
+ stream.synchronous = false;
+ /* fsync happens at the end of pg_basebackup for all data */
+ stream.do_sync = false;
+ stream.mark_done = true;
+ stream.partial_suffix = NULL;
+ stream.replication_slot = replication_slot;
+
+ if (format == 'p')
+ stream.walmethod = CreateWalDirectoryMethod(param->xlog, 0,
+ stream.do_sync);
+ else
+ stream.walmethod = CreateWalTarMethod(param->xlog, compresslevel,
+ stream.do_sync);
+
+ if (!ReceiveXlogStream(param->bgconn, &stream))
+
+ /*
+ * Any errors will already have been reported in the function process,
+ * but we need to tell the parent that we didn't shutdown in a nice
+ * way.
+ */
+ return 1;
+
+ if (!stream.walmethod->finish())
+ {
+ pg_log_error("could not finish writing WAL files: %m");
+ return 1;
+ }
+
+ PQfinish(param->bgconn);
+
+ if (format == 'p')
+ FreeWalDirectoryMethod();
+ else
+ FreeWalTarMethod();
+ pg_free(stream.walmethod);
+
+ return 0;
+}
+
+/*
+ * Initiate background process for receiving xlog during the backup.
+ * The background stream will use its own database connection so we can
+ * stream the logfile in parallel with the backups.
+ */
+static void
+StartLogStreamer(char *startpos, uint32 timeline, char *sysidentifier)
+{
+ logstreamer_param *param;
+ uint32 hi,
+ lo;
+ char statusdir[MAXPGPATH];
+
+ param = pg_malloc0(sizeof(logstreamer_param));
+ param->timeline = timeline;
+ param->sysidentifier = sysidentifier;
+
+ /* Convert the starting position */
+ if (sscanf(startpos, "%X/%X", &hi, &lo) != 2)
+ {
+ pg_log_error("could not parse write-ahead log location \"%s\"",
+ startpos);
+ exit(1);
+ }
+ param->startptr = ((uint64) hi) << 32 | lo;
+ /* Round off to even segment position */
+ param->startptr -= XLogSegmentOffset(param->startptr, WalSegSz);
+
+#ifndef WIN32
+ /* Create our background pipe */
+ if (pipe(bgpipe) < 0)
+ {
+ pg_log_error("could not create pipe for background process: %m");
+ exit(1);
+ }
+#endif
+
+ /* Get a second connection */
+ param->bgconn = GetConnection();
+ if (!param->bgconn)
+ /* Error message already written in GetConnection() */
+ exit(1);
+
+ /* In post-10 cluster, pg_xlog has been renamed to pg_wal */
+ snprintf(param->xlog, sizeof(param->xlog), "%s/%s",
+ basedir,
+ PQserverVersion(conn) < MINIMUM_VERSION_FOR_PG_WAL ?
+ "pg_xlog" : "pg_wal");
+
+ /* Temporary replication slots are only supported in 10 and newer */
+ if (PQserverVersion(conn) < MINIMUM_VERSION_FOR_TEMP_SLOTS)
+ temp_replication_slot = false;
+
+ /*
+ * Create replication slot if requested
+ */
+ if (temp_replication_slot && !replication_slot)
+ replication_slot = psprintf("pg_basebackup_%d", (int) PQbackendPID(param->bgconn));
+ if (temp_replication_slot || create_slot)
+ {
+ if (!CreateReplicationSlot(param->bgconn, replication_slot, NULL,
+ temp_replication_slot, true, true, false))
+ exit(1);
+
+ if (verbose)
+ {
+ if (temp_replication_slot)
+ pg_log_info("created temporary replication slot \"%s\"",
+ replication_slot);
+ else
+ pg_log_info("created replication slot \"%s\"",
+ replication_slot);
+ }
+ }
+
+ if (format == 'p')
+ {
+ /*
+ * Create pg_wal/archive_status or pg_xlog/archive_status (and thus
+ * pg_wal or pg_xlog) depending on the target server so we can write
+ * to basedir/pg_wal or basedir/pg_xlog as the directory entry in the
+ * tar file may arrive later.
+ */
+ snprintf(statusdir, sizeof(statusdir), "%s/%s/archive_status",
+ basedir,
+ PQserverVersion(conn) < MINIMUM_VERSION_FOR_PG_WAL ?
+ "pg_xlog" : "pg_wal");
+
+ if (pg_mkdir_p(statusdir, pg_dir_create_mode) != 0 && errno != EEXIST)
+ {
+ pg_log_error("could not create directory \"%s\": %m", statusdir);
+ exit(1);
+ }
+ }
+
+ /*
+ * Start a child process and tell it to start streaming. On Unix, this is
+ * a fork(). On Windows, we create a thread.
+ */
+#ifndef WIN32
+ bgchild = fork();
+ if (bgchild == 0)
+ {
+ /* in child process */
+ exit(LogStreamerMain(param));
+ }
+ else if (bgchild < 0)
+ {
+ pg_log_error("could not create background process: %m");
+ exit(1);
+ }
+
+ /*
+ * Else we are in the parent process and all is well.
+ */
+ atexit(kill_bgchild_atexit);
+#else /* WIN32 */
+ bgchild = _beginthreadex(NULL, 0, (void *) LogStreamerMain, param, 0, NULL);
+ if (bgchild == 0)
+ {
+ pg_log_error("could not create background thread: %m");
+ exit(1);
+ }
+#endif
+}
+
+/*
+ * Verify that the given directory exists and is empty. If it does not
+ * exist, it is created. If it exists but is not empty, an error will
+ * be given and the process ended.
+ */
+static void
+verify_dir_is_empty_or_create(char *dirname, bool *created, bool *found)
+{
+ switch (pg_check_dir(dirname))
+ {
+ case 0:
+
+ /*
+ * Does not exist, so create
+ */
+ if (pg_mkdir_p(dirname, pg_dir_create_mode) == -1)
+ {
+ pg_log_error("could not create directory \"%s\": %m", dirname);
+ exit(1);
+ }
+ if (created)
+ *created = true;
+ return;
+ case 1:
+
+ /*
+ * Exists, empty
+ */
+ if (found)
+ *found = true;
+ return;
+ case 2:
+ case 3:
+ case 4:
+
+ /*
+ * Exists, not empty
+ */
+ pg_log_error("directory \"%s\" exists but is not empty", dirname);
+ exit(1);
+ case -1:
+
+ /*
+ * Access problem
+ */
+ pg_log_error("could not access directory \"%s\": %m", dirname);
+ exit(1);
+ }
+}
+
+
+/*
+ * Print a progress report based on the global variables. If verbose output
+ * is enabled, also print the current file name.
+ *
+ * Progress report is written at maximum once per second, unless the force
+ * parameter is set to true.
+ *
+ * If finished is set to true, this is the last progress report. The cursor
+ * is moved to the next line.
+ */
+static void
+progress_report(int tablespacenum, const char *filename,
+ bool force, bool finished)
+{
+ int percent;
+ char totaldone_str[32];
+ char totalsize_str[32];
+ pg_time_t now;
+
+ if (!showprogress)
+ return;
+
+ now = time(NULL);
+ if (now == last_progress_report && !force && !finished)
+ return; /* Max once per second */
+
+ last_progress_report = now;
+ percent = totalsize_kb ? (int) ((totaldone / 1024) * 100 / totalsize_kb) : 0;
+
+ /*
+ * Avoid overflowing past 100% or the full size. This may make the total
+ * size number change as we approach the end of the backup (the estimate
+ * will always be wrong if WAL is included), but that's better than having
+ * the done column be bigger than the total.
+ */
+ if (percent > 100)
+ percent = 100;
+ if (totaldone / 1024 > totalsize_kb)
+ totalsize_kb = totaldone / 1024;
+
+ /*
+ * Separate step to keep platform-dependent format code out of
+ * translatable strings. And we only test for INT64_FORMAT availability
+ * in snprintf, not fprintf.
+ */
+ snprintf(totaldone_str, sizeof(totaldone_str), INT64_FORMAT,
+ totaldone / 1024);
+ snprintf(totalsize_str, sizeof(totalsize_str), INT64_FORMAT, totalsize_kb);
+
+#define VERBOSE_FILENAME_LENGTH 35
+ if (verbose)
+ {
+ if (!filename)
+
+ /*
+ * No filename given, so clear the status line (used for last
+ * call)
+ */
+ fprintf(stderr,
+ ngettext("%*s/%s kB (100%%), %d/%d tablespace %*s",
+ "%*s/%s kB (100%%), %d/%d tablespaces %*s",
+ tablespacecount),
+ (int) strlen(totalsize_str),
+ totaldone_str, totalsize_str,
+ tablespacenum, tablespacecount,
+ VERBOSE_FILENAME_LENGTH + 5, "");
+ else
+ {
+ bool truncate = (strlen(filename) > VERBOSE_FILENAME_LENGTH);
+
+ fprintf(stderr,
+ ngettext("%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)",
+ "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)",
+ tablespacecount),
+ (int) strlen(totalsize_str),
+ totaldone_str, totalsize_str, percent,
+ tablespacenum, tablespacecount,
+ /* Prefix with "..." if we do leading truncation */
+ truncate ? "..." : "",
+ truncate ? VERBOSE_FILENAME_LENGTH - 3 : VERBOSE_FILENAME_LENGTH,
+ truncate ? VERBOSE_FILENAME_LENGTH - 3 : VERBOSE_FILENAME_LENGTH,
+ /* Truncate filename at beginning if it's too long */
+ truncate ? filename + strlen(filename) - VERBOSE_FILENAME_LENGTH + 3 : filename);
+ }
+ }
+ else
+ fprintf(stderr,
+ ngettext("%*s/%s kB (%d%%), %d/%d tablespace",
+ "%*s/%s kB (%d%%), %d/%d tablespaces",
+ tablespacecount),
+ (int) strlen(totalsize_str),
+ totaldone_str, totalsize_str, percent,
+ tablespacenum, tablespacecount);
+
+ /*
+ * Stay on the same line if reporting to a terminal and we're not done
+ * yet.
+ */
+ fputc((!finished && isatty(fileno(stderr))) ? '\r' : '\n', stderr);
+}
+
+static int32
+parse_max_rate(char *src)
+{
+ double result;
+ char *after_num;
+ char *suffix = NULL;
+
+ errno = 0;
+ result = strtod(src, &after_num);
+ if (src == after_num)
+ {
+ pg_log_error("transfer rate \"%s\" is not a valid value", src);
+ exit(1);
+ }
+ if (errno != 0)
+ {
+ pg_log_error("invalid transfer rate \"%s\": %m", src);
+ exit(1);
+ }
+
+ if (result <= 0)
+ {
+ /*
+ * Reject obviously wrong values here.
+ */
+ pg_log_error("transfer rate must be greater than zero");
+ exit(1);
+ }
+
+ /*
+ * Evaluate suffix, after skipping over possible whitespace. Lack of
+ * suffix means kilobytes.
+ */
+ while (*after_num != '\0' && isspace((unsigned char) *after_num))
+ after_num++;
+
+ if (*after_num != '\0')
+ {
+ suffix = after_num;
+ if (*after_num == 'k')
+ {
+ /* kilobyte is the expected unit. */
+ after_num++;
+ }
+ else if (*after_num == 'M')
+ {
+ after_num++;
+ result *= 1024.0;
+ }
+ }
+
+ /* The rest can only consist of white space. */
+ while (*after_num != '\0' && isspace((unsigned char) *after_num))
+ after_num++;
+
+ if (*after_num != '\0')
+ {
+ pg_log_error("invalid --max-rate unit: \"%s\"", suffix);
+ exit(1);
+ }
+
+ /* Valid integer? */
+ if ((uint64) result != (uint64) ((uint32) result))
+ {
+ pg_log_error("transfer rate \"%s\" exceeds integer range", src);
+ exit(1);
+ }
+
+ /*
+ * The range is checked on the server side too, but avoid the server
+ * connection if a nonsensical value was passed.
+ */
+ if (result < MAX_RATE_LOWER || result > MAX_RATE_UPPER)
+ {
+ pg_log_error("transfer rate \"%s\" is out of range", src);
+ exit(1);
+ }
+
+ return (int32) result;
+}
+
+/*
+ * Read a stream of COPY data and invoke the provided callback for each
+ * chunk.
+ */
+static void
+ReceiveCopyData(PGconn *conn, WriteDataCallback callback,
+ void *callback_data)
+{
+ PGresult *res;
+
+ /* Get the COPY data stream. */
+ res = PQgetResult(conn);
+ if (PQresultStatus(res) != PGRES_COPY_OUT)
+ {
+ pg_log_error("could not get COPY data stream: %s",
+ PQerrorMessage(conn));
+ exit(1);
+ }
+ PQclear(res);
+
+ /* Loop over chunks until done. */
+ while (1)
+ {
+ int r;
+ char *copybuf;
+
+ r = PQgetCopyData(conn, &copybuf, 0);
+ if (r == -1)
+ {
+ /* End of chunk. */
+ break;
+ }
+ else if (r == -2)
+ {
+ pg_log_error("could not read COPY data: %s",
+ PQerrorMessage(conn));
+ exit(1);
+ }
+
+ (*callback) (r, copybuf, callback_data);
+
+ PQfreemem(copybuf);
+ }
+}
+
+/*
+ * Write a piece of tar data
+ */
+static void
+writeTarData(WriteTarState *state, char *buf, int r)
+{
+#ifdef HAVE_LIBZ
+ if (state->ztarfile != NULL)
+ {
+ errno = 0;
+ if (gzwrite(state->ztarfile, buf, r) != r)
+ {
+ /* if write didn't set errno, assume problem is no disk space */
+ if (errno == 0)
+ errno = ENOSPC;
+ pg_log_error("could not write to compressed file \"%s\": %s",
+ state->filename, get_gz_error(state->ztarfile));
+ exit(1);
+ }
+ }
+ else
+#endif
+ {
+ errno = 0;
+ if (fwrite(buf, r, 1, state->tarfile) != 1)
+ {
+ /* if write didn't set errno, assume problem is no disk space */
+ if (errno == 0)
+ errno = ENOSPC;
+ pg_log_error("could not write to file \"%s\": %m",
+ state->filename);
+ exit(1);
+ }
+ }
+}
+
+/*
+ * Receive a tar format file from the connection to the server, and write
+ * the data from this file directly into a tar file. If compression is
+ * enabled, the data will be compressed while written to the file.
+ *
+ * The file will be named base.tar[.gz] if it's for the main data directory
+ * or <tablespaceoid>.tar[.gz] if it's for another tablespace.
+ *
+ * No attempt to inspect or validate the contents of the file is done.
+ */
+static void
+ReceiveTarFile(PGconn *conn, PGresult *res, int rownum)
+{
+ char zerobuf[TAR_BLOCK_SIZE * 2];
+ WriteTarState state;
+
+ memset(&state, 0, sizeof(state));
+ state.tablespacenum = rownum;
+ state.basetablespace = PQgetisnull(res, rownum, 0);
+ state.in_tarhdr = true;
+
+ /* recovery.conf is integrated into postgresql.conf in 12 and newer */
+ if (PQserverVersion(conn) >= MINIMUM_VERSION_FOR_RECOVERY_GUC)
+ state.is_recovery_guc_supported = true;
+
+ if (state.basetablespace)
+ {
+ /*
+ * Base tablespaces
+ */
+ if (strcmp(basedir, "-") == 0)
+ {
+#ifdef WIN32
+ _setmode(fileno(stdout), _O_BINARY);
+#endif
+
+#ifdef HAVE_LIBZ
+ if (compresslevel != 0)
+ {
+ int fd = dup(fileno(stdout));
+
+ if (fd < 0)
+ {
+ pg_log_error("could not duplicate stdout: %m");
+ exit(1);
+ }
+
+ state.ztarfile = gzdopen(fd, "wb");
+ if (state.ztarfile == NULL)
+ {
+ pg_log_error("could not open output file: %m");
+ exit(1);
+ }
+
+ if (gzsetparams(state.ztarfile, compresslevel,
+ Z_DEFAULT_STRATEGY) != Z_OK)
+ {
+ pg_log_error("could not set compression level %d: %s",
+ compresslevel, get_gz_error(state.ztarfile));
+ exit(1);
+ }
+ }
+ else
+#endif
+ state.tarfile = stdout;
+ strcpy(state.filename, "-");
+ }
+ else
+ {
+#ifdef HAVE_LIBZ
+ if (compresslevel != 0)
+ {
+ snprintf(state.filename, sizeof(state.filename),
+ "%s/base.tar.gz", basedir);
+ state.ztarfile = gzopen(state.filename, "wb");
+ if (gzsetparams(state.ztarfile, compresslevel,
+ Z_DEFAULT_STRATEGY) != Z_OK)
+ {
+ pg_log_error("could not set compression level %d: %s",
+ compresslevel, get_gz_error(state.ztarfile));
+ exit(1);
+ }
+ }
+ else
+#endif
+ {
+ snprintf(state.filename, sizeof(state.filename),
+ "%s/base.tar", basedir);
+ state.tarfile = fopen(state.filename, "wb");
+ }
+ }
+ }
+ else
+ {
+ /*
+ * Specific tablespace
+ */
+#ifdef HAVE_LIBZ
+ if (compresslevel != 0)
+ {
+ snprintf(state.filename, sizeof(state.filename),
+ "%s/%s.tar.gz",
+ basedir, PQgetvalue(res, rownum, 0));
+ state.ztarfile = gzopen(state.filename, "wb");
+ if (gzsetparams(state.ztarfile, compresslevel,
+ Z_DEFAULT_STRATEGY) != Z_OK)
+ {
+ pg_log_error("could not set compression level %d: %s",
+ compresslevel, get_gz_error(state.ztarfile));
+ exit(1);
+ }
+ }
+ else
+#endif
+ {
+ snprintf(state.filename, sizeof(state.filename), "%s/%s.tar",
+ basedir, PQgetvalue(res, rownum, 0));
+ state.tarfile = fopen(state.filename, "wb");
+ }
+ }
+
+#ifdef HAVE_LIBZ
+ if (compresslevel != 0)
+ {
+ if (!state.ztarfile)
+ {
+ /* Compression is in use */
+ pg_log_error("could not create compressed file \"%s\": %s",
+ state.filename, get_gz_error(state.ztarfile));
+ exit(1);
+ }
+ }
+ else
+#endif
+ {
+ /* Either no zlib support, or zlib support but compresslevel = 0 */
+ if (!state.tarfile)
+ {
+ pg_log_error("could not create file \"%s\": %m", state.filename);
+ exit(1);
+ }
+ }
+
+ ReceiveCopyData(conn, ReceiveTarCopyChunk, &state);
+
+ /*
+ * End of copy data. If requested, and this is the base tablespace, write
+ * configuration file into the tarfile. When done, close the file (but not
+ * stdout).
+ *
+ * Also, write two completely empty blocks at the end of the tar file, as
+ * required by some tar programs.
+ */
+
+ MemSet(zerobuf, 0, sizeof(zerobuf));
+
+ if (state.basetablespace && writerecoveryconf)
+ {
+ char header[TAR_BLOCK_SIZE];
+
+ /*
+ * If postgresql.auto.conf has not been found in the streamed data,
+ * add recovery configuration to postgresql.auto.conf if recovery
+ * parameters are GUCs. If the instance connected to is older than
+ * 12, create recovery.conf with this data otherwise.
+ */
+ if (!state.found_postgresql_auto_conf || !state.is_recovery_guc_supported)
+ {
+ int padding;
+
+ tarCreateHeader(header,
+ state.is_recovery_guc_supported ? "postgresql.auto.conf" : "recovery.conf",
+ NULL,
+ recoveryconfcontents->len,
+ pg_file_create_mode, 04000, 02000,
+ time(NULL));
+
+ padding = tarPaddingBytesRequired(recoveryconfcontents->len);
+
+ writeTarData(&state, header, sizeof(header));
+ writeTarData(&state, recoveryconfcontents->data,
+ recoveryconfcontents->len);
+ if (padding)
+ writeTarData(&state, zerobuf, padding);
+ }
+
+ /*
+ * standby.signal is supported only if recovery parameters are GUCs.
+ */
+ if (state.is_recovery_guc_supported)
+ {
+ tarCreateHeader(header, "standby.signal", NULL,
+ 0, /* zero-length file */
+ pg_file_create_mode, 04000, 02000,
+ time(NULL));
+
+ writeTarData(&state, header, sizeof(header));
+
+ /*
+ * we don't need to pad out to a multiple of the tar block size
+ * here, because the file is zero length, which is a multiple of
+ * any block size.
+ */
+ }
+ }
+
+ /*
+ * Normally, we emit the backup manifest as a separate file, but when
+ * we're writing a tarfile to stdout, we don't have that option, so
+ * include it in the one tarfile we've got.
+ */
+ if (strcmp(basedir, "-") == 0 && manifest)
+ {
+ char header[TAR_BLOCK_SIZE];
+ PQExpBufferData buf;
+
+ initPQExpBuffer(&buf);
+ ReceiveBackupManifestInMemory(conn, &buf);
+ if (PQExpBufferDataBroken(buf))
+ {
+ pg_log_error("out of memory");
+ exit(1);
+ }
+ tarCreateHeader(header, "backup_manifest", NULL, buf.len,
+ pg_file_create_mode, 04000, 02000,
+ time(NULL));
+ writeTarData(&state, header, sizeof(header));
+ writeTarData(&state, buf.data, buf.len);
+ termPQExpBuffer(&buf);
+ }
+
+ /* 2 * TAR_BLOCK_SIZE bytes empty data at end of file */
+ writeTarData(&state, zerobuf, sizeof(zerobuf));
+
+#ifdef HAVE_LIBZ
+ if (state.ztarfile != NULL)
+ {
+ errno = 0; /* in case gzclose() doesn't set it */
+ if (gzclose(state.ztarfile) != 0)
+ {
+ pg_log_error("could not close compressed file \"%s\": %m",
+ state.filename);
+ exit(1);
+ }
+ }
+ else
+#endif
+ {
+ if (strcmp(basedir, "-") != 0)
+ {
+ if (fclose(state.tarfile) != 0)
+ {
+ pg_log_error("could not close file \"%s\": %m",
+ state.filename);
+ exit(1);
+ }
+ }
+ }
+
+ progress_report(rownum, state.filename, true, false);
+
+ /*
+ * Do not sync the resulting tar file yet, all files are synced once at
+ * the end.
+ */
+}
+
+/*
+ * Receive one chunk of tar-format data from the server.
+ */
+static void
+ReceiveTarCopyChunk(size_t r, char *copybuf, void *callback_data)
+{
+ WriteTarState *state = callback_data;
+
+ if (!writerecoveryconf || !state->basetablespace)
+ {
+ /*
+ * When not writing config file, or when not working on the base
+ * tablespace, we never have to look for an existing configuration
+ * file in the stream.
+ */
+ writeTarData(state, copybuf, r);
+ }
+ else
+ {
+ /*
+ * Look for a config file in the existing tar stream. If it's there,
+ * we must skip it so we can later overwrite it with our own version
+ * of the file.
+ *
+ * To do this, we have to process the individual files inside the TAR
+ * stream. The stream consists of a header and zero or more chunks,
+ * each with a length equal to TAR_BLOCK_SIZE. The stream from the
+ * server is broken up into smaller pieces, so we have to track the
+ * size of the files to find the next header structure.
+ */
+ int rr = r;
+ int pos = 0;
+
+ while (rr > 0)
+ {
+ if (state->in_tarhdr)
+ {
+ /*
+ * We're currently reading a header structure inside the TAR
+ * stream, i.e. the file metadata.
+ */
+ if (state->tarhdrsz < TAR_BLOCK_SIZE)
+ {
+ /*
+ * Copy the header structure into tarhdr in case the
+ * header is not aligned properly or it's not returned in
+ * whole by the last PQgetCopyData call.
+ */
+ int hdrleft;
+ int bytes2copy;
+
+ hdrleft = TAR_BLOCK_SIZE - state->tarhdrsz;
+ bytes2copy = (rr > hdrleft ? hdrleft : rr);
+
+ memcpy(&state->tarhdr[state->tarhdrsz], copybuf + pos,
+ bytes2copy);
+
+ rr -= bytes2copy;
+ pos += bytes2copy;
+ state->tarhdrsz += bytes2copy;
+ }
+ else
+ {
+ /*
+ * We have the complete header structure in tarhdr, look
+ * at the file metadata: we may want append recovery info
+ * into postgresql.auto.conf and skip standby.signal file
+ * if recovery parameters are integrated as GUCs, and
+ * recovery.conf otherwise. In both cases we must
+ * calculate tar padding.
+ */
+ if (state->is_recovery_guc_supported)
+ {
+ state->skip_file =
+ (strcmp(&state->tarhdr[0], "standby.signal") == 0);
+ state->is_postgresql_auto_conf =
+ (strcmp(&state->tarhdr[0], "postgresql.auto.conf") == 0);
+ }
+ else
+ state->skip_file =
+ (strcmp(&state->tarhdr[0], "recovery.conf") == 0);
+
+ state->filesz = read_tar_number(&state->tarhdr[124], 12);
+ state->file_padding_len =
+ tarPaddingBytesRequired(state->filesz);
+
+ if (state->is_recovery_guc_supported &&
+ state->is_postgresql_auto_conf &&
+ writerecoveryconf)
+ {
+ /* replace tar header */
+ char header[TAR_BLOCK_SIZE];
+
+ tarCreateHeader(header, "postgresql.auto.conf", NULL,
+ state->filesz + recoveryconfcontents->len,
+ pg_file_create_mode, 04000, 02000,
+ time(NULL));
+
+ writeTarData(state, header, sizeof(header));
+ }
+ else
+ {
+ /* copy stream with padding */
+ state->filesz += state->file_padding_len;
+
+ if (!state->skip_file)
+ {
+ /*
+ * If we're not skipping the file, write the tar
+ * header unmodified.
+ */
+ writeTarData(state, state->tarhdr, TAR_BLOCK_SIZE);
+ }
+ }
+
+ /* Next part is the file, not the header */
+ state->in_tarhdr = false;
+ }
+ }
+ else
+ {
+ /*
+ * We're processing a file's contents.
+ */
+ if (state->filesz > 0)
+ {
+ /*
+ * We still have data to read (and possibly write).
+ */
+ int bytes2write;
+
+ bytes2write = (state->filesz > rr ? rr : state->filesz);
+
+ if (!state->skip_file)
+ writeTarData(state, copybuf + pos, bytes2write);
+
+ rr -= bytes2write;
+ pos += bytes2write;
+ state->filesz -= bytes2write;
+ }
+ else if (state->is_recovery_guc_supported &&
+ state->is_postgresql_auto_conf &&
+ writerecoveryconf)
+ {
+ /* append recovery config to postgresql.auto.conf */
+ int padding;
+ int tailsize;
+
+ tailsize = (TAR_BLOCK_SIZE - state->file_padding_len) + recoveryconfcontents->len;
+ padding = tarPaddingBytesRequired(tailsize);
+
+ writeTarData(state, recoveryconfcontents->data,
+ recoveryconfcontents->len);
+
+ if (padding)
+ {
+ char zerobuf[TAR_BLOCK_SIZE];
+
+ MemSet(zerobuf, 0, sizeof(zerobuf));
+ writeTarData(state, zerobuf, padding);
+ }
+
+ /* skip original file padding */
+ state->is_postgresql_auto_conf = false;
+ state->skip_file = true;
+ state->filesz += state->file_padding_len;
+
+ state->found_postgresql_auto_conf = true;
+ }
+ else
+ {
+ /*
+ * No more data in the current file, the next piece of
+ * data (if any) will be a new file header structure.
+ */
+ state->in_tarhdr = true;
+ state->skip_file = false;
+ state->is_postgresql_auto_conf = false;
+ state->tarhdrsz = 0;
+ state->filesz = 0;
+ }
+ }
+ }
+ }
+ totaldone += r;
+ progress_report(state->tablespacenum, state->filename, false, false);
+}
+
+
+/*
+ * Retrieve tablespace path, either relocated or original depending on whether
+ * -T was passed or not.
+ */
+static const char *
+get_tablespace_mapping(const char *dir)
+{
+ TablespaceListCell *cell;
+ char canon_dir[MAXPGPATH];
+
+ /* Canonicalize path for comparison consistency */
+ strlcpy(canon_dir, dir, sizeof(canon_dir));
+ canonicalize_path(canon_dir);
+
+ for (cell = tablespace_dirs.head; cell; cell = cell->next)
+ if (strcmp(canon_dir, cell->old_dir) == 0)
+ return cell->new_dir;
+
+ return dir;
+}
+
+
+/*
+ * Receive a tar format stream from the connection to the server, and unpack
+ * the contents of it into a directory. Only files, directories and
+ * symlinks are supported, no other kinds of special files.
+ *
+ * If the data is for the main data directory, it will be restored in the
+ * specified directory. If it's for another tablespace, it will be restored
+ * in the original or mapped directory.
+ */
+static void
+ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum)
+{
+ UnpackTarState state;
+ bool basetablespace;
+
+ memset(&state, 0, sizeof(state));
+ state.tablespacenum = rownum;
+
+ basetablespace = PQgetisnull(res, rownum, 0);
+ if (basetablespace)
+ strlcpy(state.current_path, basedir, sizeof(state.current_path));
+ else
+ strlcpy(state.current_path,
+ get_tablespace_mapping(PQgetvalue(res, rownum, 1)),
+ sizeof(state.current_path));
+
+ ReceiveCopyData(conn, ReceiveTarAndUnpackCopyChunk, &state);
+
+
+ if (state.file)
+ fclose(state.file);
+
+ progress_report(rownum, state.filename, true, false);
+
+ if (state.file != NULL)
+ {
+ pg_log_error("COPY stream ended before last file was finished");
+ exit(1);
+ }
+
+ if (basetablespace && writerecoveryconf)
+ WriteRecoveryConfig(conn, basedir, recoveryconfcontents);
+
+ /*
+ * No data is synced here, everything is done for all tablespaces at the
+ * end.
+ */
+}
+
+static void
+ReceiveTarAndUnpackCopyChunk(size_t r, char *copybuf, void *callback_data)
+{
+ UnpackTarState *state = callback_data;
+
+ if (state->file == NULL)
+ {
+#ifndef WIN32
+ int filemode;
+#endif
+
+ /*
+ * No current file, so this must be the header for a new file
+ */
+ if (r != TAR_BLOCK_SIZE)
+ {
+ pg_log_error("invalid tar block header size: %zu", r);
+ exit(1);
+ }
+ totaldone += TAR_BLOCK_SIZE;
+
+ state->current_len_left = read_tar_number(&copybuf[124], 12);
+
+#ifndef WIN32
+ /* Set permissions on the file */
+ filemode = read_tar_number(&copybuf[100], 8);
+#endif
+
+ /*
+ * All files are padded up to a multiple of TAR_BLOCK_SIZE
+ */
+ state->current_padding =
+ tarPaddingBytesRequired(state->current_len_left);
+
+ /*
+ * First part of header is zero terminated filename
+ */
+ snprintf(state->filename, sizeof(state->filename),
+ "%s/%s", state->current_path, copybuf);
+ if (state->filename[strlen(state->filename) - 1] == '/')
+ {
+ /*
+ * Ends in a slash means directory or symlink to directory
+ */
+ if (copybuf[156] == '5')
+ {
+ /*
+ * Directory. Remove trailing slash first.
+ */
+ state->filename[strlen(state->filename) - 1] = '\0';
+ if (mkdir(state->filename, pg_dir_create_mode) != 0)
+ {
+ /*
+ * When streaming WAL, pg_wal (or pg_xlog for pre-9.6
+ * clusters) will have been created by the wal receiver
+ * process. Also, when the WAL directory location was
+ * specified, pg_wal (or pg_xlog) has already been created
+ * as a symbolic link before starting the actual backup.
+ * So just ignore creation failures on related
+ * directories.
+ */
+ if (!((pg_str_endswith(state->filename, "/pg_wal") ||
+ pg_str_endswith(state->filename, "/pg_xlog") ||
+ pg_str_endswith(state->filename, "/archive_status")) &&
+ errno == EEXIST))
+ {
+ pg_log_error("could not create directory \"%s\": %m",
+ state->filename);
+ exit(1);
+ }
+ }
+#ifndef WIN32
+ if (chmod(state->filename, (mode_t) filemode))
+ pg_log_error("could not set permissions on directory \"%s\": %m",
+ state->filename);
+#endif
+ }
+ else if (copybuf[156] == '2')
+ {
+ /*
+ * Symbolic link
+ *
+ * It's most likely a link in pg_tblspc directory, to the
+ * location of a tablespace. Apply any tablespace mapping
+ * given on the command line (--tablespace-mapping). (We
+ * blindly apply the mapping without checking that the link
+ * really is inside pg_tblspc. We don't expect there to be
+ * other symlinks in a data directory, but if there are, you
+ * can call it an undocumented feature that you can map them
+ * too.)
+ */
+ state->filename[strlen(state->filename) - 1] = '\0'; /* Remove trailing slash */
+
+ state->mapped_tblspc_path =
+ get_tablespace_mapping(&copybuf[157]);
+ if (symlink(state->mapped_tblspc_path, state->filename) != 0)
+ {
+ pg_log_error("could not create symbolic link from \"%s\" to \"%s\": %m",
+ state->filename, state->mapped_tblspc_path);
+ exit(1);
+ }
+ }
+ else
+ {
+ pg_log_error("unrecognized link indicator \"%c\"",
+ copybuf[156]);
+ exit(1);
+ }
+ return; /* directory or link handled */
+ }
+
+ /*
+ * regular file
+ */
+ state->file = fopen(state->filename, "wb");
+ if (!state->file)
+ {
+ pg_log_error("could not create file \"%s\": %m", state->filename);
+ exit(1);
+ }
+
+#ifndef WIN32
+ if (chmod(state->filename, (mode_t) filemode))
+ pg_log_error("could not set permissions on file \"%s\": %m",
+ state->filename);
+#endif
+
+ if (state->current_len_left == 0)
+ {
+ /*
+ * Done with this file, next one will be a new tar header
+ */
+ fclose(state->file);
+ state->file = NULL;
+ return;
+ }
+ } /* new file */
+ else
+ {
+ /*
+ * Continuing blocks in existing file
+ */
+ if (state->current_len_left == 0 && r == state->current_padding)
+ {
+ /*
+ * Received the padding block for this file, ignore it and close
+ * the file, then move on to the next tar header.
+ */
+ fclose(state->file);
+ state->file = NULL;
+ totaldone += r;
+ return;
+ }
+
+ errno = 0;
+ if (fwrite(copybuf, r, 1, state->file) != 1)
+ {
+ /* if write didn't set errno, assume problem is no disk space */
+ if (errno == 0)
+ errno = ENOSPC;
+ pg_log_error("could not write to file \"%s\": %m", state->filename);
+ exit(1);
+ }
+ totaldone += r;
+ progress_report(state->tablespacenum, state->filename, false, false);
+
+ state->current_len_left -= r;
+ if (state->current_len_left == 0 && state->current_padding == 0)
+ {
+ /*
+ * Received the last block, and there is no padding to be
+ * expected. Close the file and move on to the next tar header.
+ */
+ fclose(state->file);
+ state->file = NULL;
+ return;
+ }
+ } /* continuing data in existing file */
+}
+
+/*
+ * Receive the backup manifest file and write it out to a file.
+ */
+static void
+ReceiveBackupManifest(PGconn *conn)
+{
+ WriteManifestState state;
+
+ snprintf(state.filename, sizeof(state.filename),
+ "%s/backup_manifest.tmp", basedir);
+ state.file = fopen(state.filename, "wb");
+ if (state.file == NULL)
+ {
+ pg_log_error("could not create file \"%s\": %m", state.filename);
+ exit(1);
+ }
+
+ ReceiveCopyData(conn, ReceiveBackupManifestChunk, &state);
+
+ fclose(state.file);
+}
+
+/*
+ * Receive one chunk of the backup manifest file and write it out to a file.
+ */
+static void
+ReceiveBackupManifestChunk(size_t r, char *copybuf, void *callback_data)
+{
+ WriteManifestState *state = callback_data;
+
+ errno = 0;
+ if (fwrite(copybuf, r, 1, state->file) != 1)
+ {
+ /* if write didn't set errno, assume problem is no disk space */
+ if (errno == 0)
+ errno = ENOSPC;
+ pg_log_error("could not write to file \"%s\": %m", state->filename);
+ exit(1);
+ }
+}
+
+/*
+ * Receive the backup manifest file and write it out to a file.
+ */
+static void
+ReceiveBackupManifestInMemory(PGconn *conn, PQExpBuffer buf)
+{
+ ReceiveCopyData(conn, ReceiveBackupManifestInMemoryChunk, buf);
+}
+
+/*
+ * Receive one chunk of the backup manifest file and write it out to a file.
+ */
+static void
+ReceiveBackupManifestInMemoryChunk(size_t r, char *copybuf,
+ void *callback_data)
+{
+ PQExpBuffer buf = callback_data;
+
+ appendPQExpBuffer(buf, copybuf, r);
+}
+
+static void
+BaseBackup(void)
+{
+ PGresult *res;
+ char *sysidentifier;
+ TimeLineID latesttli;
+ TimeLineID starttli;
+ char *basebkp;
+ char escaped_label[MAXPGPATH];
+ char *maxrate_clause = NULL;
+ char *manifest_clause = NULL;
+ char *manifest_checksums_clause = "";
+ int i;
+ char xlogstart[64];
+ char xlogend[64];
+ int minServerMajor,
+ maxServerMajor;
+ int serverVersion,
+ serverMajor;
+ int writing_to_stdout;
+
+ Assert(conn != NULL);
+
+ /*
+ * Check server version. BASE_BACKUP command was introduced in 9.1, so we
+ * can't work with servers older than 9.1.
+ */
+ minServerMajor = 901;
+ maxServerMajor = PG_VERSION_NUM / 100;
+ serverVersion = PQserverVersion(conn);
+ serverMajor = serverVersion / 100;
+ if (serverMajor < minServerMajor || serverMajor > maxServerMajor)
+ {
+ const char *serverver = PQparameterStatus(conn, "server_version");
+
+ pg_log_error("incompatible server version %s",
+ serverver ? serverver : "'unknown'");
+ exit(1);
+ }
+
+ /*
+ * If WAL streaming was requested, also check that the server is new
+ * enough for that.
+ */
+ if (includewal == STREAM_WAL && !CheckServerVersionForStreaming(conn))
+ {
+ /*
+ * Error message already written in CheckServerVersionForStreaming(),
+ * but add a hint about using -X none.
+ */
+ pg_log_info("HINT: use -X none or -X fetch to disable log streaming");
+ exit(1);
+ }
+
+ /*
+ * Build contents of configuration file if requested
+ */
+ if (writerecoveryconf)
+ recoveryconfcontents = GenerateRecoveryConfig(conn, replication_slot);
+
+ /*
+ * Run IDENTIFY_SYSTEM so we can get the timeline
+ */
+ if (!RunIdentifySystem(conn, &sysidentifier, &latesttli, NULL, NULL))
+ exit(1);
+
+ /*
+ * Start the actual backup
+ */
+ PQescapeStringConn(conn, escaped_label, label, sizeof(escaped_label), &i);
+
+ if (maxrate > 0)
+ maxrate_clause = psprintf("MAX_RATE %u", maxrate);
+
+ if (manifest)
+ {
+ if (manifest_force_encode)
+ manifest_clause = "MANIFEST 'force-encode'";
+ else
+ manifest_clause = "MANIFEST 'yes'";
+ if (manifest_checksums != NULL)
+ manifest_checksums_clause = psprintf("MANIFEST_CHECKSUMS '%s'",
+ manifest_checksums);
+ }
+
+ if (verbose)
+ pg_log_info("initiating base backup, waiting for checkpoint to complete");
+
+ if (showprogress && !verbose)
+ {
+ fprintf(stderr, "waiting for checkpoint");
+ if (isatty(fileno(stderr)))
+ fprintf(stderr, "\r");
+ else
+ fprintf(stderr, "\n");
+ }
+
+ basebkp =
+ psprintf("BASE_BACKUP LABEL '%s' %s %s %s %s %s %s %s %s %s",
+ escaped_label,
+ estimatesize ? "PROGRESS" : "",
+ includewal == FETCH_WAL ? "WAL" : "",
+ fastcheckpoint ? "FAST" : "",
+ includewal == NO_WAL ? "" : "NOWAIT",
+ maxrate_clause ? maxrate_clause : "",
+ format == 't' ? "TABLESPACE_MAP" : "",
+ verify_checksums ? "" : "NOVERIFY_CHECKSUMS",
+ manifest_clause ? manifest_clause : "",
+ manifest_checksums_clause);
+
+ if (PQsendQuery(conn, basebkp) == 0)
+ {
+ pg_log_error("could not send replication command \"%s\": %s",
+ "BASE_BACKUP", PQerrorMessage(conn));
+ exit(1);
+ }
+
+ /*
+ * Get the starting WAL location
+ */
+ res = PQgetResult(conn);
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ {
+ pg_log_error("could not initiate base backup: %s",
+ PQerrorMessage(conn));
+ exit(1);
+ }
+ if (PQntuples(res) != 1)
+ {
+ pg_log_error("server returned unexpected response to BASE_BACKUP command; got %d rows and %d fields, expected %d rows and %d fields",
+ PQntuples(res), PQnfields(res), 1, 2);
+ exit(1);
+ }
+
+ strlcpy(xlogstart, PQgetvalue(res, 0, 0), sizeof(xlogstart));
+
+ if (verbose)
+ pg_log_info("checkpoint completed");
+
+ /*
+ * 9.3 and later sends the TLI of the starting point. With older servers,
+ * assume it's the same as the latest timeline reported by
+ * IDENTIFY_SYSTEM.
+ */
+ if (PQnfields(res) >= 2)
+ starttli = atoi(PQgetvalue(res, 0, 1));
+ else
+ starttli = latesttli;
+ PQclear(res);
+ MemSet(xlogend, 0, sizeof(xlogend));
+
+ if (verbose && includewal != NO_WAL)
+ pg_log_info("write-ahead log start point: %s on timeline %u",
+ xlogstart, starttli);
+
+ /*
+ * Get the header
+ */
+ res = PQgetResult(conn);
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ {
+ pg_log_error("could not get backup header: %s",
+ PQerrorMessage(conn));
+ exit(1);
+ }
+ if (PQntuples(res) < 1)
+ {
+ pg_log_error("no data returned from server");
+ exit(1);
+ }
+
+ /*
+ * Sum up the total size, for progress reporting
+ */
+ totalsize_kb = totaldone = 0;
+ tablespacecount = PQntuples(res);
+ for (i = 0; i < PQntuples(res); i++)
+ {
+ totalsize_kb += atol(PQgetvalue(res, i, 2));
+
+ /*
+ * Verify tablespace directories are empty. Don't bother with the
+ * first once since it can be relocated, and it will be checked before
+ * we do anything anyway.
+ */
+ if (format == 'p' && !PQgetisnull(res, i, 1))
+ {
+ char *path = unconstify(char *, get_tablespace_mapping(PQgetvalue(res, i, 1)));
+
+ verify_dir_is_empty_or_create(path, &made_tablespace_dirs, &found_tablespace_dirs);
+ }
+ }
+
+ /*
+ * When writing to stdout, require a single tablespace
+ */
+ writing_to_stdout = format == 't' && strcmp(basedir, "-") == 0;
+ if (writing_to_stdout && PQntuples(res) > 1)
+ {
+ pg_log_error("can only write single tablespace to stdout, database has %d",
+ PQntuples(res));
+ exit(1);
+ }
+
+ /*
+ * If we're streaming WAL, start the streaming session before we start
+ * receiving the actual data chunks.
+ */
+ if (includewal == STREAM_WAL)
+ {
+ if (verbose)
+ pg_log_info("starting background WAL receiver");
+ StartLogStreamer(xlogstart, starttli, sysidentifier);
+ }
+
+ /*
+ * Start receiving chunks
+ */
+ for (i = 0; i < PQntuples(res); i++)
+ {
+ if (format == 't')
+ ReceiveTarFile(conn, res, i);
+ else
+ ReceiveAndUnpackTarFile(conn, res, i);
+ } /* Loop over all tablespaces */
+
+ /*
+ * Now receive backup manifest, if appropriate.
+ *
+ * If we're writing a tarfile to stdout, ReceiveTarFile will have already
+ * processed the backup manifest and included it in the output tarfile.
+ * Such a configuration doesn't allow for writing multiple files.
+ *
+ * If we're talking to an older server, it won't send a backup manifest,
+ * so don't try to receive one.
+ */
+ if (!writing_to_stdout && manifest)
+ ReceiveBackupManifest(conn);
+
+ if (showprogress)
+ progress_report(PQntuples(res), NULL, true, true);
+
+ PQclear(res);
+
+ /*
+ * Get the stop position
+ */
+ res = PQgetResult(conn);
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ {
+ pg_log_error("could not get write-ahead log end position from server: %s",
+ PQerrorMessage(conn));
+ exit(1);
+ }
+ if (PQntuples(res) != 1)
+ {
+ pg_log_error("no write-ahead log end position returned from server");
+ exit(1);
+ }
+ strlcpy(xlogend, PQgetvalue(res, 0, 0), sizeof(xlogend));
+ if (verbose && includewal != NO_WAL)
+ pg_log_info("write-ahead log end point: %s", xlogend);
+ PQclear(res);
+
+ res = PQgetResult(conn);
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ const char *sqlstate = PQresultErrorField(res, PG_DIAG_SQLSTATE);
+
+ if (sqlstate &&
+ strcmp(sqlstate, ERRCODE_DATA_CORRUPTED) == 0)
+ {
+ pg_log_error("checksum error occurred");
+ checksum_failure = true;
+ }
+ else
+ {
+ pg_log_error("final receive failed: %s",
+ PQerrorMessage(conn));
+ }
+ exit(1);
+ }
+
+ if (bgchild > 0)
+ {
+#ifndef WIN32
+ int status;
+ pid_t r;
+#else
+ DWORD status;
+
+ /*
+ * get a pointer sized version of bgchild to avoid warnings about
+ * casting to a different size on WIN64.
+ */
+ intptr_t bgchild_handle = bgchild;
+ uint32 hi,
+ lo;
+#endif
+
+ if (verbose)
+ pg_log_info("waiting for background process to finish streaming ...");
+
+#ifndef WIN32
+ if (write(bgpipe[1], xlogend, strlen(xlogend)) != strlen(xlogend))
+ {
+ pg_log_info("could not send command to background pipe: %m");
+ exit(1);
+ }
+
+ /* Just wait for the background process to exit */
+ r = waitpid(bgchild, &status, 0);
+ if (r == (pid_t) -1)
+ {
+ pg_log_error("could not wait for child process: %m");
+ exit(1);
+ }
+ if (r != bgchild)
+ {
+ pg_log_error("child %d died, expected %d", (int) r, (int) bgchild);
+ exit(1);
+ }
+ if (status != 0)
+ {
+ pg_log_error("%s", wait_result_to_str(status));
+ exit(1);
+ }
+ /* Exited normally, we're happy! */
+#else /* WIN32 */
+
+ /*
+ * On Windows, since we are in the same process, we can just store the
+ * value directly in the variable, and then set the flag that says
+ * it's there.
+ */
+ if (sscanf(xlogend, "%X/%X", &hi, &lo) != 2)
+ {
+ pg_log_error("could not parse write-ahead log location \"%s\"",
+ xlogend);
+ exit(1);
+ }
+ xlogendptr = ((uint64) hi) << 32 | lo;
+ InterlockedIncrement(&has_xlogendptr);
+
+ /* First wait for the thread to exit */
+ if (WaitForSingleObjectEx((HANDLE) bgchild_handle, INFINITE, FALSE) !=
+ WAIT_OBJECT_0)
+ {
+ _dosmaperr(GetLastError());
+ pg_log_error("could not wait for child thread: %m");
+ exit(1);
+ }
+ if (GetExitCodeThread((HANDLE) bgchild_handle, &status) == 0)
+ {
+ _dosmaperr(GetLastError());
+ pg_log_error("could not get child thread exit status: %m");
+ exit(1);
+ }
+ if (status != 0)
+ {
+ pg_log_error("child thread exited with error %u",
+ (unsigned int) status);
+ exit(1);
+ }
+ /* Exited normally, we're happy */
+#endif
+ }
+
+ /* Free the configuration file contents */
+ destroyPQExpBuffer(recoveryconfcontents);
+
+ /*
+ * End of copy data. Final result is already checked inside the loop.
+ */
+ PQclear(res);
+ PQfinish(conn);
+ conn = NULL;
+
+ /*
+ * Make data persistent on disk once backup is completed. For tar format
+ * sync the parent directory and all its contents as each tar file was not
+ * synced after being completed. In plain format, all the data of the
+ * base directory is synced, taking into account all the tablespaces.
+ * Errors are not considered fatal.
+ */
+ if (do_sync)
+ {
+ if (verbose)
+ pg_log_info("syncing data to disk ...");
+ if (format == 't')
+ {
+ if (strcmp(basedir, "-") != 0)
+ (void) fsync_dir_recurse(basedir);
+ }
+ else
+ {
+ (void) fsync_pgdata(basedir, serverVersion);
+ }
+ }
+
+ /*
+ * After synchronizing data to disk, perform a durable rename of
+ * backup_manifest.tmp to backup_manifest, if we wrote such a file. This
+ * way, a failure or system crash before we reach this point will leave us
+ * without a backup_manifest file, decreasing the chances that a directory
+ * we leave behind will be mistaken for a valid backup.
+ */
+ if (!writing_to_stdout && manifest)
+ {
+ char tmp_filename[MAXPGPATH];
+ char filename[MAXPGPATH];
+
+ if (verbose)
+ pg_log_info("renaming backup_manifest.tmp to backup_manifest");
+
+ snprintf(tmp_filename, MAXPGPATH, "%s/backup_manifest.tmp", basedir);
+ snprintf(filename, MAXPGPATH, "%s/backup_manifest", basedir);
+
+ /* durable_rename emits its own log message in case of failure */
+ if (durable_rename(tmp_filename, filename) != 0)
+ exit(1);
+ }
+
+ if (verbose)
+ pg_log_info("base backup completed");
+}
+
+
+int
+main(int argc, char **argv)
+{
+ static struct option long_options[] = {
+ {"help", no_argument, NULL, '?'},
+ {"version", no_argument, NULL, 'V'},
+ {"pgdata", required_argument, NULL, 'D'},
+ {"format", required_argument, NULL, 'F'},
+ {"checkpoint", required_argument, NULL, 'c'},
+ {"create-slot", no_argument, NULL, 'C'},
+ {"max-rate", required_argument, NULL, 'r'},
+ {"write-recovery-conf", no_argument, NULL, 'R'},
+ {"slot", required_argument, NULL, 'S'},
+ {"tablespace-mapping", required_argument, NULL, 'T'},
+ {"wal-method", required_argument, NULL, 'X'},
+ {"gzip", no_argument, NULL, 'z'},
+ {"compress", required_argument, NULL, 'Z'},
+ {"label", required_argument, NULL, 'l'},
+ {"no-clean", no_argument, NULL, 'n'},
+ {"no-sync", no_argument, NULL, 'N'},
+ {"dbname", required_argument, NULL, 'd'},
+ {"host", required_argument, NULL, 'h'},
+ {"port", required_argument, NULL, 'p'},
+ {"username", required_argument, NULL, 'U'},
+ {"no-password", no_argument, NULL, 'w'},
+ {"password", no_argument, NULL, 'W'},
+ {"status-interval", required_argument, NULL, 's'},
+ {"verbose", no_argument, NULL, 'v'},
+ {"progress", no_argument, NULL, 'P'},
+ {"waldir", required_argument, NULL, 1},
+ {"no-slot", no_argument, NULL, 2},
+ {"no-verify-checksums", no_argument, NULL, 3},
+ {"no-estimate-size", no_argument, NULL, 4},
+ {"no-manifest", no_argument, NULL, 5},
+ {"manifest-force-encode", no_argument, NULL, 6},
+ {"manifest-checksums", required_argument, NULL, 7},
+ {NULL, 0, NULL, 0}
+ };
+ int c;
+
+ int option_index;
+
+ pg_logging_init(argv[0]);
+ progname = get_progname(argv[0]);
+ set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_basebackup"));
+
+ if (argc > 1)
+ {
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
+ {
+ usage();
+ exit(0);
+ }
+ else if (strcmp(argv[1], "-V") == 0
+ || strcmp(argv[1], "--version") == 0)
+ {
+ puts("pg_basebackup (PostgreSQL) " PG_VERSION);
+ exit(0);
+ }
+ }
+
+ atexit(cleanup_directories_atexit);
+
+ while ((c = getopt_long(argc, argv, "CD:F:r:RS:T:X:l:nNzZ:d:c:h:p:U:s:wWkvP",
+ long_options, &option_index)) != -1)
+ {
+ switch (c)
+ {
+ case 'C':
+ create_slot = true;
+ break;
+ case 'D':
+ basedir = pg_strdup(optarg);
+ break;
+ case 'F':
+ if (strcmp(optarg, "p") == 0 || strcmp(optarg, "plain") == 0)
+ format = 'p';
+ else if (strcmp(optarg, "t") == 0 || strcmp(optarg, "tar") == 0)
+ format = 't';
+ else
+ {
+ pg_log_error("invalid output format \"%s\", must be \"plain\" or \"tar\"",
+ optarg);
+ exit(1);
+ }
+ break;
+ case 'r':
+ maxrate = parse_max_rate(optarg);
+ break;
+ case 'R':
+ writerecoveryconf = true;
+ break;
+ case 'S':
+
+ /*
+ * When specifying replication slot name, use a permanent
+ * slot.
+ */
+ replication_slot = pg_strdup(optarg);
+ temp_replication_slot = false;
+ break;
+ case 2:
+ no_slot = true;
+ break;
+ case 'T':
+ tablespace_list_append(optarg);
+ break;
+ case 'X':
+ if (strcmp(optarg, "n") == 0 ||
+ strcmp(optarg, "none") == 0)
+ {
+ includewal = NO_WAL;
+ }
+ else if (strcmp(optarg, "f") == 0 ||
+ strcmp(optarg, "fetch") == 0)
+ {
+ includewal = FETCH_WAL;
+ }
+ else if (strcmp(optarg, "s") == 0 ||
+ strcmp(optarg, "stream") == 0)
+ {
+ includewal = STREAM_WAL;
+ }
+ else
+ {
+ pg_log_error("invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\"",
+ optarg);
+ exit(1);
+ }
+ break;
+ case 1:
+ xlog_dir = pg_strdup(optarg);
+ break;
+ case 'l':
+ label = pg_strdup(optarg);
+ break;
+ case 'n':
+ noclean = true;
+ break;
+ case 'N':
+ do_sync = false;
+ break;
+ case 'z':
+#ifdef HAVE_LIBZ
+ compresslevel = Z_DEFAULT_COMPRESSION;
+#else
+ compresslevel = 1; /* will be rejected below */
+#endif
+ break;
+ case 'Z':
+ compresslevel = atoi(optarg);
+ if (compresslevel < 0 || compresslevel > 9)
+ {
+ pg_log_error("invalid compression level \"%s\"", optarg);
+ exit(1);
+ }
+ break;
+ case 'c':
+ if (pg_strcasecmp(optarg, "fast") == 0)
+ fastcheckpoint = true;
+ else if (pg_strcasecmp(optarg, "spread") == 0)
+ fastcheckpoint = false;
+ else
+ {
+ pg_log_error("invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\"",
+ optarg);
+ exit(1);
+ }
+ break;
+ case 'd':
+ connection_string = pg_strdup(optarg);
+ break;
+ case 'h':
+ dbhost = pg_strdup(optarg);
+ break;
+ case 'p':
+ dbport = pg_strdup(optarg);
+ break;
+ case 'U':
+ dbuser = pg_strdup(optarg);
+ break;
+ case 'w':
+ dbgetpassword = -1;
+ break;
+ case 'W':
+ dbgetpassword = 1;
+ break;
+ case 's':
+ standby_message_timeout = atoi(optarg) * 1000;
+ if (standby_message_timeout < 0)
+ {
+ pg_log_error("invalid status interval \"%s\"", optarg);
+ exit(1);
+ }
+ break;
+ case 'v':
+ verbose++;
+ break;
+ case 'P':
+ showprogress = true;
+ break;
+ case 3:
+ verify_checksums = false;
+ break;
+ case 4:
+ estimatesize = false;
+ break;
+ case 5:
+ manifest = false;
+ break;
+ case 6:
+ manifest_force_encode = true;
+ break;
+ case 7:
+ manifest_checksums = pg_strdup(optarg);
+ break;
+ default:
+
+ /*
+ * getopt_long already emitted a complaint
+ */
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+ }
+
+ /*
+ * Any non-option arguments?
+ */
+ if (optind < argc)
+ {
+ pg_log_error("too many command-line arguments (first is \"%s\")",
+ argv[optind]);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ /*
+ * Required arguments
+ */
+ if (basedir == NULL)
+ {
+ pg_log_error("no target directory specified");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ /*
+ * Mutually exclusive arguments
+ */
+ if (format == 'p' && compresslevel != 0)
+ {
+ pg_log_error("only tar mode backups can be compressed");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (format == 't' && includewal == STREAM_WAL && strcmp(basedir, "-") == 0)
+ {
+ pg_log_error("cannot stream write-ahead logs in tar mode to stdout");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (replication_slot && includewal != STREAM_WAL)
+ {
+ pg_log_error("replication slots can only be used with WAL streaming");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (no_slot)
+ {
+ if (replication_slot)
+ {
+ pg_log_error("--no-slot cannot be used with slot name");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+ temp_replication_slot = false;
+ }
+
+ if (create_slot)
+ {
+ if (!replication_slot)
+ {
+ pg_log_error("%s needs a slot to be specified using --slot",
+ "--create-slot");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (no_slot)
+ {
+ pg_log_error("%s and %s are incompatible options",
+ "--create-slot", "--no-slot");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+ }
+
+ if (xlog_dir)
+ {
+ if (format != 'p')
+ {
+ pg_log_error("WAL directory location can only be specified in plain mode");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ /* clean up xlog directory name, check it's absolute */
+ canonicalize_path(xlog_dir);
+ if (!is_absolute_path(xlog_dir))
+ {
+ pg_log_error("WAL directory location must be an absolute path");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+ }
+
+#ifndef HAVE_LIBZ
+ if (compresslevel != 0)
+ {
+ pg_log_error("this build does not support compression");
+ exit(1);
+ }
+#endif
+
+ if (showprogress && !estimatesize)
+ {
+ pg_log_error("%s and %s are incompatible options",
+ "--progress", "--no-estimate-size");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (!manifest && manifest_checksums != NULL)
+ {
+ pg_log_error("%s and %s are incompatible options",
+ "--no-manifest", "--manifest-checksums");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (!manifest && manifest_force_encode)
+ {
+ pg_log_error("%s and %s are incompatible options",
+ "--no-manifest", "--manifest-force-encode");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ /* connection in replication mode to server */
+ conn = GetConnection();
+ if (!conn)
+ {
+ /* Error message already written in GetConnection() */
+ exit(1);
+ }
+ atexit(disconnect_atexit);
+
+ /*
+ * Set umask so that directories/files are created with the same
+ * permissions as directories/files in the source data directory.
+ *
+ * pg_mode_mask is set to owner-only by default and then updated in
+ * GetConnection() where we get the mode from the server-side with
+ * RetrieveDataDirCreatePerm() and then call SetDataDirectoryCreatePerm().
+ */
+ umask(pg_mode_mask);
+
+ /* Backup manifests are supported in 13 and newer versions */
+ if (PQserverVersion(conn) < MINIMUM_VERSION_FOR_MANIFESTS)
+ manifest = false;
+
+ /*
+ * Verify that the target directory exists, or create it. For plaintext
+ * backups, always require the directory. For tar backups, require it
+ * unless we are writing to stdout.
+ */
+ if (format == 'p' || strcmp(basedir, "-") != 0)
+ verify_dir_is_empty_or_create(basedir, &made_new_pgdata, &found_existing_pgdata);
+
+ /* determine remote server's xlog segment size */
+ if (!RetrieveWalSegSize(conn))
+ exit(1);
+
+ /* Create pg_wal symlink, if required */
+ if (xlog_dir)
+ {
+ char *linkloc;
+
+ verify_dir_is_empty_or_create(xlog_dir, &made_new_xlogdir, &found_existing_xlogdir);
+
+ /*
+ * Form name of the place where the symlink must go. pg_xlog has been
+ * renamed to pg_wal in post-10 clusters.
+ */
+ linkloc = psprintf("%s/%s", basedir,
+ PQserverVersion(conn) < MINIMUM_VERSION_FOR_PG_WAL ?
+ "pg_xlog" : "pg_wal");
+
+#ifdef HAVE_SYMLINK
+ if (symlink(xlog_dir, linkloc) != 0)
+ {
+ pg_log_error("could not create symbolic link \"%s\": %m", linkloc);
+ exit(1);
+ }
+#else
+ pg_log_error("symlinks are not supported on this platform");
+ exit(1);
+#endif
+ free(linkloc);
+ }
+
+ BaseBackup();
+
+ success = true;
+ return 0;
+}
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c
new file mode 100644
index 0000000..c135943
--- /dev/null
+++ b/src/bin/pg_basebackup/pg_receivewal.c
@@ -0,0 +1,782 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_receivewal.c - receive streaming WAL data and write it
+ * to a local file.
+ *
+ * Author: Magnus Hagander <magnus@hagander.net>
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_basebackup/pg_receivewal.c
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <dirent.h>
+#include <signal.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "access/xlog_internal.h"
+#include "common/file_perm.h"
+#include "common/logging.h"
+#include "getopt_long.h"
+#include "libpq-fe.h"
+#include "receivelog.h"
+#include "streamutil.h"
+
+/* Time to sleep between reconnection attempts */
+#define RECONNECT_SLEEP_TIME 5
+
+/* Global options */
+static char *basedir = NULL;
+static int verbose = 0;
+static int compresslevel = 0;
+static int noloop = 0;
+static int standby_message_timeout = 10 * 1000; /* 10 sec = default */
+static volatile bool time_to_stop = false;
+static bool do_create_slot = false;
+static bool slot_exists_ok = false;
+static bool do_drop_slot = false;
+static bool do_sync = true;
+static bool synchronous = false;
+static char *replication_slot = NULL;
+static XLogRecPtr endpos = InvalidXLogRecPtr;
+
+
+static void usage(void);
+static DIR *get_destination_dir(char *dest_folder);
+static void close_destination_dir(DIR *dest_dir, char *dest_folder);
+static XLogRecPtr FindStreamingStart(uint32 *tli);
+static void StreamLog(void);
+static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline,
+ bool segment_finished);
+
+static void
+disconnect_atexit(void)
+{
+ if (conn != NULL)
+ PQfinish(conn);
+}
+
+/* Routines to evaluate segment file format */
+#define IsCompressXLogFileName(fname) \
+ (strlen(fname) == XLOG_FNAME_LEN + strlen(".gz") && \
+ strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN && \
+ strcmp((fname) + XLOG_FNAME_LEN, ".gz") == 0)
+#define IsPartialCompressXLogFileName(fname) \
+ (strlen(fname) == XLOG_FNAME_LEN + strlen(".gz.partial") && \
+ strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN && \
+ strcmp((fname) + XLOG_FNAME_LEN, ".gz.partial") == 0)
+
+static void
+usage(void)
+{
+ printf(_("%s receives PostgreSQL streaming write-ahead logs.\n\n"),
+ progname);
+ printf(_("Usage:\n"));
+ printf(_(" %s [OPTION]...\n"), progname);
+ printf(_("\nOptions:\n"));
+ printf(_(" -D, --directory=DIR receive write-ahead log files into this directory\n"));
+ printf(_(" -E, --endpos=LSN exit after receiving the specified LSN\n"));
+ printf(_(" --if-not-exists do not error if slot already exists when creating a slot\n"));
+ printf(_(" -n, --no-loop do not loop on connection lost\n"));
+ printf(_(" --no-sync do not wait for changes to be written safely to disk\n"));
+ printf(_(" -s, --status-interval=SECS\n"
+ " time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
+ printf(_(" -S, --slot=SLOTNAME replication slot to use\n"));
+ printf(_(" --synchronous flush write-ahead log immediately after writing\n"));
+ printf(_(" -v, --verbose output verbose messages\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -Z, --compress=0-9 compress logs with given compression level\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
+ printf(_("\nConnection options:\n"));
+ printf(_(" -d, --dbname=CONNSTR connection string\n"));
+ printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
+ printf(_(" -p, --port=PORT database server port number\n"));
+ printf(_(" -U, --username=NAME connect as specified database user\n"));
+ printf(_(" -w, --no-password never prompt for password\n"));
+ printf(_(" -W, --password force password prompt (should happen automatically)\n"));
+ printf(_("\nOptional actions:\n"));
+ printf(_(" --create-slot create a new replication slot (for the slot's name see --slot)\n"));
+ printf(_(" --drop-slot drop the replication slot (for the slot's name see --slot)\n"));
+ printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
+ printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
+}
+
+static bool
+stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished)
+{
+ static uint32 prevtimeline = 0;
+ static XLogRecPtr prevpos = InvalidXLogRecPtr;
+
+ /* we assume that we get called once at the end of each segment */
+ if (verbose && segment_finished)
+ pg_log_info("finished segment at %X/%X (timeline %u)",
+ LSN_FORMAT_ARGS(xlogpos),
+ timeline);
+
+ if (!XLogRecPtrIsInvalid(endpos) && endpos < xlogpos)
+ {
+ if (verbose)
+ pg_log_info("stopped log streaming at %X/%X (timeline %u)",
+ LSN_FORMAT_ARGS(xlogpos),
+ timeline);
+ time_to_stop = true;
+ return true;
+ }
+
+ /*
+ * Note that we report the previous, not current, position here. After a
+ * timeline switch, xlogpos points to the beginning of the segment because
+ * that's where we always begin streaming. Reporting the end of previous
+ * timeline isn't totally accurate, because the next timeline can begin
+ * slightly before the end of the WAL that we received on the previous
+ * timeline, but it's close enough for reporting purposes.
+ */
+ if (verbose && prevtimeline != 0 && prevtimeline != timeline)
+ pg_log_info("switched to timeline %u at %X/%X",
+ timeline,
+ LSN_FORMAT_ARGS(prevpos));
+
+ prevtimeline = timeline;
+ prevpos = xlogpos;
+
+ if (time_to_stop)
+ {
+ if (verbose)
+ pg_log_info("received interrupt signal, exiting");
+ return true;
+ }
+ return false;
+}
+
+
+/*
+ * Get destination directory.
+ */
+static DIR *
+get_destination_dir(char *dest_folder)
+{
+ DIR *dir;
+
+ Assert(dest_folder != NULL);
+ dir = opendir(dest_folder);
+ if (dir == NULL)
+ {
+ pg_log_error("could not open directory \"%s\": %m", basedir);
+ exit(1);
+ }
+
+ return dir;
+}
+
+
+/*
+ * Close existing directory.
+ */
+static void
+close_destination_dir(DIR *dest_dir, char *dest_folder)
+{
+ Assert(dest_dir != NULL && dest_folder != NULL);
+ if (closedir(dest_dir))
+ {
+ pg_log_error("could not close directory \"%s\": %m", dest_folder);
+ exit(1);
+ }
+}
+
+
+/*
+ * Determine starting location for streaming, based on any existing xlog
+ * segments in the directory. We start at the end of the last one that is
+ * complete (size matches wal segment size), on the timeline with highest ID.
+ *
+ * If there are no WAL files in the directory, returns InvalidXLogRecPtr.
+ */
+static XLogRecPtr
+FindStreamingStart(uint32 *tli)
+{
+ DIR *dir;
+ struct dirent *dirent;
+ XLogSegNo high_segno = 0;
+ uint32 high_tli = 0;
+ bool high_ispartial = false;
+
+ dir = get_destination_dir(basedir);
+
+ while (errno = 0, (dirent = readdir(dir)) != NULL)
+ {
+ uint32 tli;
+ XLogSegNo segno;
+ bool ispartial;
+ bool iscompress;
+
+ /*
+ * Check if the filename looks like an xlog file, or a .partial file.
+ */
+ if (IsXLogFileName(dirent->d_name))
+ {
+ ispartial = false;
+ iscompress = false;
+ }
+ else if (IsPartialXLogFileName(dirent->d_name))
+ {
+ ispartial = true;
+ iscompress = false;
+ }
+ else if (IsCompressXLogFileName(dirent->d_name))
+ {
+ ispartial = false;
+ iscompress = true;
+ }
+ else if (IsPartialCompressXLogFileName(dirent->d_name))
+ {
+ ispartial = true;
+ iscompress = true;
+ }
+ else
+ continue;
+
+ /*
+ * Looks like an xlog file. Parse its position.
+ */
+ XLogFromFileName(dirent->d_name, &tli, &segno, WalSegSz);
+
+ /*
+ * Check that the segment has the right size, if it's supposed to be
+ * completed. For non-compressed segments just check the on-disk size
+ * and see if it matches a completed segment. For compressed segments,
+ * look at the last 4 bytes of the compressed file, which is where the
+ * uncompressed size is located for gz files with a size lower than
+ * 4GB, and then compare it to the size of a completed segment. The 4
+ * last bytes correspond to the ISIZE member according to
+ * http://www.zlib.org/rfc-gzip.html.
+ */
+ if (!ispartial && !iscompress)
+ {
+ struct stat statbuf;
+ char fullpath[MAXPGPATH * 2];
+
+ snprintf(fullpath, sizeof(fullpath), "%s/%s", basedir, dirent->d_name);
+ if (stat(fullpath, &statbuf) != 0)
+ {
+ pg_log_error("could not stat file \"%s\": %m", fullpath);
+ exit(1);
+ }
+
+ if (statbuf.st_size != WalSegSz)
+ {
+ pg_log_warning("segment file \"%s\" has incorrect size %lld, skipping",
+ dirent->d_name, (long long int) statbuf.st_size);
+ continue;
+ }
+ }
+ else if (!ispartial && iscompress)
+ {
+ int fd;
+ char buf[4];
+ int bytes_out;
+ char fullpath[MAXPGPATH * 2];
+ int r;
+
+ snprintf(fullpath, sizeof(fullpath), "%s/%s", basedir, dirent->d_name);
+
+ fd = open(fullpath, O_RDONLY | PG_BINARY, 0);
+ if (fd < 0)
+ {
+ pg_log_error("could not open compressed file \"%s\": %m",
+ fullpath);
+ exit(1);
+ }
+ if (lseek(fd, (off_t) (-4), SEEK_END) < 0)
+ {
+ pg_log_error("could not seek in compressed file \"%s\": %m",
+ fullpath);
+ exit(1);
+ }
+ r = read(fd, (char *) buf, sizeof(buf));
+ if (r != sizeof(buf))
+ {
+ if (r < 0)
+ pg_log_error("could not read compressed file \"%s\": %m",
+ fullpath);
+ else
+ pg_log_error("could not read compressed file \"%s\": read %d of %zu",
+ fullpath, r, sizeof(buf));
+ exit(1);
+ }
+
+ close(fd);
+ bytes_out = (buf[3] << 24) | (buf[2] << 16) |
+ (buf[1] << 8) | buf[0];
+
+ if (bytes_out != WalSegSz)
+ {
+ pg_log_warning("compressed segment file \"%s\" has incorrect uncompressed size %d, skipping",
+ dirent->d_name, bytes_out);
+ continue;
+ }
+ }
+
+ /* Looks like a valid segment. Remember that we saw it. */
+ if ((segno > high_segno) ||
+ (segno == high_segno && tli > high_tli) ||
+ (segno == high_segno && tli == high_tli && high_ispartial && !ispartial))
+ {
+ high_segno = segno;
+ high_tli = tli;
+ high_ispartial = ispartial;
+ }
+ }
+
+ if (errno)
+ {
+ pg_log_error("could not read directory \"%s\": %m", basedir);
+ exit(1);
+ }
+
+ close_destination_dir(dir, basedir);
+
+ if (high_segno > 0)
+ {
+ XLogRecPtr high_ptr;
+
+ /*
+ * Move the starting pointer to the start of the next segment, if the
+ * highest one we saw was completed. Otherwise start streaming from
+ * the beginning of the .partial segment.
+ */
+ if (!high_ispartial)
+ high_segno++;
+
+ XLogSegNoOffsetToRecPtr(high_segno, 0, WalSegSz, high_ptr);
+
+ *tli = high_tli;
+ return high_ptr;
+ }
+ else
+ return InvalidXLogRecPtr;
+}
+
+/*
+ * Start the log streaming
+ */
+static void
+StreamLog(void)
+{
+ XLogRecPtr serverpos;
+ TimeLineID servertli;
+ StreamCtl stream;
+
+ MemSet(&stream, 0, sizeof(stream));
+
+ /*
+ * Connect in replication mode to the server
+ */
+ if (conn == NULL)
+ conn = GetConnection();
+ if (!conn)
+ /* Error message already written in GetConnection() */
+ return;
+
+ if (!CheckServerVersionForStreaming(conn))
+ {
+ /*
+ * Error message already written in CheckServerVersionForStreaming().
+ * There's no hope of recovering from a version mismatch, so don't
+ * retry.
+ */
+ exit(1);
+ }
+
+ /*
+ * Identify server, obtaining start LSN position and current timeline ID
+ * at the same time, necessary if not valid data can be found in the
+ * existing output directory.
+ */
+ if (!RunIdentifySystem(conn, NULL, &servertli, &serverpos, NULL))
+ exit(1);
+
+ /*
+ * Figure out where to start streaming.
+ */
+ stream.startpos = FindStreamingStart(&stream.timeline);
+ if (stream.startpos == InvalidXLogRecPtr)
+ {
+ stream.startpos = serverpos;
+ stream.timeline = servertli;
+ }
+
+ /*
+ * Always start streaming at the beginning of a segment
+ */
+ stream.startpos -= XLogSegmentOffset(stream.startpos, WalSegSz);
+
+ /*
+ * Start the replication
+ */
+ if (verbose)
+ pg_log_info("starting log streaming at %X/%X (timeline %u)",
+ LSN_FORMAT_ARGS(stream.startpos),
+ stream.timeline);
+
+ stream.stream_stop = stop_streaming;
+ stream.stop_socket = PGINVALID_SOCKET;
+ stream.standby_message_timeout = standby_message_timeout;
+ stream.synchronous = synchronous;
+ stream.do_sync = do_sync;
+ stream.mark_done = false;
+ stream.walmethod = CreateWalDirectoryMethod(basedir, compresslevel,
+ stream.do_sync);
+ stream.partial_suffix = ".partial";
+ stream.replication_slot = replication_slot;
+
+ ReceiveXlogStream(conn, &stream);
+
+ if (!stream.walmethod->finish())
+ {
+ pg_log_info("could not finish writing WAL files: %m");
+ return;
+ }
+
+ PQfinish(conn);
+ conn = NULL;
+
+ FreeWalDirectoryMethod();
+ pg_free(stream.walmethod);
+
+ conn = NULL;
+}
+
+/*
+ * When sigint is called, just tell the system to exit at the next possible
+ * moment.
+ */
+#ifndef WIN32
+
+static void
+sigint_handler(int signum)
+{
+ time_to_stop = true;
+}
+#endif
+
+int
+main(int argc, char **argv)
+{
+ static struct option long_options[] = {
+ {"help", no_argument, NULL, '?'},
+ {"version", no_argument, NULL, 'V'},
+ {"directory", required_argument, NULL, 'D'},
+ {"dbname", required_argument, NULL, 'd'},
+ {"endpos", required_argument, NULL, 'E'},
+ {"host", required_argument, NULL, 'h'},
+ {"port", required_argument, NULL, 'p'},
+ {"username", required_argument, NULL, 'U'},
+ {"no-loop", no_argument, NULL, 'n'},
+ {"no-password", no_argument, NULL, 'w'},
+ {"password", no_argument, NULL, 'W'},
+ {"status-interval", required_argument, NULL, 's'},
+ {"slot", required_argument, NULL, 'S'},
+ {"verbose", no_argument, NULL, 'v'},
+ {"compress", required_argument, NULL, 'Z'},
+/* action */
+ {"create-slot", no_argument, NULL, 1},
+ {"drop-slot", no_argument, NULL, 2},
+ {"if-not-exists", no_argument, NULL, 3},
+ {"synchronous", no_argument, NULL, 4},
+ {"no-sync", no_argument, NULL, 5},
+ {NULL, 0, NULL, 0}
+ };
+
+ int c;
+ int option_index;
+ char *db_name;
+ uint32 hi,
+ lo;
+
+ pg_logging_init(argv[0]);
+ progname = get_progname(argv[0]);
+ set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_basebackup"));
+
+ if (argc > 1)
+ {
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
+ {
+ usage();
+ exit(0);
+ }
+ else if (strcmp(argv[1], "-V") == 0 ||
+ strcmp(argv[1], "--version") == 0)
+ {
+ puts("pg_receivewal (PostgreSQL) " PG_VERSION);
+ exit(0);
+ }
+ }
+
+ while ((c = getopt_long(argc, argv, "D:d:E:h:p:U:s:S:nwWvZ:",
+ long_options, &option_index)) != -1)
+ {
+ switch (c)
+ {
+ case 'D':
+ basedir = pg_strdup(optarg);
+ break;
+ case 'd':
+ connection_string = pg_strdup(optarg);
+ break;
+ case 'h':
+ dbhost = pg_strdup(optarg);
+ break;
+ case 'p':
+ if (atoi(optarg) <= 0)
+ {
+ pg_log_error("invalid port number \"%s\"", optarg);
+ exit(1);
+ }
+ dbport = pg_strdup(optarg);
+ break;
+ case 'U':
+ dbuser = pg_strdup(optarg);
+ break;
+ case 'w':
+ dbgetpassword = -1;
+ break;
+ case 'W':
+ dbgetpassword = 1;
+ break;
+ case 's':
+ standby_message_timeout = atoi(optarg) * 1000;
+ if (standby_message_timeout < 0)
+ {
+ pg_log_error("invalid status interval \"%s\"", optarg);
+ exit(1);
+ }
+ break;
+ case 'S':
+ replication_slot = pg_strdup(optarg);
+ break;
+ case 'E':
+ if (sscanf(optarg, "%X/%X", &hi, &lo) != 2)
+ {
+ pg_log_error("could not parse end position \"%s\"", optarg);
+ exit(1);
+ }
+ endpos = ((uint64) hi) << 32 | lo;
+ break;
+ case 'n':
+ noloop = 1;
+ break;
+ case 'v':
+ verbose++;
+ break;
+ case 'Z':
+ compresslevel = atoi(optarg);
+ if (compresslevel < 0 || compresslevel > 9)
+ {
+ pg_log_error("invalid compression level \"%s\"", optarg);
+ exit(1);
+ }
+ break;
+/* action */
+ case 1:
+ do_create_slot = true;
+ break;
+ case 2:
+ do_drop_slot = true;
+ break;
+ case 3:
+ slot_exists_ok = true;
+ break;
+ case 4:
+ synchronous = true;
+ break;
+ case 5:
+ do_sync = false;
+ break;
+ default:
+
+ /*
+ * getopt_long already emitted a complaint
+ */
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+ }
+
+ /*
+ * Any non-option arguments?
+ */
+ if (optind < argc)
+ {
+ pg_log_error("too many command-line arguments (first is \"%s\")",
+ argv[optind]);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (do_drop_slot && do_create_slot)
+ {
+ pg_log_error("cannot use --create-slot together with --drop-slot");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (replication_slot == NULL && (do_drop_slot || do_create_slot))
+ {
+ /* translator: second %s is an option name */
+ pg_log_error("%s needs a slot to be specified using --slot",
+ do_drop_slot ? "--drop-slot" : "--create-slot");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (synchronous && !do_sync)
+ {
+ pg_log_error("cannot use --synchronous together with --no-sync");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ /*
+ * Required arguments
+ */
+ if (basedir == NULL && !do_drop_slot && !do_create_slot)
+ {
+ pg_log_error("no target directory specified");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+#ifndef HAVE_LIBZ
+ if (compresslevel != 0)
+ {
+ pg_log_error("this build does not support compression");
+ exit(1);
+ }
+#endif
+
+ /*
+ * Check existence of destination folder.
+ */
+ if (!do_drop_slot && !do_create_slot)
+ {
+ DIR *dir = get_destination_dir(basedir);
+
+ close_destination_dir(dir, basedir);
+ }
+
+ /*
+ * Obtain a connection before doing anything.
+ */
+ conn = GetConnection();
+ if (!conn)
+ /* error message already written in GetConnection() */
+ exit(1);
+ atexit(disconnect_atexit);
+
+ /*
+ * Trap signals. (Don't do this until after the initial password prompt,
+ * if one is needed, in GetConnection.)
+ */
+#ifndef WIN32
+ pqsignal(SIGINT, sigint_handler);
+#endif
+
+ /*
+ * Run IDENTIFY_SYSTEM to make sure we've successfully have established a
+ * replication connection and haven't connected using a database specific
+ * connection.
+ */
+ if (!RunIdentifySystem(conn, NULL, NULL, NULL, &db_name))
+ exit(1);
+
+ /*
+ * Set umask so that directories/files are created with the same
+ * permissions as directories/files in the source data directory.
+ *
+ * pg_mode_mask is set to owner-only by default and then updated in
+ * GetConnection() where we get the mode from the server-side with
+ * RetrieveDataDirCreatePerm() and then call SetDataDirectoryCreatePerm().
+ */
+ umask(pg_mode_mask);
+
+ /* determine remote server's xlog segment size */
+ if (!RetrieveWalSegSize(conn))
+ exit(1);
+
+ /*
+ * Check that there is a database associated with connection, none should
+ * be defined in this context.
+ */
+ if (db_name)
+ {
+ pg_log_error("replication connection using slot \"%s\" is unexpectedly database specific",
+ replication_slot);
+ exit(1);
+ }
+
+ /*
+ * Drop a replication slot.
+ */
+ if (do_drop_slot)
+ {
+ if (verbose)
+ pg_log_info("dropping replication slot \"%s\"", replication_slot);
+
+ if (!DropReplicationSlot(conn, replication_slot))
+ exit(1);
+ exit(0);
+ }
+
+ /* Create a replication slot */
+ if (do_create_slot)
+ {
+ if (verbose)
+ pg_log_info("creating replication slot \"%s\"", replication_slot);
+
+ if (!CreateReplicationSlot(conn, replication_slot, NULL, false, true, false,
+ slot_exists_ok))
+ exit(1);
+ exit(0);
+ }
+
+ /*
+ * Don't close the connection here so that subsequent StreamLog() can
+ * reuse it.
+ */
+
+ while (true)
+ {
+ StreamLog();
+ if (time_to_stop)
+ {
+ /*
+ * We've been Ctrl-C'ed or end of streaming position has been
+ * willingly reached, so exit without an error code.
+ */
+ exit(0);
+ }
+ else if (noloop)
+ {
+ pg_log_error("disconnected");
+ exit(1);
+ }
+ else
+ {
+ /* translator: check source for value for %d */
+ pg_log_info("disconnected; waiting %d seconds to try again",
+ RECONNECT_SLEEP_TIME);
+ pg_usleep(RECONNECT_SLEEP_TIME * 1000000);
+ }
+ }
+}
diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c
new file mode 100644
index 0000000..55139ee
--- /dev/null
+++ b/src/bin/pg_basebackup/pg_recvlogical.c
@@ -0,0 +1,1055 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_recvlogical.c - receive data from a logical decoding slot in a streaming
+ * fashion and write it to a local file.
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_basebackup/pg_recvlogical.c
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <dirent.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#include "access/xlog_internal.h"
+#include "common/fe_memutils.h"
+#include "common/file_perm.h"
+#include "common/logging.h"
+#include "getopt_long.h"
+#include "libpq-fe.h"
+#include "libpq/pqsignal.h"
+#include "pqexpbuffer.h"
+#include "streamutil.h"
+
+/* Time to sleep between reconnection attempts */
+#define RECONNECT_SLEEP_TIME 5
+
+/* Global Options */
+static char *outfile = NULL;
+static int verbose = 0;
+static int noloop = 0;
+static int standby_message_timeout = 10 * 1000; /* 10 sec = default */
+static int fsync_interval = 10 * 1000; /* 10 sec = default */
+static XLogRecPtr startpos = InvalidXLogRecPtr;
+static XLogRecPtr endpos = InvalidXLogRecPtr;
+static bool do_create_slot = false;
+static bool slot_exists_ok = false;
+static bool do_start_slot = false;
+static bool do_drop_slot = false;
+static char *replication_slot = NULL;
+
+/* filled pairwise with option, value. value may be NULL */
+static char **options;
+static size_t noptions = 0;
+static const char *plugin = "test_decoding";
+
+/* Global State */
+static int outfd = -1;
+static volatile sig_atomic_t time_to_abort = false;
+static volatile sig_atomic_t output_reopen = false;
+static bool output_isfile;
+static TimestampTz output_last_fsync = -1;
+static bool output_needs_fsync = false;
+static XLogRecPtr output_written_lsn = InvalidXLogRecPtr;
+static XLogRecPtr output_fsync_lsn = InvalidXLogRecPtr;
+
+static void usage(void);
+static void StreamLogicalLog(void);
+static bool flushAndSendFeedback(PGconn *conn, TimestampTz *now);
+static void prepareToTerminate(PGconn *conn, XLogRecPtr endpos,
+ bool keepalive, XLogRecPtr lsn);
+
+static void
+usage(void)
+{
+ printf(_("%s controls PostgreSQL logical decoding streams.\n\n"),
+ progname);
+ printf(_("Usage:\n"));
+ printf(_(" %s [OPTION]...\n"), progname);
+ printf(_("\nAction to be performed:\n"));
+ printf(_(" --create-slot create a new replication slot (for the slot's name see --slot)\n"));
+ printf(_(" --drop-slot drop the replication slot (for the slot's name see --slot)\n"));
+ printf(_(" --start start streaming in a replication slot (for the slot's name see --slot)\n"));
+ printf(_("\nOptions:\n"));
+ printf(_(" -E, --endpos=LSN exit after receiving the specified LSN\n"));
+ printf(_(" -f, --file=FILE receive log into this file, - for stdout\n"));
+ printf(_(" -F --fsync-interval=SECS\n"
+ " time between fsyncs to the output file (default: %d)\n"), (fsync_interval / 1000));
+ printf(_(" --if-not-exists do not error if slot already exists when creating a slot\n"));
+ printf(_(" -I, --startpos=LSN where in an existing slot should the streaming start\n"));
+ printf(_(" -n, --no-loop do not loop on connection lost\n"));
+ printf(_(" -o, --option=NAME[=VALUE]\n"
+ " pass option NAME with optional value VALUE to the\n"
+ " output plugin\n"));
+ printf(_(" -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"), plugin);
+ printf(_(" -s, --status-interval=SECS\n"
+ " time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
+ printf(_(" -S, --slot=SLOTNAME name of the logical replication slot\n"));
+ printf(_(" -v, --verbose output verbose messages\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
+ printf(_("\nConnection options:\n"));
+ printf(_(" -d, --dbname=DBNAME database to connect to\n"));
+ printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
+ printf(_(" -p, --port=PORT database server port number\n"));
+ printf(_(" -U, --username=NAME connect as specified database user\n"));
+ printf(_(" -w, --no-password never prompt for password\n"));
+ printf(_(" -W, --password force password prompt (should happen automatically)\n"));
+ printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
+ printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
+}
+
+/*
+ * Send a Standby Status Update message to server.
+ */
+static bool
+sendFeedback(PGconn *conn, TimestampTz now, bool force, bool replyRequested)
+{
+ static XLogRecPtr last_written_lsn = InvalidXLogRecPtr;
+ static XLogRecPtr last_fsync_lsn = InvalidXLogRecPtr;
+
+ char replybuf[1 + 8 + 8 + 8 + 8 + 1];
+ int len = 0;
+
+ /*
+ * we normally don't want to send superfluous feedback, but if it's
+ * because of a timeout we need to, otherwise wal_sender_timeout will kill
+ * us.
+ */
+ if (!force &&
+ last_written_lsn == output_written_lsn &&
+ last_fsync_lsn == output_fsync_lsn)
+ return true;
+
+ if (verbose)
+ pg_log_info("confirming write up to %X/%X, flush to %X/%X (slot %s)",
+ LSN_FORMAT_ARGS(output_written_lsn),
+ LSN_FORMAT_ARGS(output_fsync_lsn),
+ replication_slot);
+
+ replybuf[len] = 'r';
+ len += 1;
+ fe_sendint64(output_written_lsn, &replybuf[len]); /* write */
+ len += 8;
+ fe_sendint64(output_fsync_lsn, &replybuf[len]); /* flush */
+ len += 8;
+ fe_sendint64(InvalidXLogRecPtr, &replybuf[len]); /* apply */
+ len += 8;
+ fe_sendint64(now, &replybuf[len]); /* sendTime */
+ len += 8;
+ replybuf[len] = replyRequested ? 1 : 0; /* replyRequested */
+ len += 1;
+
+ startpos = output_written_lsn;
+ last_written_lsn = output_written_lsn;
+ last_fsync_lsn = output_fsync_lsn;
+
+ if (PQputCopyData(conn, replybuf, len) <= 0 || PQflush(conn))
+ {
+ pg_log_error("could not send feedback packet: %s",
+ PQerrorMessage(conn));
+ return false;
+ }
+
+ return true;
+}
+
+static void
+disconnect_atexit(void)
+{
+ if (conn != NULL)
+ PQfinish(conn);
+}
+
+static bool
+OutputFsync(TimestampTz now)
+{
+ output_last_fsync = now;
+
+ output_fsync_lsn = output_written_lsn;
+
+ if (fsync_interval <= 0)
+ return true;
+
+ if (!output_needs_fsync)
+ return true;
+
+ output_needs_fsync = false;
+
+ /* can only fsync if it's a regular file */
+ if (!output_isfile)
+ return true;
+
+ if (fsync(outfd) != 0)
+ {
+ pg_log_fatal("could not fsync file \"%s\": %m", outfile);
+ exit(1);
+ }
+
+ return true;
+}
+
+/*
+ * Start the log streaming
+ */
+static void
+StreamLogicalLog(void)
+{
+ PGresult *res;
+ char *copybuf = NULL;
+ TimestampTz last_status = -1;
+ int i;
+ PQExpBuffer query;
+
+ output_written_lsn = InvalidXLogRecPtr;
+ output_fsync_lsn = InvalidXLogRecPtr;
+
+ /*
+ * Connect in replication mode to the server
+ */
+ if (!conn)
+ conn = GetConnection();
+ if (!conn)
+ /* Error message already written in GetConnection() */
+ return;
+
+ /*
+ * Start the replication
+ */
+ if (verbose)
+ pg_log_info("starting log streaming at %X/%X (slot %s)",
+ LSN_FORMAT_ARGS(startpos),
+ replication_slot);
+
+ /* Initiate the replication stream at specified location */
+ query = createPQExpBuffer();
+ appendPQExpBuffer(query, "START_REPLICATION SLOT \"%s\" LOGICAL %X/%X",
+ replication_slot, LSN_FORMAT_ARGS(startpos));
+
+ /* print options if there are any */
+ if (noptions)
+ appendPQExpBufferStr(query, " (");
+
+ for (i = 0; i < noptions; i++)
+ {
+ /* separator */
+ if (i > 0)
+ appendPQExpBufferStr(query, ", ");
+
+ /* write option name */
+ appendPQExpBuffer(query, "\"%s\"", options[(i * 2)]);
+
+ /* write option value if specified */
+ if (options[(i * 2) + 1] != NULL)
+ appendPQExpBuffer(query, " '%s'", options[(i * 2) + 1]);
+ }
+
+ if (noptions)
+ appendPQExpBufferChar(query, ')');
+
+ res = PQexec(conn, query->data);
+ if (PQresultStatus(res) != PGRES_COPY_BOTH)
+ {
+ pg_log_error("could not send replication command \"%s\": %s",
+ query->data, PQresultErrorMessage(res));
+ PQclear(res);
+ goto error;
+ }
+ PQclear(res);
+ resetPQExpBuffer(query);
+
+ if (verbose)
+ pg_log_info("streaming initiated");
+
+ while (!time_to_abort)
+ {
+ int r;
+ int bytes_left;
+ int bytes_written;
+ TimestampTz now;
+ int hdr_len;
+ XLogRecPtr cur_record_lsn = InvalidXLogRecPtr;
+
+ if (copybuf != NULL)
+ {
+ PQfreemem(copybuf);
+ copybuf = NULL;
+ }
+
+ /*
+ * Potentially send a status message to the primary.
+ */
+ now = feGetCurrentTimestamp();
+
+ if (outfd != -1 &&
+ feTimestampDifferenceExceeds(output_last_fsync, now,
+ fsync_interval))
+ {
+ if (!OutputFsync(now))
+ goto error;
+ }
+
+ if (standby_message_timeout > 0 &&
+ feTimestampDifferenceExceeds(last_status, now,
+ standby_message_timeout))
+ {
+ /* Time to send feedback! */
+ if (!sendFeedback(conn, now, true, false))
+ goto error;
+
+ last_status = now;
+ }
+
+ /* got SIGHUP, close output file */
+ if (outfd != -1 && output_reopen && strcmp(outfile, "-") != 0)
+ {
+ now = feGetCurrentTimestamp();
+ if (!OutputFsync(now))
+ goto error;
+ close(outfd);
+ outfd = -1;
+ }
+ output_reopen = false;
+
+ /* open the output file, if not open yet */
+ if (outfd == -1)
+ {
+ struct stat statbuf;
+
+ if (strcmp(outfile, "-") == 0)
+ outfd = fileno(stdout);
+ else
+ outfd = open(outfile, O_CREAT | O_APPEND | O_WRONLY | PG_BINARY,
+ S_IRUSR | S_IWUSR);
+ if (outfd == -1)
+ {
+ pg_log_error("could not open log file \"%s\": %m", outfile);
+ goto error;
+ }
+
+ if (fstat(outfd, &statbuf) != 0)
+ pg_log_error("could not stat file \"%s\": %m", outfile);
+
+ output_isfile = S_ISREG(statbuf.st_mode) && !isatty(outfd);
+ }
+
+ r = PQgetCopyData(conn, &copybuf, 1);
+ if (r == 0)
+ {
+ /*
+ * In async mode, and no data available. We block on reading but
+ * not more than the specified timeout, so that we can send a
+ * response back to the client.
+ */
+ fd_set input_mask;
+ TimestampTz message_target = 0;
+ TimestampTz fsync_target = 0;
+ struct timeval timeout;
+ struct timeval *timeoutptr = NULL;
+
+ if (PQsocket(conn) < 0)
+ {
+ pg_log_error("invalid socket: %s", PQerrorMessage(conn));
+ goto error;
+ }
+
+ FD_ZERO(&input_mask);
+ FD_SET(PQsocket(conn), &input_mask);
+
+ /* Compute when we need to wakeup to send a keepalive message. */
+ if (standby_message_timeout)
+ message_target = last_status + (standby_message_timeout - 1) *
+ ((int64) 1000);
+
+ /* Compute when we need to wakeup to fsync the output file. */
+ if (fsync_interval > 0 && output_needs_fsync)
+ fsync_target = output_last_fsync + (fsync_interval - 1) *
+ ((int64) 1000);
+
+ /* Now compute when to wakeup. */
+ if (message_target > 0 || fsync_target > 0)
+ {
+ TimestampTz targettime;
+ long secs;
+ int usecs;
+
+ targettime = message_target;
+
+ if (fsync_target > 0 && fsync_target < targettime)
+ targettime = fsync_target;
+
+ feTimestampDifference(now,
+ targettime,
+ &secs,
+ &usecs);
+ if (secs <= 0)
+ timeout.tv_sec = 1; /* Always sleep at least 1 sec */
+ else
+ timeout.tv_sec = secs;
+ timeout.tv_usec = usecs;
+ timeoutptr = &timeout;
+ }
+
+ r = select(PQsocket(conn) + 1, &input_mask, NULL, NULL, timeoutptr);
+ if (r == 0 || (r < 0 && errno == EINTR))
+ {
+ /*
+ * Got a timeout or signal. Continue the loop and either
+ * deliver a status packet to the server or just go back into
+ * blocking.
+ */
+ continue;
+ }
+ else if (r < 0)
+ {
+ pg_log_error("%s() failed: %m", "select");
+ goto error;
+ }
+
+ /* Else there is actually data on the socket */
+ if (PQconsumeInput(conn) == 0)
+ {
+ pg_log_error("could not receive data from WAL stream: %s",
+ PQerrorMessage(conn));
+ goto error;
+ }
+ continue;
+ }
+
+ /* End of copy stream */
+ if (r == -1)
+ break;
+
+ /* Failure while reading the copy stream */
+ if (r == -2)
+ {
+ pg_log_error("could not read COPY data: %s",
+ PQerrorMessage(conn));
+ goto error;
+ }
+
+ /* Check the message type. */
+ if (copybuf[0] == 'k')
+ {
+ int pos;
+ bool replyRequested;
+ XLogRecPtr walEnd;
+ bool endposReached = false;
+
+ /*
+ * Parse the keepalive message, enclosed in the CopyData message.
+ * We just check if the server requested a reply, and ignore the
+ * rest.
+ */
+ pos = 1; /* skip msgtype 'k' */
+ walEnd = fe_recvint64(&copybuf[pos]);
+ output_written_lsn = Max(walEnd, output_written_lsn);
+
+ pos += 8; /* read walEnd */
+
+ pos += 8; /* skip sendTime */
+
+ if (r < pos + 1)
+ {
+ pg_log_error("streaming header too small: %d", r);
+ goto error;
+ }
+ replyRequested = copybuf[pos];
+
+ if (endpos != InvalidXLogRecPtr && walEnd >= endpos)
+ {
+ /*
+ * If there's nothing to read on the socket until a keepalive
+ * we know that the server has nothing to send us; and if
+ * walEnd has passed endpos, we know nothing else can have
+ * committed before endpos. So we can bail out now.
+ */
+ endposReached = true;
+ }
+
+ /* Send a reply, if necessary */
+ if (replyRequested || endposReached)
+ {
+ if (!flushAndSendFeedback(conn, &now))
+ goto error;
+ last_status = now;
+ }
+
+ if (endposReached)
+ {
+ prepareToTerminate(conn, endpos, true, InvalidXLogRecPtr);
+ time_to_abort = true;
+ break;
+ }
+
+ continue;
+ }
+ else if (copybuf[0] != 'w')
+ {
+ pg_log_error("unrecognized streaming header: \"%c\"",
+ copybuf[0]);
+ goto error;
+ }
+
+ /*
+ * Read the header of the XLogData message, enclosed in the CopyData
+ * message. We only need the WAL location field (dataStart), the rest
+ * of the header is ignored.
+ */
+ hdr_len = 1; /* msgtype 'w' */
+ hdr_len += 8; /* dataStart */
+ hdr_len += 8; /* walEnd */
+ hdr_len += 8; /* sendTime */
+ if (r < hdr_len + 1)
+ {
+ pg_log_error("streaming header too small: %d", r);
+ goto error;
+ }
+
+ /* Extract WAL location for this block */
+ cur_record_lsn = fe_recvint64(&copybuf[1]);
+
+ if (endpos != InvalidXLogRecPtr && cur_record_lsn > endpos)
+ {
+ /*
+ * We've read past our endpoint, so prepare to go away being
+ * cautious about what happens to our output data.
+ */
+ if (!flushAndSendFeedback(conn, &now))
+ goto error;
+ prepareToTerminate(conn, endpos, false, cur_record_lsn);
+ time_to_abort = true;
+ break;
+ }
+
+ output_written_lsn = Max(cur_record_lsn, output_written_lsn);
+
+ bytes_left = r - hdr_len;
+ bytes_written = 0;
+
+ /* signal that a fsync is needed */
+ output_needs_fsync = true;
+
+ while (bytes_left)
+ {
+ int ret;
+
+ ret = write(outfd,
+ copybuf + hdr_len + bytes_written,
+ bytes_left);
+
+ if (ret < 0)
+ {
+ pg_log_error("could not write %u bytes to log file \"%s\": %m",
+ bytes_left, outfile);
+ goto error;
+ }
+
+ /* Write was successful, advance our position */
+ bytes_written += ret;
+ bytes_left -= ret;
+ }
+
+ if (write(outfd, "\n", 1) != 1)
+ {
+ pg_log_error("could not write %u bytes to log file \"%s\": %m",
+ 1, outfile);
+ goto error;
+ }
+
+ if (endpos != InvalidXLogRecPtr && cur_record_lsn == endpos)
+ {
+ /* endpos was exactly the record we just processed, we're done */
+ if (!flushAndSendFeedback(conn, &now))
+ goto error;
+ prepareToTerminate(conn, endpos, false, cur_record_lsn);
+ time_to_abort = true;
+ break;
+ }
+ }
+
+ res = PQgetResult(conn);
+ if (PQresultStatus(res) == PGRES_COPY_OUT)
+ {
+ PQclear(res);
+
+ /*
+ * We're doing a client-initiated clean exit and have sent CopyDone to
+ * the server. Drain any messages, so we don't miss a last-minute
+ * ErrorResponse. The walsender stops generating XLogData records once
+ * it sees CopyDone, so expect this to finish quickly. After CopyDone,
+ * it's too late for sendFeedback(), even if this were to take a long
+ * time. Hence, use synchronous-mode PQgetCopyData().
+ */
+ while (1)
+ {
+ int r;
+
+ if (copybuf != NULL)
+ {
+ PQfreemem(copybuf);
+ copybuf = NULL;
+ }
+ r = PQgetCopyData(conn, &copybuf, 0);
+ if (r == -1)
+ break;
+ if (r == -2)
+ {
+ pg_log_error("could not read COPY data: %s",
+ PQerrorMessage(conn));
+ time_to_abort = false; /* unclean exit */
+ goto error;
+ }
+ }
+
+ res = PQgetResult(conn);
+ }
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ pg_log_error("unexpected termination of replication stream: %s",
+ PQresultErrorMessage(res));
+ goto error;
+ }
+ PQclear(res);
+
+ if (outfd != -1 && strcmp(outfile, "-") != 0)
+ {
+ TimestampTz t = feGetCurrentTimestamp();
+
+ /* no need to jump to error on failure here, we're finishing anyway */
+ OutputFsync(t);
+
+ if (close(outfd) != 0)
+ pg_log_error("could not close file \"%s\": %m", outfile);
+ }
+ outfd = -1;
+error:
+ if (copybuf != NULL)
+ {
+ PQfreemem(copybuf);
+ copybuf = NULL;
+ }
+ destroyPQExpBuffer(query);
+ PQfinish(conn);
+ conn = NULL;
+}
+
+/*
+ * Unfortunately we can't do sensible signal handling on windows...
+ */
+#ifndef WIN32
+
+/*
+ * When sigint is called, just tell the system to exit at the next possible
+ * moment.
+ */
+static void
+sigint_handler(int signum)
+{
+ time_to_abort = true;
+}
+
+/*
+ * Trigger the output file to be reopened.
+ */
+static void
+sighup_handler(int signum)
+{
+ output_reopen = true;
+}
+#endif
+
+
+int
+main(int argc, char **argv)
+{
+ static struct option long_options[] = {
+/* general options */
+ {"file", required_argument, NULL, 'f'},
+ {"fsync-interval", required_argument, NULL, 'F'},
+ {"no-loop", no_argument, NULL, 'n'},
+ {"verbose", no_argument, NULL, 'v'},
+ {"version", no_argument, NULL, 'V'},
+ {"help", no_argument, NULL, '?'},
+/* connection options */
+ {"dbname", required_argument, NULL, 'd'},
+ {"host", required_argument, NULL, 'h'},
+ {"port", required_argument, NULL, 'p'},
+ {"username", required_argument, NULL, 'U'},
+ {"no-password", no_argument, NULL, 'w'},
+ {"password", no_argument, NULL, 'W'},
+/* replication options */
+ {"startpos", required_argument, NULL, 'I'},
+ {"endpos", required_argument, NULL, 'E'},
+ {"option", required_argument, NULL, 'o'},
+ {"plugin", required_argument, NULL, 'P'},
+ {"status-interval", required_argument, NULL, 's'},
+ {"slot", required_argument, NULL, 'S'},
+/* action */
+ {"create-slot", no_argument, NULL, 1},
+ {"start", no_argument, NULL, 2},
+ {"drop-slot", no_argument, NULL, 3},
+ {"if-not-exists", no_argument, NULL, 4},
+ {NULL, 0, NULL, 0}
+ };
+ int c;
+ int option_index;
+ uint32 hi,
+ lo;
+ char *db_name;
+
+ pg_logging_init(argv[0]);
+ progname = get_progname(argv[0]);
+ set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_basebackup"));
+
+ if (argc > 1)
+ {
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
+ {
+ usage();
+ exit(0);
+ }
+ else if (strcmp(argv[1], "-V") == 0 ||
+ strcmp(argv[1], "--version") == 0)
+ {
+ puts("pg_recvlogical (PostgreSQL) " PG_VERSION);
+ exit(0);
+ }
+ }
+
+ while ((c = getopt_long(argc, argv, "E:f:F:nvd:h:p:U:wWI:o:P:s:S:",
+ long_options, &option_index)) != -1)
+ {
+ switch (c)
+ {
+/* general options */
+ case 'f':
+ outfile = pg_strdup(optarg);
+ break;
+ case 'F':
+ fsync_interval = atoi(optarg) * 1000;
+ if (fsync_interval < 0)
+ {
+ pg_log_error("invalid fsync interval \"%s\"", optarg);
+ exit(1);
+ }
+ break;
+ case 'n':
+ noloop = 1;
+ break;
+ case 'v':
+ verbose++;
+ break;
+/* connection options */
+ case 'd':
+ dbname = pg_strdup(optarg);
+ break;
+ case 'h':
+ dbhost = pg_strdup(optarg);
+ break;
+ case 'p':
+ if (atoi(optarg) <= 0)
+ {
+ pg_log_error("invalid port number \"%s\"", optarg);
+ exit(1);
+ }
+ dbport = pg_strdup(optarg);
+ break;
+ case 'U':
+ dbuser = pg_strdup(optarg);
+ break;
+ case 'w':
+ dbgetpassword = -1;
+ break;
+ case 'W':
+ dbgetpassword = 1;
+ break;
+/* replication options */
+ case 'I':
+ if (sscanf(optarg, "%X/%X", &hi, &lo) != 2)
+ {
+ pg_log_error("could not parse start position \"%s\"", optarg);
+ exit(1);
+ }
+ startpos = ((uint64) hi) << 32 | lo;
+ break;
+ case 'E':
+ if (sscanf(optarg, "%X/%X", &hi, &lo) != 2)
+ {
+ pg_log_error("could not parse end position \"%s\"", optarg);
+ exit(1);
+ }
+ endpos = ((uint64) hi) << 32 | lo;
+ break;
+ case 'o':
+ {
+ char *data = pg_strdup(optarg);
+ char *val = strchr(data, '=');
+
+ if (val != NULL)
+ {
+ /* remove =; separate data from val */
+ *val = '\0';
+ val++;
+ }
+
+ noptions += 1;
+ options = pg_realloc(options, sizeof(char *) * noptions * 2);
+
+ options[(noptions - 1) * 2] = data;
+ options[(noptions - 1) * 2 + 1] = val;
+ }
+
+ break;
+ case 'P':
+ plugin = pg_strdup(optarg);
+ break;
+ case 's':
+ standby_message_timeout = atoi(optarg) * 1000;
+ if (standby_message_timeout < 0)
+ {
+ pg_log_error("invalid status interval \"%s\"", optarg);
+ exit(1);
+ }
+ break;
+ case 'S':
+ replication_slot = pg_strdup(optarg);
+ break;
+/* action */
+ case 1:
+ do_create_slot = true;
+ break;
+ case 2:
+ do_start_slot = true;
+ break;
+ case 3:
+ do_drop_slot = true;
+ break;
+ case 4:
+ slot_exists_ok = true;
+ break;
+
+ default:
+
+ /*
+ * getopt_long already emitted a complaint
+ */
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+ }
+
+ /*
+ * Any non-option arguments?
+ */
+ if (optind < argc)
+ {
+ pg_log_error("too many command-line arguments (first is \"%s\")",
+ argv[optind]);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ /*
+ * Required arguments
+ */
+ if (replication_slot == NULL)
+ {
+ pg_log_error("no slot specified");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (do_start_slot && outfile == NULL)
+ {
+ pg_log_error("no target file specified");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (!do_drop_slot && dbname == NULL)
+ {
+ pg_log_error("no database specified");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (!do_drop_slot && !do_create_slot && !do_start_slot)
+ {
+ pg_log_error("at least one action needs to be specified");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (do_drop_slot && (do_create_slot || do_start_slot))
+ {
+ pg_log_error("cannot use --create-slot or --start together with --drop-slot");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (startpos != InvalidXLogRecPtr && (do_create_slot || do_drop_slot))
+ {
+ pg_log_error("cannot use --create-slot or --drop-slot together with --startpos");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (endpos != InvalidXLogRecPtr && !do_start_slot)
+ {
+ pg_log_error("--endpos may only be specified with --start");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ /*
+ * Obtain a connection to server. Notably, if we need a password, we want
+ * to collect it from the user immediately.
+ */
+ conn = GetConnection();
+ if (!conn)
+ /* Error message already written in GetConnection() */
+ exit(1);
+ atexit(disconnect_atexit);
+
+ /*
+ * Trap signals. (Don't do this until after the initial password prompt,
+ * if one is needed, in GetConnection.)
+ */
+#ifndef WIN32
+ pqsignal(SIGINT, sigint_handler);
+ pqsignal(SIGHUP, sighup_handler);
+#endif
+
+ /*
+ * Run IDENTIFY_SYSTEM to make sure we connected using a database specific
+ * replication connection.
+ */
+ if (!RunIdentifySystem(conn, NULL, NULL, NULL, &db_name))
+ exit(1);
+
+ if (db_name == NULL)
+ {
+ pg_log_error("could not establish database-specific replication connection");
+ exit(1);
+ }
+
+ /*
+ * Set umask so that directories/files are created with the same
+ * permissions as directories/files in the source data directory.
+ *
+ * pg_mode_mask is set to owner-only by default and then updated in
+ * GetConnection() where we get the mode from the server-side with
+ * RetrieveDataDirCreatePerm() and then call SetDataDirectoryCreatePerm().
+ */
+ umask(pg_mode_mask);
+
+ /* Drop a replication slot. */
+ if (do_drop_slot)
+ {
+ if (verbose)
+ pg_log_info("dropping replication slot \"%s\"", replication_slot);
+
+ if (!DropReplicationSlot(conn, replication_slot))
+ exit(1);
+ }
+
+ /* Create a replication slot. */
+ if (do_create_slot)
+ {
+ if (verbose)
+ pg_log_info("creating replication slot \"%s\"", replication_slot);
+
+ if (!CreateReplicationSlot(conn, replication_slot, plugin, false,
+ false, false, slot_exists_ok))
+ exit(1);
+ startpos = InvalidXLogRecPtr;
+ }
+
+ if (!do_start_slot)
+ exit(0);
+
+ /* Stream loop */
+ while (true)
+ {
+ StreamLogicalLog();
+ if (time_to_abort)
+ {
+ /*
+ * We've been Ctrl-C'ed or reached an exit limit condition. That's
+ * not an error, so exit without an errorcode.
+ */
+ exit(0);
+ }
+ else if (noloop)
+ {
+ pg_log_error("disconnected");
+ exit(1);
+ }
+ else
+ {
+ /* translator: check source for value for %d */
+ pg_log_info("disconnected; waiting %d seconds to try again",
+ RECONNECT_SLEEP_TIME);
+ pg_usleep(RECONNECT_SLEEP_TIME * 1000000);
+ }
+ }
+}
+
+/*
+ * Fsync our output data, and send a feedback message to the server. Returns
+ * true if successful, false otherwise.
+ *
+ * If successful, *now is updated to the current timestamp just before sending
+ * feedback.
+ */
+static bool
+flushAndSendFeedback(PGconn *conn, TimestampTz *now)
+{
+ /* flush data to disk, so that we send a recent flush pointer */
+ if (!OutputFsync(*now))
+ return false;
+ *now = feGetCurrentTimestamp();
+ if (!sendFeedback(conn, *now, true, false))
+ return false;
+
+ return true;
+}
+
+/*
+ * Try to inform the server about our upcoming demise, but don't wait around or
+ * retry on failure.
+ */
+static void
+prepareToTerminate(PGconn *conn, XLogRecPtr endpos, bool keepalive, XLogRecPtr lsn)
+{
+ (void) PQputCopyEnd(conn, NULL);
+ (void) PQflush(conn);
+
+ if (verbose)
+ {
+ if (keepalive)
+ pg_log_info("end position %X/%X reached by keepalive",
+ LSN_FORMAT_ARGS(endpos));
+ else
+ pg_log_info("end position %X/%X reached by WAL record at %X/%X",
+ LSN_FORMAT_ARGS(endpos), LSN_FORMAT_ARGS(lsn));
+ }
+}
diff --git a/src/bin/pg_basebackup/po/cs.po b/src/bin/pg_basebackup/po/cs.po
new file mode 100644
index 0000000..f74b659
--- /dev/null
+++ b/src/bin/pg_basebackup/po/cs.po
@@ -0,0 +1,1647 @@
+# Czech message translation file for pg_basebackup
+# Copyright (C) 2012 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Tomas Vondra <tv@fuzzy.cz>, 2012, 2013.
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_basebackup-cs (PostgreSQL 9.3)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-10-31 16:15+0000\n"
+"PO-Revision-Date: 2020-10-31 21:35+0100\n"
+"Last-Translator: Tomas Vondra <tv@fuzzy.cz>\n"
+"Language-Team: Czech <info@cspug.cx>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+"X-Generator: Poedit 2.4.1\n"
+
+#: ../../../src/common/logging.c:236
+#, c-format
+msgid "fatal: "
+msgstr "fatal: "
+
+#: ../../../src/common/logging.c:243
+#, c-format
+msgid "error: "
+msgstr "chyba: "
+
+#: ../../../src/common/logging.c:250
+#, c-format
+msgid "warning: "
+msgstr "varování: "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98 ../../common/fe_memutils.c:162
+#, c-format
+msgid "out of memory\n"
+msgstr "nedostatek paměti\n"
+
+#: ../../common/fe_memutils.c:92 ../../common/fe_memutils.c:154
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "nelze duplikovat null pointer (interní chyba)\n"
+
+#: ../../common/file_utils.c:79 ../../common/file_utils.c:181
+#: pg_receivewal.c:266 pg_recvlogical.c:340
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "nelze přistoupit k souboru \"%s\": %m"
+
+#: ../../common/file_utils.c:158 pg_receivewal.c:169
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "nelze otevřít adresář \"%s\": %m"
+
+#: ../../common/file_utils.c:192 pg_receivewal.c:337
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "nelze číst z adresáře \"%s\": %m"
+
+#: ../../common/file_utils.c:224 ../../common/file_utils.c:283
+#: ../../common/file_utils.c:357 ../../fe_utils/recovery_gen.c:134
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "nelze otevřít soubor \"%s\": %m"
+
+#: ../../common/file_utils.c:295 ../../common/file_utils.c:365
+#: pg_recvlogical.c:193
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "nelze provést fsync souboru \"%s\": %m"
+
+#: ../../common/file_utils.c:375
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "nelze přejmenovat soubor \"%s\" na \"%s\": %m"
+
+#: ../../fe_utils/recovery_gen.c:35 ../../fe_utils/recovery_gen.c:49
+#: ../../fe_utils/recovery_gen.c:77 ../../fe_utils/recovery_gen.c:100
+#: ../../fe_utils/recovery_gen.c:171 pg_basebackup.c:1248
+#, c-format
+msgid "out of memory"
+msgstr "nedostatek paměti"
+
+#: ../../fe_utils/recovery_gen.c:140 pg_basebackup.c:1021 pg_basebackup.c:1714
+#: pg_basebackup.c:1770
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "nelze zapsat do souboru \"%s\": %m"
+
+#: ../../fe_utils/recovery_gen.c:152 pg_basebackup.c:1166 pg_basebackup.c:1671
+#: pg_basebackup.c:1747
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "nelze vytvořit soubor \"%s\": %m"
+
+#: pg_basebackup.c:224
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "odstraňuji datový adresář \"%s\""
+
+#: pg_basebackup.c:226
+#, c-format
+msgid "failed to remove data directory"
+msgstr "selhalo odstranění datového adresáře"
+
+#: pg_basebackup.c:230
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "odstraňuji obsah datového adresáře \"%s\""
+
+#: pg_basebackup.c:232
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "selhalo odstranění obsahu datového adresáře"
+
+#: pg_basebackup.c:237
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "odstraňuji WAL adresář \"%s\""
+
+#: pg_basebackup.c:239
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "selhalo odstranění WAL adresáře"
+
+#: pg_basebackup.c:243
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "odstraňuji obsah WAL adresáře \"%s\""
+
+#: pg_basebackup.c:245
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "selhalo odstranění obsahu WAL adresáře"
+
+#: pg_basebackup.c:251
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "datový adresář \"%s\" nebyl na žádost uživatele odstraněn"
+
+#: pg_basebackup.c:254
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "WAL adresář \"%s\" nebyl na žádost uživatele odstraněn"
+
+#: pg_basebackup.c:258
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "změny v tablespace adresářích nebudou vráceny zpět"
+
+#: pg_basebackup.c:299
+#, c-format
+msgid "directory name too long"
+msgstr "jméno adresáře je příliš dlouhé"
+
+#: pg_basebackup.c:309
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "více \"=\" znaků v tablespace mapování"
+
+#: pg_basebackup.c:321
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr "chybný formát tablespace mapování \"%s\", musí být \"OLDDIR=NEWDIR\""
+
+#: pg_basebackup.c:333
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr "starý adresář v tablespace mapování není zadán jako absolutní cesta: %s"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr "nový adresář v tablespace mapování není zadán jako absolutní cesta: %s"
+
+#: pg_basebackup.c:379
+#, c-format
+msgid ""
+"%s takes a base backup of a running PostgreSQL server.\n"
+"\n"
+msgstr ""
+"%s vytvoří base backup běžícího PostgreSQL serveru.\n"
+"\n"
+
+#: pg_basebackup.c:381 pg_receivewal.c:79 pg_recvlogical.c:75
+#, c-format
+msgid "Usage:\n"
+msgstr "Použití:\n"
+
+#: pg_basebackup.c:382 pg_receivewal.c:80 pg_recvlogical.c:76
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s [VOLBA]...\n"
+
+#: pg_basebackup.c:383
+#, c-format
+msgid ""
+"\n"
+"Options controlling the output:\n"
+msgstr ""
+"\n"
+"Volby ovlivňující výstup:\n"
+
+#: pg_basebackup.c:384
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, --pgdata=ADRESÁŘ ulož base backup do adresáře\n"
+
+#: pg_basebackup.c:385
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr " -F, --format=p|t výstupní formát (plain (výchozí), tar)\n"
+
+#: pg_basebackup.c:386
+#, c-format
+msgid ""
+" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr ""
+" -r, --max-rate=RATE maximální rychlost pro přenos datového adresáře\n"
+" (v kB/s, nebo použijte příponu \"k\" nebo \"M\")\n"
+
+#: pg_basebackup.c:388
+#, c-format
+msgid ""
+" -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr ""
+" -R, --write-recovery-conf\n"
+" zapíše konfiguraci pro replikaci\n"
+
+#: pg_basebackup.c:390
+#, c-format
+msgid ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" přemístit tablespace z OLDDIR do NEWDIR\n"
+
+#: pg_basebackup.c:392
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr " --waldir=WALDIR umístění adresáře s transakčním logem\n"
+
+#: pg_basebackup.c:393
+#, c-format
+msgid ""
+" -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr ""
+" -X, --wal-method=none|fetch|stream\n"
+" zahrne potřebné WAL soubory zvolenou metodou\n"
+
+#: pg_basebackup.c:395
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr " -z, --gzip komprimuj výstup taru\n"
+
+#: pg_basebackup.c:396
+#, c-format
+msgid " -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr " -Z, --compress=0-9 komprimuj výstup taru zvolenou úrovní komprese\n"
+
+#: pg_basebackup.c:397
+#, c-format
+msgid ""
+"\n"
+"General options:\n"
+msgstr ""
+"\n"
+"Obecné volby:\n"
+
+#: pg_basebackup.c:398
+#, c-format
+msgid ""
+" -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr ""
+" -c, --checkpoint=fast|spread\n"
+" nastav fast nebo spread checkpointing\n"
+
+#: pg_basebackup.c:400
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " -C, --create-slot vytvoř replikační slot\n"
+
+#: pg_basebackup.c:401
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=NÁZEV nastav jmenovku zálohy\n"
+
+#: pg_basebackup.c:402
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --no-clean neuklízet po chybě\n"
+
+#: pg_basebackup.c:403
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync nečekat na bezpečné zapsání změn na disk\n"
+
+#: pg_basebackup.c:404
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress zobrazuj informace o průběhu\n"
+
+#: pg_basebackup.c:405 pg_receivewal.c:89
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=SLOTNAME použít tento replikační slot\n"
+
+#: pg_basebackup.c:406 pg_receivewal.c:91 pg_recvlogical.c:96
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose zobrazuj podrobnější zprávy\n"
+
+#: pg_basebackup.c:407 pg_receivewal.c:92 pg_recvlogical.c:97
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version vypiš informace o verzi, potom skonči\n"
+
+#: pg_basebackup.c:408
+#, c-format
+msgid ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" use algorithm for manifest checksums\n"
+msgstr ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" použij algoritmus pro kontrolní součet manifestu\n"
+
+#: pg_basebackup.c:410
+#, c-format
+#| msgid ""
+#| " --no-verify-checksums\n"
+#| " do not verify checksums\n"
+msgid ""
+" --manifest-force-encode\n"
+" hex encode all file names in manifest\n"
+msgstr ""
+" --manifest-force-encode\n"
+" všechna jména souborů v manifestu kóduj pomocí hex\n"
+
+#: pg_basebackup.c:412
+#, c-format
+msgid " --no-estimate-size do not estimate backup size in server side\n"
+msgstr " --no-estimate-size neodhaduj velikost backupu na straně serveru\n"
+
+#: pg_basebackup.c:413
+#, c-format
+#| msgid " --no-slot prevent creation of temporary replication slot\n"
+msgid " --no-manifest suppress generation of backup manifest\n"
+msgstr " --no-manifest zamezí vytvoření backup manifestu\n"
+
+#: pg_basebackup.c:414
+#, c-format
+msgid " --no-slot prevent creation of temporary replication slot\n"
+msgstr " --no-slot zamezí vytvoření dočasného replikačního slotu\n"
+
+#: pg_basebackup.c:415
+#, c-format
+msgid ""
+" --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr ""
+" --no-verify-checksums\n"
+" neověřovat kontrolní součty\n"
+
+#: pg_basebackup.c:417 pg_receivewal.c:94 pg_recvlogical.c:98
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help ukaž tuto nápovědu, potom skonči\n"
+
+#: pg_basebackup.c:418 pg_receivewal.c:95 pg_recvlogical.c:99
+#, c-format
+msgid ""
+"\n"
+"Connection options:\n"
+msgstr ""
+"\n"
+"Volby spojení:\n"
+
+#: pg_basebackup.c:419 pg_receivewal.c:96
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=CONNSTR connection string\n"
+
+#: pg_basebackup.c:420 pg_receivewal.c:97 pg_recvlogical.c:101
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr " -h, --host=HOSTNAME host databázového serveru nebo adresář se sockety\n"
+
+#: pg_basebackup.c:421 pg_receivewal.c:98 pg_recvlogical.c:102
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=PORT port databázového serveru\n"
+
+#: pg_basebackup.c:422
+#, c-format
+msgid ""
+" -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in seconds)\n"
+msgstr ""
+" -s, --status-interval=INTERVAL\n"
+" čas mezi zasíláním packetů se stavem na server (ve vteřinách)\n"
+
+#: pg_basebackup.c:424 pg_receivewal.c:99 pg_recvlogical.c:103
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr " -U, --username=JMÉNO připoj se jako uvedený databázový uživatel\n"
+
+#: pg_basebackup.c:425 pg_receivewal.c:100 pg_recvlogical.c:104
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password nikdy se neptej na heslo\n"
+
+#: pg_basebackup.c:426 pg_receivewal.c:101 pg_recvlogical.c:105
+#, c-format
+msgid " -W, --password force password prompt (should happen automatically)\n"
+msgstr " -W, --password vynuť dotaz na heslo (mělo by se dít automaticky)\n"
+
+#: pg_basebackup.c:427 pg_receivewal.c:105 pg_recvlogical.c:106
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Chyby hlašte na <%s>.\n"
+
+#: pg_basebackup.c:428 pg_receivewal.c:106 pg_recvlogical.c:107
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s domácí stránka: <%s>\n"
+
+#: pg_basebackup.c:471
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "nelze číst z ready roury: %m"
+
+#: pg_basebackup.c:477 pg_basebackup.c:608 pg_basebackup.c:2133
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "nelze naparsovat pozici v transakčním logu \"%s\""
+
+#: pg_basebackup.c:573 pg_receivewal.c:441
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "nelze dokončit zápis WAL souborů: %m"
+
+#: pg_basebackup.c:620
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "nelze vytvořit roury pro background procesy: %m"
+
+#: pg_basebackup.c:655
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "vytvořen dočasný replikační slot \"%s\""
+
+#: pg_basebackup.c:658
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "vytvořen replikační slot \"%s\""
+
+#: pg_basebackup.c:678 pg_basebackup.c:731 pg_basebackup.c:1620
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "nelze vytvořit adresář \"%s\": %m"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not create background process: %m"
+msgstr "nelze vytvořit background procesy: %m"
+
+#: pg_basebackup.c:708
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "nelze vytvořit background vlákno: %m"
+
+#: pg_basebackup.c:752
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "adresář \"%s\" existuje, ale není prázdný"
+
+#: pg_basebackup.c:759
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "nelze přístoupit k adresáři \"%s\": %m"
+
+#: pg_basebackup.c:824
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgstr[1] "%*s/%s kB (100%%), %d/%d tablespacy %*s"
+msgstr[2] "%*s/%s kB (100%%), %d/%d tablespacy %*s"
+
+#: pg_basebackup.c:836
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgstr[2] "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+
+#: pg_basebackup.c:852
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d tablespace"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[2] "%*s/%s kB (%d%%), %d/%d tablespaces"
+
+#: pg_basebackup.c:877
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "přenosová rychlost \"%s\" není platná hodnota"
+
+#: pg_basebackup.c:882
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "chybná přenosová rychlost \"%s\": %m"
+
+#: pg_basebackup.c:891
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "přenosová rychlost musí být větší než nula"
+
+#: pg_basebackup.c:923
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "neplatná --max-rate jednotka: \"%s\""
+
+#: pg_basebackup.c:930
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "přenosová rychlost \"%s\" přečkračuje rozsah typu integer"
+
+#: pg_basebackup.c:940
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "přenosová rychlost \"%s\" je mimo rozsah"
+
+#: pg_basebackup.c:961
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "nelze získat COPY data stream: %s"
+
+#: pg_basebackup.c:981 pg_recvlogical.c:435 pg_recvlogical.c:607
+#: receivelog.c:965
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "nelze číst COPY data: %s"
+
+#: pg_basebackup.c:1007
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "nelze zapsat do komprimovaného souboru \"%s\": %s"
+
+#: pg_basebackup.c:1071
+#, c-format
+msgid "could not duplicate stdout: %m"
+msgstr "nelze duplikovat stdout: %m"
+
+#: pg_basebackup.c:1078
+#, c-format
+msgid "could not open output file: %m"
+msgstr "nelze otevřít výstupní soubor: %m"
+
+#: pg_basebackup.c:1085 pg_basebackup.c:1106 pg_basebackup.c:1135
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "nelze nastavit úroveň komprese %d: %s"
+
+#: pg_basebackup.c:1155
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "nelze vytvořit komprimovaný soubor \"%s\": %s"
+
+#: pg_basebackup.c:1267
+#, c-format
+msgid "could not close compressed file \"%s\": %s"
+msgstr "nelze uzavřít komprimovaný soubor \"%s\": %s"
+
+#: pg_basebackup.c:1279 pg_recvlogical.c:632
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "nelze uzavřít soubor \"%s\": %m"
+
+#: pg_basebackup.c:1541
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "COPY stream skončil před dokončením posledního souboru"
+
+#: pg_basebackup.c:1570
+#, c-format
+msgid "invalid tar block header size: %zu"
+msgstr "neplatná velikost hlavičky tar bloku: %zu"
+
+#: pg_basebackup.c:1627
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "nelze nastavit přístupová práva na adresáři \"%s\": %m"
+
+#: pg_basebackup.c:1651
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "nelze vytvořit symbolický odkaz z \"%s\" na \"%s\": %m"
+
+#: pg_basebackup.c:1658
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "nerozpoznaný indikátor odkazu \"%c\""
+
+#: pg_basebackup.c:1677
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "nelze nastavit přístupová práva na souboru \"%s\": %m"
+
+#: pg_basebackup.c:1831
+#, c-format
+msgid "incompatible server version %s"
+msgstr "nekompatibilní verze serveru %s"
+
+#: pg_basebackup.c:1846
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr "HINT: použijte -X none nebo -X fetch pro vypnutí streamování logu"
+
+#: pg_basebackup.c:1882
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr "inicializuji base backup, čekám na dokončení checkpointu"
+
+#: pg_basebackup.c:1908 pg_recvlogical.c:262 receivelog.c:481 receivelog.c:530
+#: receivelog.c:569 streamutil.c:297 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "nelze zaslat replikační příkaz \"%s\": %s"
+
+#: pg_basebackup.c:1919
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "nelze inicializovat base backup: %s"
+
+#: pg_basebackup.c:1925
+#, c-format
+msgid "server returned unexpected response to BASE_BACKUP command; got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "server vrátil neočekávanou odpověď na BASE_BACKUP příkaz; přišlo %d řádeka %d položek, ořekáváno %d řádek a %d položek"
+
+#: pg_basebackup.c:1933
+#, c-format
+msgid "checkpoint completed"
+msgstr "checkpoint dokončen"
+
+#: pg_basebackup.c:1948
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "počáteční pozice we write-ahead logu: %s na timeline %u"
+
+#: pg_basebackup.c:1957
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "nelze získat hlavičku zálohy: %s"
+
+#: pg_basebackup.c:1963
+#, c-format
+msgid "no data returned from server"
+msgstr "ze serveru nebyla vrácena žádná data"
+
+#: pg_basebackup.c:1995
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr "na stdout lze zapsat jen jeden tablespace, databáze má %d"
+
+#: pg_basebackup.c:2007
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "starting background WAL receiver"
+
+#: pg_basebackup.c:2046
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr "ze serveru nelze získat koncovou pozici v transakčním logu: %s"
+
+#: pg_basebackup.c:2052
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "ze serveru nebyla vrácena žádná koncová pozice v transakčním logu"
+
+#: pg_basebackup.c:2057
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "koncová pozice ve write-ahead logu: %s"
+
+#: pg_basebackup.c:2068
+#, c-format
+msgid "checksum error occurred"
+msgstr "došlo k chybě kontrolního součtu"
+
+#: pg_basebackup.c:2073
+#, c-format
+msgid "final receive failed: %s"
+msgstr "závěrečný receive selhal: %s"
+
+#: pg_basebackup.c:2097
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "čekám na background proces pro ukočení streamování ..."
+
+#: pg_basebackup.c:2102
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "nelze zaslat příkaz přes background rouru: %m"
+
+#: pg_basebackup.c:2110
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "nelze počkat na podřízený (child) proces: %m"
+
+#: pg_basebackup.c:2115
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "potomek %d zemřel, očekáváno %d"
+
+#: pg_basebackup.c:2120 streamutil.c:92
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2145
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "nelze počkat na podřízené (child) vlákno: %m"
+
+#: pg_basebackup.c:2151
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "nelze získat návratový kód podřízeného vlákna: %m"
+
+#: pg_basebackup.c:2156
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "podřízené vlákno skončilo s chybou %u"
+
+#: pg_basebackup.c:2184
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "zapisuji data na disk ..."
+
+#: pg_basebackup.c:2209
+#, c-format
+msgid "renaming backup_manifest.tmp to backup_manifest"
+msgstr "přejmenovávám backup_manifest.tmp na backup_manifest"
+
+#: pg_basebackup.c:2220
+#, c-format
+msgid "base backup completed"
+msgstr "base backup dokončen"
+
+#: pg_basebackup.c:2305
+#, c-format
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\""
+msgstr "chybný formát výstupu \"%s\", musí být \"plain\" nebo \"tar\""
+
+#: pg_basebackup.c:2349
+#, c-format
+msgid "invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr "neplatná wal-metoda \"%s\", musí být \"fetch\", \"stream\" nebo \"none\""
+
+#: pg_basebackup.c:2377 pg_receivewal.c:580
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "chybná úroveň komprese \"%s\""
+
+#: pg_basebackup.c:2388
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr "chybný checkpoint argument \"%s\", musí být \"fast\" nebo \"spread\""
+
+#: pg_basebackup.c:2415 pg_receivewal.c:555 pg_recvlogical.c:820
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "neplatný interval zasílání stavu \"%s\""
+
+#: pg_basebackup.c:2445 pg_basebackup.c:2458 pg_basebackup.c:2469
+#: pg_basebackup.c:2480 pg_basebackup.c:2488 pg_basebackup.c:2496
+#: pg_basebackup.c:2506 pg_basebackup.c:2519 pg_basebackup.c:2527
+#: pg_basebackup.c:2538 pg_basebackup.c:2548 pg_basebackup.c:2565
+#: pg_basebackup.c:2573 pg_basebackup.c:2581 pg_receivewal.c:605
+#: pg_receivewal.c:618 pg_receivewal.c:626 pg_receivewal.c:636
+#: pg_receivewal.c:644 pg_receivewal.c:655 pg_recvlogical.c:846
+#: pg_recvlogical.c:859 pg_recvlogical.c:870 pg_recvlogical.c:878
+#: pg_recvlogical.c:886 pg_recvlogical.c:894 pg_recvlogical.c:902
+#: pg_recvlogical.c:910 pg_recvlogical.c:918
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Zkuste \"%s --help\" pro více informací.\n"
+
+#: pg_basebackup.c:2456 pg_receivewal.c:616 pg_recvlogical.c:857
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "příliš mnoho argumentů v příkazové řádce (první je \"%s\")"
+
+#: pg_basebackup.c:2468 pg_receivewal.c:654
+#, c-format
+msgid "no target directory specified"
+msgstr "nebyl zadán cílový adresář"
+
+#: pg_basebackup.c:2479
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "pouze tar zálohy mohou být komprimované"
+
+#: pg_basebackup.c:2487
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "v tar módu s výstupem na stdout nelze streamovat write-ahead logy"
+
+#: pg_basebackup.c:2495
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "replikační sloty lze použít pouze s WAL streamováním"
+
+#: pg_basebackup.c:2505
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "--no-slot nelze použít společně se jménem slotu"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2517 pg_receivewal.c:634
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "%s vyžaduje aby byl zadán slot pomocí --slot"
+
+#: pg_basebackup.c:2526
+#, c-format
+msgid "--create-slot and --no-slot are incompatible options"
+msgstr "--create-slot a --no-slot jsou nekompatibilní volby"
+
+#: pg_basebackup.c:2537
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "umístění WAL adresáře lze zadat pouze v plain módu"
+
+#: pg_basebackup.c:2547
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "cesta k adresáři transakčního logu musí být absolutní"
+
+#: pg_basebackup.c:2557 pg_receivewal.c:663
+#, c-format
+msgid "this build does not support compression"
+msgstr "tento build nepodporuje kompresi"
+
+#: pg_basebackup.c:2564
+#, c-format
+#| msgid "--create-slot and --no-slot are incompatible options"
+msgid "--progress and --no-estimate-size are incompatible options"
+msgstr "--progress a --no-estimate-size jsou nekompatibilní volby"
+
+#: pg_basebackup.c:2572
+#, c-format
+#| msgid "--create-slot and --no-slot are incompatible options"
+msgid "--no-manifest and --manifest-checksums are incompatible options"
+msgstr "--no-manifest a --manifest-checksums jsou nekompatibilní volby"
+
+#: pg_basebackup.c:2580
+#, c-format
+#| msgid "--create-slot and --no-slot are incompatible options"
+msgid "--no-manifest and --manifest-force-encode are incompatible options"
+msgstr "--no-manifest a --manifest-force-encode jsou nekompatibilní volby"
+
+#: pg_basebackup.c:2639
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "nelze vytvořit symbolický odkaz na \"%s\": %m"
+
+#: pg_basebackup.c:2643
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "na této platformě nejsou symbolické linky podporovány"
+
+#: pg_receivewal.c:77
+#, c-format
+msgid ""
+"%s receives PostgreSQL streaming write-ahead logs.\n"
+"\n"
+msgstr ""
+"%s přijímá PostgreSQL streamované transakční logy\n"
+"\n"
+
+#: pg_receivewal.c:81 pg_recvlogical.c:81
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Obecné volby:\n"
+
+#: pg_receivewal.c:82
+#, c-format
+msgid " -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr " -D, --directory=DIR soubory transakčního logu ukládej do tohoto adresáře\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:82
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr " -E, --endpos=LSN skončí po dosažení zadaného LSN\n"
+
+#: pg_receivewal.c:84 pg_recvlogical.c:86
+#, c-format
+msgid " --if-not-exists do not error if slot already exists when creating a slot\n"
+msgstr " --if-not-exists vytváření slotu neskončí chybou pokud slot již existuje\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:88
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop neopakovat pokus o spojení v případě selhání\n"
+
+#: pg_receivewal.c:86
+#, c-format
+msgid " --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " --no-sync nečekat na bezpečné zapsání změn na disk\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:93
+#, c-format
+msgid ""
+" -s, --status-interval=SECS\n"
+" time between status packets sent to server (default: %d)\n"
+msgstr ""
+" -s, --status-interval=SECS\n"
+" čas mezi zasíláním packetů se stavem na server (implicitně: %d)\n"
+
+#: pg_receivewal.c:90
+#, c-format
+msgid " --synchronous flush write-ahead log immediately after writing\n"
+msgstr " --synchronous vynutí flush write-ahead logu okamžitě po zapsání\n"
+
+#: pg_receivewal.c:93
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr " -Z, --compress=0-9 komprimuj logy zvolenou úrovní komprese\n"
+
+#: pg_receivewal.c:102
+#, c-format
+msgid ""
+"\n"
+"Optional actions:\n"
+msgstr ""
+"\n"
+"Nepovinné volby:\n"
+
+#: pg_receivewal.c:103 pg_recvlogical.c:78
+#, c-format
+msgid " --create-slot create a new replication slot (for the slot's name see --slot)\n"
+msgstr " --create-slot vytvoří nový replikační slot (pro jméno slotu viz --slot)\n"
+
+#: pg_receivewal.c:104 pg_recvlogical.c:79
+#, c-format
+msgid " --drop-slot drop the replication slot (for the slot's name see --slot)\n"
+msgstr " --drop-slot odstraní replikační slot (pro jméno slotu viz --slot)\n"
+
+#: pg_receivewal.c:117
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "dokončen segment na %X/%X (timeline %u)"
+
+#: pg_receivewal.c:124
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "končím streamování logu na %X/%X (timeline %u)"
+
+#: pg_receivewal.c:140
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "přepnuto na timeline %u v %X/%X"
+
+#: pg_receivewal.c:150
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "přijat signál k přerušení, ukončuji"
+
+#: pg_receivewal.c:186
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "zavřít adresář \"%s\": %m"
+
+#: pg_receivewal.c:272
+#, c-format
+msgid "segment file \"%s\" has incorrect size %d, skipping"
+msgstr "segment soubor \"%s\" má neplatnou velikost %d, přeskakuji"
+
+#: pg_receivewal.c:290
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "nelze otevřít komprimovaný soubor \"%s\": %m"
+
+#: pg_receivewal.c:296
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "nelze nastavit pozici (seek) v komprimovaném souboru \"%s\": %m"
+
+#: pg_receivewal.c:304
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "nelze číst komprimovaný soubor \"%s\": %m"
+
+#: pg_receivewal.c:307
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "nelze číst komprimovaný soubor \"%s\": přečteno %d z %zu"
+
+#: pg_receivewal.c:318
+#, c-format
+msgid "compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr "komprimovaný segment soubor \"%s\" má po dekompresi neplatnou velikost %d, přeskakuji"
+
+#: pg_receivewal.c:422
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "začínám streamování logu na %X/%X (timeline %u)"
+
+#: pg_receivewal.c:537 pg_recvlogical.c:762
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "neplatné číslo portu: \"%s\""
+
+#: pg_receivewal.c:565 pg_recvlogical.c:788
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "nelze zpracovat koncovou pozici \"%s\""
+
+#: pg_receivewal.c:625
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "nelze použít --create-slot společně s --drop-slot"
+
+#: pg_receivewal.c:643
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "nelze použít --synchronous společně s --no-sync"
+
+#: pg_receivewal.c:719
+#, c-format
+msgid "replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr "replikační spojení používající slot \"%s\" je neočekávaně specifické pro databázi"
+
+#: pg_receivewal.c:730 pg_recvlogical.c:966
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "odstraňuji replikační slot \"%s\""
+
+#: pg_receivewal.c:741 pg_recvlogical.c:976
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "vytvářím replikační slot \"%s\""
+
+#: pg_receivewal.c:767 pg_recvlogical.c:1001
+#, c-format
+msgid "disconnected"
+msgstr "odpojeno"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:773 pg_recvlogical.c:1007
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "odpojeno; čekám %d vteřin pro další pokus"
+
+#: pg_recvlogical.c:73
+#, c-format
+msgid ""
+"%s controls PostgreSQL logical decoding streams.\n"
+"\n"
+msgstr ""
+"%s ovládá streamy PostgreSQL logického dekódování.\n"
+"\n"
+
+#: pg_recvlogical.c:77
+#, c-format
+msgid ""
+"\n"
+"Action to be performed:\n"
+msgstr ""
+"\n"
+"Akce která se má vykonat:\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid " --start start streaming in a replication slot (for the slot's name see --slot)\n"
+msgstr " --start start streaming in a replication slot (for the slot's name see --slot)\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr " -f, --file=FILE log zapisuj do tohoto souboru, - pro stdout\n"
+
+#: pg_recvlogical.c:84
+#, c-format
+msgid ""
+" -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: %d)\n"
+msgstr ""
+" -F --fsync-interval=SECS\n"
+" interval mezi voláním fsync na výstupním souboru (implicitně: %d)\n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid " -I, --startpos=LSN where in an existing slot should the streaming start\n"
+msgstr " -I, --startpos=LSN kde v existujícím slotu má začít streamování\n"
+
+#: pg_recvlogical.c:89
+#, c-format
+msgid ""
+" -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr ""
+" -o, --option=JMÉNO[=HODNOTA]\n"
+" předá volbu JMÉNO s nepovinnou hodnotou HODNOTA\n"
+" výstupnímu pluginu\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr " -P, --plugin=PLUGIN použije výstupní plugin PLUGIN (implicitně: %s)\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=SLOTNAME jméno logického replikačního slotu\n"
+
+#: pg_recvlogical.c:100
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=DBNAME databáze ke které se připojit\n"
+
+#: pg_recvlogical.c:133
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "potvrzuji zápis až do %X/%X, flush do %X/%X (slot %s)"
+
+#: pg_recvlogical.c:157 receivelog.c:343
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "nelze zaslat packet se zpětnou vazbou: %s"
+
+#: pg_recvlogical.c:230
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "začínám streamování logu na %X/%X (slot %s)"
+
+#: pg_recvlogical.c:271
+#, c-format
+msgid "streaming initiated"
+msgstr "streamování inicializováno"
+
+#: pg_recvlogical.c:335
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "nelze otevřít log soubor \"%s\": %m"
+
+#: pg_recvlogical.c:361 receivelog.c:873
+#, c-format
+msgid "invalid socket: %s"
+msgstr "neplatný socket: %s"
+
+#: pg_recvlogical.c:414 receivelog.c:901
+#, c-format
+msgid "select() failed: %m"
+msgstr "volání select() selhalo: %m"
+
+#: pg_recvlogical.c:421 receivelog.c:951
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "nelze získat data z WAL streamu: %s"
+
+#: pg_recvlogical.c:463 pg_recvlogical.c:514 receivelog.c:995 receivelog.c:1061
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "hlavička streamu je příliš malá: %d"
+
+#: pg_recvlogical.c:498 receivelog.c:833
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "nerozpoznaná hlavička streamu: \"%c\""
+
+#: pg_recvlogical.c:552 pg_recvlogical.c:564
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "nelze zapsat %u bytů do log souboru \"%s\": %m"
+
+#: pg_recvlogical.c:618 receivelog.c:629 receivelog.c:666
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "neočekávané ukončení replikačního streamu: %s"
+
+#: pg_recvlogical.c:742
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "neplatný fsync interval \"%s\""
+
+#: pg_recvlogical.c:780
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "nelze zpracovat počáteční pozici \"%s\""
+
+#: pg_recvlogical.c:869
+#, c-format
+msgid "no slot specified"
+msgstr "slot není specifikován"
+
+#: pg_recvlogical.c:877
+#, c-format
+msgid "no target file specified"
+msgstr "nebyl zadán cílový soubor"
+
+#: pg_recvlogical.c:885
+#, c-format
+msgid "no database specified"
+msgstr "není specifikována databáze"
+
+#: pg_recvlogical.c:893
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "alespoň jedna akce musí být zadána"
+
+#: pg_recvlogical.c:901
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr "nelze použít use-slot nebo --start společně s --drop-slot"
+
+#: pg_recvlogical.c:909
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr "nelze použít --create-slot nebo --drop-slot společně s --startpos"
+
+#: pg_recvlogical.c:917
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "--endpos může být použito pouze společně s --start"
+
+#: pg_recvlogical.c:948
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr "nelze otevřít database-specific replikační spojení"
+
+#: pg_recvlogical.c:1047
+#, c-format
+msgid "end position %X/%X reached by keepalive"
+msgstr "koncová pozice %X/%X dosažena keepalive"
+
+#: pg_recvlogical.c:1050
+#, c-format
+msgid "end position %X/%X reached by WAL record at %X/%X"
+msgstr "koncová pozice %X/%X doražena WAL záznamem na %X/%X"
+
+#: receivelog.c:69
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "nelze vytvořit soubor se stavem archivace \"%s\": %s"
+
+#: receivelog.c:116
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "nelze získat velikost write-ahead log souboru \"%s\": %s"
+
+#: receivelog.c:126
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "nelze otevřít existující soubor transakčního logu \"%s\": %s"
+
+#: receivelog.c:134
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr "nelze provést fsync existujícího souboru write-ahead logu \"%s\": %s"
+
+#: receivelog.c:148
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] "soubor transakčního logu \"%s\" má %d bytů, měl by mít 0 nebo %d"
+msgstr[1] "soubor transakčního logu \"%s\" má %d bytů, měl by mít 0 nebo %d"
+msgstr[2] "soubor transakčního logu \"%s\" má %d bytů, měl by mít 0 nebo %d"
+
+#: receivelog.c:163
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "nelze otevřít soubor write-ahead logu \"%s\": %s"
+
+#: receivelog.c:189
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "nelze určit pozici pro seek v souboru \"%s\": %s"
+
+#: receivelog.c:203
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "nepřejmenovávám \"%s%s\", segment není kompletní"
+
+#: receivelog.c:215 receivelog.c:300 receivelog.c:675
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "nelze uzavřít soubor \"%s\": %s"
+
+#: receivelog.c:272
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "server ohlásil neočekávané jméno souboru s historií pro timeline %u: %s"
+
+#: receivelog.c:280
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "nelze vytvořit soubor s timeline historií \"%s\": %s"
+
+#: receivelog.c:287
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "nelze zapsat do souboru s timeline historií \"%s\": %s"
+
+#: receivelog.c:377
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions older than %s"
+msgstr "nekompatibilní verze serveru %s; klient nepodporuje streamování ze serverů s verzí starší než %s"
+
+#: receivelog.c:386
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions newer than %s"
+msgstr "nekompatibilní verze serveru %s; klient nepodporuje streamování ze serverů s verzí novější než %s"
+
+#: receivelog.c:488 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid "could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "nelze identifikovat systém, načteno %d řádek a %d položek, očekáváno %d řádek a %d nebo více položek"
+
+#: receivelog.c:495
+#, c-format
+msgid "system identifier does not match between base backup and streaming connection"
+msgstr "identifikátor systému mezi base backupem a streamovacím spojením neodpovídá"
+
+#: receivelog.c:501
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "počáteční timeline %u není přitomna na serveru"
+
+#: receivelog.c:542
+#, c-format
+msgid "unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "neočekávaná odpověď na TIMELINE_HISTORY příkaz: načteno %d řádek a %d položek, očekáváno %d řádek a %d položek"
+
+#: receivelog.c:613
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "server ohlásil neočekávanou další timeline %u, následující timeline %u"
+
+#: receivelog.c:619
+#, c-format
+msgid "server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"
+msgstr "server přestal streamovat timeline %u at %X/%X, ale začátek další timelineoznámil %u na %X/%X"
+
+#: receivelog.c:659
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "replikační stream byl ukončen před bodem zastavení (stop point)"
+
+#: receivelog.c:705
+#, c-format
+msgid "unexpected result set after end-of-timeline: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "neočekávaný výsledek po konci timeline: získáno %d řádek a %d položek, očekáváno %d řádek a %d položek"
+
+#: receivelog.c:714
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "nelze naparsovat počáteční bod další timeline \"%s\""
+
+#: receivelog.c:763 receivelog.c:1015
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "nelze provést fsync souboru \"%s\": %s"
+
+#: receivelog.c:1078
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "přijat záznam z transakčního logu pro offset %u bez otevřeného souboru"
+
+#: receivelog.c:1088
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "získán WAL data offset %08x, očekáván %08x"
+
+#: receivelog.c:1122
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "nelze zapsat %u bytů do WAL souboru %s: %s"
+
+#: receivelog.c:1147 receivelog.c:1187 receivelog.c:1218
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "nelze zaslat copy-end packet: %s"
+
+#: streamutil.c:160
+msgid "Password: "
+msgstr "Heslo: "
+
+#: streamutil.c:185
+#, c-format
+msgid "could not connect to server"
+msgstr "nelze se připojit k serveru"
+
+#: streamutil.c:202
+#, c-format
+msgid "could not connect to server: %s"
+msgstr "nelze se připojit k serveru: %s"
+
+#: streamutil.c:231
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "nelze vyčistit search_path: %s"
+
+#: streamutil.c:247
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "nelze zjistit nastavení volby integer_datetimes na serveru"
+
+#: streamutil.c:254
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "integer_datetimes přepínač kompilace neodpovídá serveru"
+
+#: streamutil.c:305
+#, c-format
+msgid "could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "nelze identifikovat systém, načteno %d řádek a %d položek, očekáváno %d řádek a %d nebo více položek"
+
+#: streamutil.c:315
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "velikost WAL segmentu nelze naparsovat"
+
+#: streamutil.c:333
+#, c-format
+msgid "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"
+msgid_plural "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"
+msgstr[0] "velikost WAL segmentu musí být mocnina dvou mezi 1 MB a 1 GB, ale vzdálený server vrátil hodnotu %d bytů"
+msgstr[1] "velikost WAL segmentu musí být mocnina dvou mezi 1 MB a 1 GB, ale vzdálený server vrátil hodnotu %d byty"
+msgstr[2] "velikost WAL segmentu musí být mocnina dvou mezi 1 MB a 1 GB, ale vzdálený server vrátil hodnotu %d bytů"
+
+#: streamutil.c:378
+#, c-format
+msgid "could not fetch group access flag: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "nelze identifikovat systém, načteno %d řádek a %d položek, očekáváno %d řádek a %d nebo více položek"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "flag skupinového přístupu nelze naparsovat: %s"
+
+#: streamutil.c:544
+#, c-format
+msgid "could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "nelze vytvořit replikační slot \"%s\": načteno %d řádek a %d položek, očekáváno %d řádek a %d položek"
+
+#: streamutil.c:588
+#, c-format
+msgid "could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "nelze odstranit replikační slot \"%s\": načteno %d řádek a %d položek, očekáváno %d řádek a %d položek"
+
+#: walmethods.c:438 walmethods.c:927
+msgid "could not compress data"
+msgstr "nelze komprimovat data"
+
+#: walmethods.c:470
+msgid "could not reset compression stream"
+msgstr "nelze resetovat kompresní stream"
+
+#: walmethods.c:568
+msgid "could not initialize compression library"
+msgstr "nelze inicializovat kompresní knihovnu"
+
+#: walmethods.c:580
+msgid "implementation error: tar files can't have more than one open file"
+msgstr "chyba implementace: tar soubory nemohou mít otevřeno více než jeden soubor"
+
+#: walmethods.c:594
+msgid "could not create tar header"
+msgstr "nelze vytvořit tar hlavičku"
+
+#: walmethods.c:608 walmethods.c:648 walmethods.c:843 walmethods.c:854
+msgid "could not change compression parameters"
+msgstr "nelze změnit kompresní stream"
+
+#: walmethods.c:730
+msgid "unlink not supported with compression"
+msgstr "unlink není podporován s kompresí"
+
+#: walmethods.c:952
+msgid "could not close compression stream"
+msgstr "nelze uzavřít kompresní stream"
+
+#~ msgid "%s: could not stat file \"%s\": %s\n"
+#~ msgstr "%s: nelze načíst stav souboru \"%s\": %s\n"
+
+#~ msgid "%s: could not open directory \"%s\": %s\n"
+#~ msgstr "%s: nelze otevřít adresář \"%s\": %s\n"
+
+#~ msgid "%s: could not read directory \"%s\": %s\n"
+#~ msgstr "%s: nelze načíst adresář \"%s\": %s\n"
+
+#~ msgid "%s: could not open file \"%s\": %s\n"
+#~ msgstr "%s: nelze otevřít soubor \"%s\": %s\n"
+
+#~ msgid "%s: could not create directory \"%s\": %s\n"
+#~ msgstr "%s: nelze vytvořít adresář \"%s\": %s\n"
+
+#~ msgid "%s: could not write to file \"%s\": %s\n"
+#~ msgstr "%s: nelze zapsat do souboru \"%s\": %s\n"
+
+#~ msgid "%s: could not close file \"%s\": %s\n"
+#~ msgstr "%s: nelze uzavřít soubor \"%s\": %s\n"
+
+#~ msgid "%s: out of memory\n"
+#~ msgstr "%s: nedostatek paměti\n"
+
+#~ msgid "%s: child process did not exit normally\n"
+#~ msgstr "%s: podřízený proces neskončil standardně\n"
+
+#~ msgid "%s: child process exited with error %d\n"
+#~ msgstr "%s: podřízený proces skončil s chybou %d\n"
+
+#~ msgid "%s: could not create symbolic link \"%s\": %s\n"
+#~ msgstr "%s: nelze vytvořit symbolický link \"%s\": %s\n"
+
+#~ msgid "%s: symlinks are not supported on this platform\n"
+#~ msgstr "%s: symlinks nejsou na této platformě podporovány\n"
+
+#~ msgid "%s: could not close directory \"%s\": %s\n"
+#~ msgstr "%s: nelze uzavřít adresář \"%s\": %s\n"
+
+#~ msgid "%s: invalid port number \"%s\"\n"
+#~ msgstr "%s: neplatné číslo portu \"%s\"\n"
+
+#~ msgid "%s: could not fsync log file \"%s\": %s\n"
+#~ msgstr "%s: nelze provést fsync log souboru \"%s\": %s\n"
+
+#~ msgid "%s: could not open log file \"%s\": %s\n"
+#~ msgstr "%s: nelze otevřít logovací soubor \"%s\": %s\n"
+
+#~ msgid "%s: select() failed: %s\n"
+#~ msgstr "%s: select() selhal: %s\n"
+
+#~ msgid "%s: could not connect to server\n"
+#~ msgstr "%s: nelze se připojit k serveru\n"
+
+#~ msgid "%s: could not connect to server: %s"
+#~ msgstr "%s: nelze se připojit k serveru: %s"
+
+#~ msgid "%s: could not clear search_path: %s"
+#~ msgstr "%s: nelze vyčistit search_path: %s"
+
+#~ msgid "%s: could not read copy data: %s\n"
+#~ msgstr "%s: nelze načíst copy data: %s\n"
+
+#~ msgid "%s: could not close file %s: %s\n"
+#~ msgstr "%s: nelze zavřít soubor %s: %s\n"
+
+#~ msgid "%s: could not get current position in file %s: %s\n"
+#~ msgstr "%s: nelze získat aktuální pozici v souboru %s: %s\n"
+
+#~ msgid "%s: could not pad WAL segment %s: %s\n"
+#~ msgstr "%s: nelze doplnit WAL segment %s: %s\n"
+
+#~ msgid "%s: could not stat WAL segment %s: %s\n"
+#~ msgstr "%s: nelze načíst stav WAL segmentu %s: %s\n"
+
+#~ msgid "%s: Could not open WAL segment %s: %s\n"
+#~ msgstr "%s: nelze otevřít WAL segment %s: %s\n"
+
+#~ msgid "%s: could not parse log start position from value \"%s\"\n"
+#~ msgstr "%s: nelze naparsovat počáteční pozici logu z hodnoty \"%s\"\n"
+
+#~ msgid "%s: could not identify system: %s\n"
+#~ msgstr "%s: nelze identifikovat systém: %s\n"
+
+#~ msgid " -v, --verbose output verbose messages\n"
+#~ msgstr " -v, --verbose vypisuj podrobnější zprávy\n"
+
+#~ msgid "%s: could not send base backup command: %s"
+#~ msgstr "%s: nelze poslat base backup příkaz: %s"
+
+#~ msgid "%s: could not identify system: %s"
+#~ msgstr "%s: nelze identifikovat systém: %s"
+
+#~ msgid "%s: invalid format of xlog location: %s\n"
+#~ msgstr "%s: neplatný formát xlog pozice: %s\n"
+
+#~ msgid " --version output version information, then exit\n"
+#~ msgstr " --version zobraz informaci o verzi, poté skonči\n"
+
+#~ msgid " --help show this help, then exit\n"
+#~ msgstr " --help zobraz tuto nápovědu, poté skonči\n"
+
+#~ msgid "%s: timeline does not match between base backup and streaming connection\n"
+#~ msgstr "%s: timeline mezi base backupem a streamovacím spojením neodpovídá\n"
+
+#~ msgid "%s: no start point returned from server\n"
+#~ msgstr "%s: server nevráti žádný počáteční bod (start point)\n"
+
+#~ msgid "%s: could not rename file \"%s\": %s\n"
+#~ msgstr "%s: nelze přejmenovat soubor \"%s\": %s\n"
+
+#~ msgid "%s: could not seek to beginning of transaction log file \"%s\": %s\n"
+#~ msgstr "%s: nelze skočit zpět na začátek souboru transakčního logu \"%s\": %s\n"
+
+#~ msgid "%s: could not pad transaction log file \"%s\": %s\n"
+#~ msgstr "%s: nelze doplnit soubor transakčního logu \"%s\": %s\n"
+
+#~ msgid "%s: could not stat transaction log file \"%s\": %s\n"
+#~ msgstr "%s: nelze udělat stat souboru transakčního logu \"%s\": %s\n"
+
+#~ msgid "%s: could not parse transaction log file name \"%s\"\n"
+#~ msgstr "%s: nelze naparsovat jméno souboru transakčního logu \"%s\"\n"
+
+#~ msgid "%s: cannot specify both --xlog and --xlog-method\n"
+#~ msgstr "%s: volby --xlog a --xlog-method nelze zadat společně\n"
+
+#~ msgid "%s: could not parse file mode\n"
+#~ msgstr "%s: nelze načíst mód souboru\n"
+
+#~ msgid "%s: could not parse file size\n"
+#~ msgstr "%s: nelze načíst velikost souboru\n"
+
+#~ msgid " -x, --xlog include required WAL files in backup (fetch mode)\n"
+#~ msgstr " -x, --xlog zahrne potřebné WAL soubory do zálohy (fetch mód)\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Chyby hlaste na adresu <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_basebackup/po/de.po b/src/bin/pg_basebackup/po/de.po
new file mode 100644
index 0000000..3c1491a
--- /dev/null
+++ b/src/bin/pg_basebackup/po/de.po
@@ -0,0 +1,1484 @@
+# German message translation file for pg_basebackup
+# Copyright (C) 2011 - 2022 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Use these quotes: »%s«
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-01-31 20:46+0000\n"
+"PO-Revision-Date: 2022-02-01 12:35+0100\n"
+"Last-Translator: Peter Eisentraut <peter@eisentraut.org>\n"
+"Language-Team: German <pgsql-translators@postgresql.org>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "Fatal: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "Fehler: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "Warnung: "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98 ../../common/fe_memutils.c:162
+#, c-format
+msgid "out of memory\n"
+msgstr "Speicher aufgebraucht\n"
+
+#: ../../common/fe_memutils.c:92 ../../common/fe_memutils.c:154
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "kann NULL-Zeiger nicht kopieren (interner Fehler)\n"
+
+#: ../../common/file_utils.c:87 ../../common/file_utils.c:451
+#: pg_receivewal.c:266 pg_recvlogical.c:339
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "konnte »stat« für Datei »%s« nicht ausführen: %m"
+
+#: ../../common/file_utils.c:166 pg_receivewal.c:169
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "konnte Verzeichnis »%s« nicht öffnen: %m"
+
+#: ../../common/file_utils.c:200 pg_receivewal.c:337
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "konnte Verzeichnis »%s« nicht lesen: %m"
+
+#: ../../common/file_utils.c:232 ../../common/file_utils.c:291
+#: ../../common/file_utils.c:365 ../../fe_utils/recovery_gen.c:134
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "konnte Datei »%s« nicht öffnen: %m"
+
+#: ../../common/file_utils.c:303 ../../common/file_utils.c:373
+#: pg_recvlogical.c:193
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "konnte Datei »%s« nicht fsyncen: %m"
+
+#: ../../common/file_utils.c:383
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "konnte Datei »%s« nicht in »%s« umbenennen: %m"
+
+#: ../../fe_utils/recovery_gen.c:35 ../../fe_utils/recovery_gen.c:49
+#: ../../fe_utils/recovery_gen.c:77 ../../fe_utils/recovery_gen.c:100
+#: ../../fe_utils/recovery_gen.c:171 pg_basebackup.c:1248
+#, c-format
+msgid "out of memory"
+msgstr "Speicher aufgebraucht"
+
+#: ../../fe_utils/recovery_gen.c:140 pg_basebackup.c:1021 pg_basebackup.c:1715
+#: pg_basebackup.c:1771
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "konnte nicht in Datei »%s« schreiben: %m"
+
+#: ../../fe_utils/recovery_gen.c:152 pg_basebackup.c:1166 pg_basebackup.c:1672
+#: pg_basebackup.c:1748
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "konnte Datei »%s« nicht erstellen: %m"
+
+#: pg_basebackup.c:224
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "entferne Datenverzeichnis »%s«"
+
+#: pg_basebackup.c:226
+#, c-format
+msgid "failed to remove data directory"
+msgstr "konnte Datenverzeichnis nicht entfernen"
+
+#: pg_basebackup.c:230
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "entferne Inhalt des Datenverzeichnisses »%s«"
+
+#: pg_basebackup.c:232
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "konnte Inhalt des Datenverzeichnisses nicht entfernen"
+
+#: pg_basebackup.c:237
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "entferne WAL-Verzeichnis »%s«"
+
+#: pg_basebackup.c:239
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "konnte WAL-Verzeichnis nicht entfernen"
+
+#: pg_basebackup.c:243
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "entferne Inhalt des WAL-Verzeichnisses »%s«"
+
+#: pg_basebackup.c:245
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "konnte Inhalt des WAL-Verzeichnisses nicht entfernen"
+
+#: pg_basebackup.c:251
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "Datenverzeichnis »%s« wurde auf Anwenderwunsch nicht entfernt"
+
+#: pg_basebackup.c:254
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "WAL-Verzeichnis »%s« wurde auf Anwenderwunsch nicht entfernt"
+
+#: pg_basebackup.c:258
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "Änderungen in Tablespace-Verzeichnissen werden nicht rückgängig gemacht"
+
+#: pg_basebackup.c:299
+#, c-format
+msgid "directory name too long"
+msgstr "Verzeichnisname zu lang"
+
+#: pg_basebackup.c:309
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "mehrere »=«-Zeichen im Tablespace-Mapping"
+
+#: pg_basebackup.c:321
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr "ungültiges Tablespace-Mapping-Format »%s«, muss »ALTES_VERZ=NEUES_VERZ« sein"
+
+#: pg_basebackup.c:333
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr "altes Verzeichnis im Tablespace-Mapping ist kein absoluter Pfad: %s"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr "neues Verzeichnis im Tablespace-Mapping ist kein absoluter Pfad: %s"
+
+#: pg_basebackup.c:379
+#, c-format
+msgid ""
+"%s takes a base backup of a running PostgreSQL server.\n"
+"\n"
+msgstr ""
+"%s erzeugt eine Basissicherung eines laufenden PostgreSQL-Servers.\n"
+"\n"
+
+#: pg_basebackup.c:381 pg_receivewal.c:79 pg_recvlogical.c:75
+#, c-format
+msgid "Usage:\n"
+msgstr "Aufruf:\n"
+
+#: pg_basebackup.c:382 pg_receivewal.c:80 pg_recvlogical.c:76
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s [OPTION]...\n"
+
+#: pg_basebackup.c:383
+#, c-format
+msgid ""
+"\n"
+"Options controlling the output:\n"
+msgstr ""
+"\n"
+"Optionen die die Ausgabe kontrollieren:\n"
+
+#: pg_basebackup.c:384
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, --pgdata=VERZ Basissicherung in dieses Verzeichnis empfangen\n"
+
+#: pg_basebackup.c:385
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr " -F, --format=p|t Ausgabeformat (plain (Voreinstellung), tar)\n"
+
+#: pg_basebackup.c:386
+#, c-format
+msgid ""
+" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr ""
+" -r, --max-rate=RATE maximale Transferrate für Übertragung des Datenver-\n"
+" zeichnisses (in kB/s, oder Suffix »k« oder »M« abgeben)\n"
+
+#: pg_basebackup.c:388
+#, c-format
+msgid ""
+" -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr ""
+" -R, --write-recovery-conf\n"
+" Konfiguration für Replikation schreiben\n"
+
+#: pg_basebackup.c:390
+#, c-format
+msgid ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr ""
+" -T, --tablespace-mapping=ALTES_VERZ=NEUES_VERZ\n"
+" Tablespace in ALTES_VERZ nach NEUES_VERZ verlagern\n"
+
+#: pg_basebackup.c:392
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr " --waldir=WALVERZ Verzeichnis für das Write-Ahead-Log\n"
+
+#: pg_basebackup.c:393
+#, c-format
+msgid ""
+" -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr ""
+" -X, --wal-method=none|fetch|stream\n"
+" benötigte WAL-Dateien mit angegebener Methode einbeziehen\n"
+
+#: pg_basebackup.c:395
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr " -z, --gzip Tar-Ausgabe komprimieren\n"
+
+#: pg_basebackup.c:396
+#, c-format
+msgid " -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr " -Z, --compress=0-9 Tar-Ausgabe mit angegebenem Niveau komprimieren\n"
+
+#: pg_basebackup.c:397
+#, c-format
+msgid ""
+"\n"
+"General options:\n"
+msgstr ""
+"\n"
+"Allgemeine Optionen:\n"
+
+#: pg_basebackup.c:398
+#, c-format
+msgid ""
+" -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr ""
+" -c, --checkpoint=fast|spread\n"
+" schnelles oder verteiltes Checkpointing einstellen\n"
+
+#: pg_basebackup.c:400
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " -C, --create-slot Replikations-Slot erzeugen\n"
+
+#: pg_basebackup.c:401
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=LABEL Backup-Label setzen\n"
+
+#: pg_basebackup.c:402
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --no-clean nach Fehlern nicht aufräumen\n"
+
+#: pg_basebackup.c:403
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr ""
+" -N, --no-sync nicht warten, bis Änderungen sicher auf Festplatte\n"
+" geschrieben sind\n"
+
+#: pg_basebackup.c:404
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress Fortschrittsinformationen zeigen\n"
+
+#: pg_basebackup.c:405 pg_receivewal.c:89
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=SLOTNAME zu verwendender Replikations-Slot\n"
+
+#: pg_basebackup.c:406 pg_receivewal.c:91 pg_recvlogical.c:96
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose »Verbose«-Modus\n"
+
+#: pg_basebackup.c:407 pg_receivewal.c:92 pg_recvlogical.c:97
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version Versionsinformationen anzeigen, dann beenden\n"
+
+#: pg_basebackup.c:408
+#, c-format
+msgid ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" use algorithm for manifest checksums\n"
+msgstr ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" Algorithmus für Manifest-Prüfsummen\n"
+
+#: pg_basebackup.c:410
+#, c-format
+msgid ""
+" --manifest-force-encode\n"
+" hex encode all file names in manifest\n"
+msgstr ""
+" --manifest-force-encode\n"
+" alle Dateinamen im Manifest hex-kodieren\n"
+
+#: pg_basebackup.c:412
+#, c-format
+msgid " --no-estimate-size do not estimate backup size in server side\n"
+msgstr " --no-estimate-size nicht die Backup-Größe auf dem Server schätzen\n"
+
+#: pg_basebackup.c:413
+#, c-format
+msgid " --no-manifest suppress generation of backup manifest\n"
+msgstr " --no-manifest kein Backup-Manifest erzeugen\n"
+
+#: pg_basebackup.c:414
+#, c-format
+msgid " --no-slot prevent creation of temporary replication slot\n"
+msgstr " --no-slot keinen temporären Replikations-Slot erzeugen\n"
+
+#: pg_basebackup.c:415
+#, c-format
+msgid ""
+" --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr ""
+" --no-verify-checksums\n"
+" Prüfsummen nicht überprüfen\n"
+
+#: pg_basebackup.c:417 pg_receivewal.c:94 pg_recvlogical.c:98
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help diese Hilfe anzeigen, dann beenden\n"
+
+#: pg_basebackup.c:418 pg_receivewal.c:95 pg_recvlogical.c:99
+#, c-format
+msgid ""
+"\n"
+"Connection options:\n"
+msgstr ""
+"\n"
+"Verbindungsoptionen:\n"
+
+#: pg_basebackup.c:419 pg_receivewal.c:96
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=VERBDG Verbindungsparameter\n"
+
+#: pg_basebackup.c:420 pg_receivewal.c:97 pg_recvlogical.c:101
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr " -h, --host=HOSTNAME Name des Datenbankservers oder Socket-Verzeichnis\n"
+
+#: pg_basebackup.c:421 pg_receivewal.c:98 pg_recvlogical.c:102
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=PORT Portnummer des Datenbankservers\n"
+
+#: pg_basebackup.c:422
+#, c-format
+msgid ""
+" -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in seconds)\n"
+msgstr ""
+" -s, --status-interval=INTERVALL\n"
+" Zeit zwischen an Server gesendeten Statuspaketen (in Sekunden)\n"
+
+#: pg_basebackup.c:424 pg_receivewal.c:99 pg_recvlogical.c:103
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr " -U, --username=NAME Datenbankbenutzername\n"
+
+#: pg_basebackup.c:425 pg_receivewal.c:100 pg_recvlogical.c:104
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password niemals nach Passwort fragen\n"
+
+#: pg_basebackup.c:426 pg_receivewal.c:101 pg_recvlogical.c:105
+#, c-format
+msgid " -W, --password force password prompt (should happen automatically)\n"
+msgstr " -W, --password nach Passwort fragen (sollte automatisch geschehen)\n"
+
+#: pg_basebackup.c:427 pg_receivewal.c:105 pg_recvlogical.c:106
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Berichten Sie Fehler an <%s>.\n"
+
+#: pg_basebackup.c:428 pg_receivewal.c:106 pg_recvlogical.c:107
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s Homepage: <%s>\n"
+
+#: pg_basebackup.c:471
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "konnte nicht aus bereiter Pipe lesen: %m"
+
+#: pg_basebackup.c:477 pg_basebackup.c:608 pg_basebackup.c:2134
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "konnte Write-Ahead-Log-Position »%s« nicht interpretieren"
+
+#: pg_basebackup.c:573 pg_receivewal.c:441
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "konnte WAL-Dateien nicht zu Ende schreiben: %m"
+
+#: pg_basebackup.c:620
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "konnte Pipe für Hintergrundprozess nicht erzeugen: %m"
+
+#: pg_basebackup.c:655
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "temporärer Replikations-Slot »%s« wurde erzeugt"
+
+#: pg_basebackup.c:658
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "Replikations-Slot »%s« wurde erzeugt"
+
+#: pg_basebackup.c:678 pg_basebackup.c:731 pg_basebackup.c:1621
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "konnte Verzeichnis »%s« nicht erzeugen: %m"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not create background process: %m"
+msgstr "konnte Hintergrundprozess nicht erzeugen: %m"
+
+#: pg_basebackup.c:708
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "konnte Hintergrund-Thread nicht erzeugen: %m"
+
+#: pg_basebackup.c:752
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "Verzeichnis »%s« existiert aber ist nicht leer"
+
+#: pg_basebackup.c:759
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "konnte nicht auf Verzeichnis »%s« zugreifen: %m"
+
+#: pg_basebackup.c:824
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s kB (100%%), %d/%d Tablespace %*s"
+msgstr[1] "%*s/%s kB (100%%), %d/%d Tablespaces %*s"
+
+#: pg_basebackup.c:836
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d Tablespace (%s%-*.*s)"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d Tablespaces (%s%-*.*s)"
+
+#: pg_basebackup.c:852
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d Tablespace"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d Tablespaces"
+
+#: pg_basebackup.c:877
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "Transferrate »%s« ist kein gültiger Wert"
+
+#: pg_basebackup.c:882
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "ungültige Transferrate »%s«: %m"
+
+#: pg_basebackup.c:891
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "Transferrate muss größer als null sein"
+
+#: pg_basebackup.c:923
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "ungültige Einheit für --max-rate: »%s«"
+
+#: pg_basebackup.c:930
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "Transferrate »%s« überschreitet Bereich für ganze Zahlen"
+
+#: pg_basebackup.c:940
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "Transferrate »%s« ist außerhalb des gültigen Bereichs"
+
+#: pg_basebackup.c:961
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "konnte COPY-Datenstrom nicht empfangen: %s"
+
+#: pg_basebackup.c:981 pg_recvlogical.c:434 pg_recvlogical.c:606
+#: receivelog.c:978
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "konnte COPY-Daten nicht lesen: %s"
+
+#: pg_basebackup.c:1007
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "konnte nicht in komprimierte Datei »%s« schreiben: %s"
+
+#: pg_basebackup.c:1071
+#, c-format
+msgid "could not duplicate stdout: %m"
+msgstr "konnte Standardausgabe nicht duplizieren: %m"
+
+#: pg_basebackup.c:1078
+#, c-format
+msgid "could not open output file: %m"
+msgstr "konnte Ausgabedatei nicht öffnen: %m"
+
+#: pg_basebackup.c:1085 pg_basebackup.c:1106 pg_basebackup.c:1135
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "konnte Komprimierungsniveau %d nicht setzen: %s"
+
+#: pg_basebackup.c:1155
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "konnte komprimierte Datei »%s« nicht erzeugen: %s"
+
+#: pg_basebackup.c:1268
+#, c-format
+msgid "could not close compressed file \"%s\": %m"
+msgstr "konnte komprimierte Datei »%s« nicht schließen: %m"
+
+#: pg_basebackup.c:1280 pg_recvlogical.c:631
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "konnte Datei »%s« nicht schließen: %m"
+
+#: pg_basebackup.c:1542
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "COPY-Strom endete vor dem Ende der letzten Datei"
+
+#: pg_basebackup.c:1571
+#, c-format
+msgid "invalid tar block header size: %zu"
+msgstr "ungültige Tar-Block-Kopf-Größe: %zu"
+
+#: pg_basebackup.c:1628
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "konnte Zugriffsrechte für Verzeichnis »%s« nicht setzen: %m"
+
+#: pg_basebackup.c:1652
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "konnte symbolische Verknüpfung von »%s« nach »%s« nicht erzeugen: %m"
+
+#: pg_basebackup.c:1659
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "unbekannter Verknüpfungsindikator »%c«"
+
+#: pg_basebackup.c:1678
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "konnte Zugriffsrechte von Datei »%s« nicht setzen: %m"
+
+#: pg_basebackup.c:1832
+#, c-format
+msgid "incompatible server version %s"
+msgstr "inkompatible Serverversion %s"
+
+#: pg_basebackup.c:1847
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr "TIPP: -X none oder -X fetch verwenden um Log-Streaming abzuschalten"
+
+#: pg_basebackup.c:1883
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr "Basissicherung eingeleitet, warte auf Abschluss des Checkpoints"
+
+#: pg_basebackup.c:1909 pg_recvlogical.c:261 receivelog.c:494 receivelog.c:543
+#: receivelog.c:582 streamutil.c:297 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "konnte Replikationsbefehl »%s« nicht senden: %s"
+
+#: pg_basebackup.c:1920
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "konnte Basissicherung nicht starten: %s"
+
+#: pg_basebackup.c:1926
+#, c-format
+msgid "server returned unexpected response to BASE_BACKUP command; got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "unerwartete Antwort auf Befehl BASE_BACKUP: %d Zeilen und %d Felder erhalten, %d Zeilen und %d Felder erwartet"
+
+#: pg_basebackup.c:1934
+#, c-format
+msgid "checkpoint completed"
+msgstr "Checkpoint abgeschlossen"
+
+#: pg_basebackup.c:1949
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "Write-Ahead-Log-Startpunkt: %s auf Zeitleiste %u"
+
+#: pg_basebackup.c:1958
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "konnte Kopf der Sicherung nicht empfangen: %s"
+
+#: pg_basebackup.c:1964
+#, c-format
+msgid "no data returned from server"
+msgstr "keine Daten vom Server zurückgegeben"
+
+#: pg_basebackup.c:1996
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr "kann nur einen einzelnen Tablespace auf die Standardausgabe schreiben, Datenbank hat %d"
+
+#: pg_basebackup.c:2008
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "Hintergrund-WAL-Receiver wird gestartet"
+
+#: pg_basebackup.c:2047
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr "konnte Write-Ahead-Log-Endposition nicht vom Server empfangen: %s"
+
+#: pg_basebackup.c:2053
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "keine Write-Ahead-Log-Endposition vom Server zurückgegeben"
+
+#: pg_basebackup.c:2058
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "Write-Ahead-Log-Endposition: %s"
+
+#: pg_basebackup.c:2069
+#, c-format
+msgid "checksum error occurred"
+msgstr "ein Prüfsummenfehler ist aufgetreten"
+
+#: pg_basebackup.c:2074
+#, c-format
+msgid "final receive failed: %s"
+msgstr "letztes Empfangen fehlgeschlagen: %s"
+
+#: pg_basebackup.c:2098
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "warte bis Hintergrundprozess Streaming beendet hat ..."
+
+#: pg_basebackup.c:2103
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "konnte Befehl nicht an Hintergrund-Pipe senden: %m"
+
+#: pg_basebackup.c:2111
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "konnte nicht auf Kindprozess warten: %m"
+
+#: pg_basebackup.c:2116
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "Kindprozess %d endete, aber %d wurde erwartet"
+
+#: pg_basebackup.c:2121 streamutil.c:92 streamutil.c:203
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2146
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "konnte nicht auf Kind-Thread warten: %m"
+
+#: pg_basebackup.c:2152
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "konnte Statuscode des Kind-Threads nicht ermitteln: %m"
+
+#: pg_basebackup.c:2157
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "Kind-Thread hat mit Fehler %u beendet"
+
+#: pg_basebackup.c:2185
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "synchronisiere Daten auf Festplatte ..."
+
+#: pg_basebackup.c:2210
+#, c-format
+msgid "renaming backup_manifest.tmp to backup_manifest"
+msgstr "umbenennen von backup_manifest.tmp nach backup_manifest"
+
+#: pg_basebackup.c:2221
+#, c-format
+msgid "base backup completed"
+msgstr "Basissicherung abgeschlossen"
+
+#: pg_basebackup.c:2306
+#, c-format
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\""
+msgstr "ungültiges Ausgabeformat »%s«, muss »plain« oder »tar« sein"
+
+#: pg_basebackup.c:2350
+#, c-format
+msgid "invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr "ungültige Option »%s« für --wal-method, muss »fetch«, »stream« oder »none« sein"
+
+#: pg_basebackup.c:2378 pg_receivewal.c:580
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "ungültiges Komprimierungsniveau »%s«"
+
+#: pg_basebackup.c:2389
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr "ungültiges Checkpoint-Argument »%s«, muss »fast« oder »spread« sein"
+
+#: pg_basebackup.c:2416 pg_receivewal.c:555 pg_recvlogical.c:819
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "ungültiges Statusintervall »%s«"
+
+#: pg_basebackup.c:2446 pg_basebackup.c:2459 pg_basebackup.c:2470
+#: pg_basebackup.c:2481 pg_basebackup.c:2489 pg_basebackup.c:2497
+#: pg_basebackup.c:2507 pg_basebackup.c:2520 pg_basebackup.c:2529
+#: pg_basebackup.c:2540 pg_basebackup.c:2550 pg_basebackup.c:2568
+#: pg_basebackup.c:2577 pg_basebackup.c:2586 pg_receivewal.c:605
+#: pg_receivewal.c:618 pg_receivewal.c:626 pg_receivewal.c:636
+#: pg_receivewal.c:644 pg_receivewal.c:655 pg_recvlogical.c:845
+#: pg_recvlogical.c:858 pg_recvlogical.c:869 pg_recvlogical.c:877
+#: pg_recvlogical.c:885 pg_recvlogical.c:893 pg_recvlogical.c:901
+#: pg_recvlogical.c:909 pg_recvlogical.c:917
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Versuchen Sie »%s --help« für weitere Informationen.\n"
+
+#: pg_basebackup.c:2457 pg_receivewal.c:616 pg_recvlogical.c:856
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "zu viele Kommandozeilenargumente (das erste ist »%s«)"
+
+#: pg_basebackup.c:2469 pg_receivewal.c:654
+#, c-format
+msgid "no target directory specified"
+msgstr "kein Zielverzeichnis angegeben"
+
+#: pg_basebackup.c:2480
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "nur Sicherungen im Tar-Modus können komprimiert werden"
+
+#: pg_basebackup.c:2488
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "im Tar-Modus können Write-Ahead-Logs nicht auf Standardausgabe geschrieben werden"
+
+#: pg_basebackup.c:2496
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "Replikations-Slots können nur mit WAL-Streaming verwendet werden"
+
+#: pg_basebackup.c:2506
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "--no-slot kann nicht zusammen mit einem Slot-Namen verwendet werden"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2518 pg_receivewal.c:634
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "für %s muss ein Slot mit --slot angegeben werden"
+
+#: pg_basebackup.c:2527 pg_basebackup.c:2566 pg_basebackup.c:2575
+#: pg_basebackup.c:2584
+#, c-format
+msgid "%s and %s are incompatible options"
+msgstr "%s und %s sind inkompatible Optionen"
+
+#: pg_basebackup.c:2539
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "WAL-Verzeichnis kann nur im »plain«-Modus angegeben werden"
+
+#: pg_basebackup.c:2549
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "WAL-Verzeichnis muss absoluten Pfad haben"
+
+#: pg_basebackup.c:2559 pg_receivewal.c:663
+#, c-format
+msgid "this build does not support compression"
+msgstr "diese Installation unterstützt keine Komprimierung"
+
+#: pg_basebackup.c:2644
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "konnte symbolische Verknüpfung »%s« nicht erstellen: %m"
+
+#: pg_basebackup.c:2648
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "symbolische Verknüpfungen werden auf dieser Plattform nicht unterstützt"
+
+#: pg_receivewal.c:77
+#, c-format
+msgid ""
+"%s receives PostgreSQL streaming write-ahead logs.\n"
+"\n"
+msgstr ""
+"%s empfängt PostgreSQL-Write-Ahead-Logs.\n"
+"\n"
+
+#: pg_receivewal.c:81 pg_recvlogical.c:81
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Optionen:\n"
+
+#: pg_receivewal.c:82
+#, c-format
+msgid " -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr " -D, --directory=VERZ Write-Ahead-Log-Dateien in dieses Verzeichnis empfangen\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:82
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr " -E, --endpos=LSN nach Empfang der angegebenen LSN beenden\n"
+
+#: pg_receivewal.c:84 pg_recvlogical.c:86
+#, c-format
+msgid " --if-not-exists do not error if slot already exists when creating a slot\n"
+msgstr " --if-not-exists keinen Fehler ausgeben, wenn Slot beim Erzeugen schon existiert\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:88
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop bei Verbindungsverlust nicht erneut probieren\n"
+
+#: pg_receivewal.c:86
+#, c-format
+msgid " --no-sync do not wait for changes to be written safely to disk\n"
+msgstr ""
+" --no-sync nicht warten, bis Änderungen sicher auf Festplatte\n"
+" geschrieben sind\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:93
+#, c-format
+msgid ""
+" -s, --status-interval=SECS\n"
+" time between status packets sent to server (default: %d)\n"
+msgstr ""
+" -s, --status-interval=SEK\n"
+" Zeit zwischen an Server gesendeten Statuspaketen (Standard: %d)\n"
+
+#: pg_receivewal.c:90
+#, c-format
+msgid " --synchronous flush write-ahead log immediately after writing\n"
+msgstr " --synchronous Write-Ahead-Log sofort nach dem Schreiben flushen\n"
+
+#: pg_receivewal.c:93
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr " -Z, --compress=0-9 Logs mit angegebenem Niveau komprimieren\n"
+
+#: pg_receivewal.c:102
+#, c-format
+msgid ""
+"\n"
+"Optional actions:\n"
+msgstr ""
+"\n"
+"Optionale Aktionen:\n"
+
+#: pg_receivewal.c:103 pg_recvlogical.c:78
+#, c-format
+msgid " --create-slot create a new replication slot (for the slot's name see --slot)\n"
+msgstr " --create-slot neuen Replikations-Slot erzeugen (Slot-Name siehe --slot)\n"
+
+#: pg_receivewal.c:104 pg_recvlogical.c:79
+#, c-format
+msgid " --drop-slot drop the replication slot (for the slot's name see --slot)\n"
+msgstr " --drop-slot Replikations-Slot löschen (Slot-Name siehe --slot)\n"
+
+#: pg_receivewal.c:117
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "Segment bei %X/%X abgeschlossen (Zeitleiste %u)"
+
+#: pg_receivewal.c:124
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "Log-Streaming gestoppt bei %X/%X (Zeitleiste %u)"
+
+#: pg_receivewal.c:140
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "auf Zeitleiste %u umgeschaltet bei %X/%X"
+
+#: pg_receivewal.c:150
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "Interrupt-Signal erhalten, beende"
+
+#: pg_receivewal.c:186
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "konnte Verzeichnis »%s« nicht schließen: %m"
+
+#: pg_receivewal.c:272
+#, c-format
+msgid "segment file \"%s\" has incorrect size %lld, skipping"
+msgstr "Segmentdatei »%s« hat falsche Größe %lld, wird übersprungen"
+
+#: pg_receivewal.c:290
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "konnte komprimierte Datei »%s« nicht öffnen: %m"
+
+#: pg_receivewal.c:296
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "konnte Positionszeiger in komprimierter Datei »%s« nicht setzen: %m"
+
+#: pg_receivewal.c:304
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "konnte komprimierte Datei »%s« nicht lesen: %m"
+
+#: pg_receivewal.c:307
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "konnte Datei »%s« nicht lesen: %d von %zu gelesen"
+
+#: pg_receivewal.c:318
+#, c-format
+msgid "compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr "komprimierte Segmentdatei »%s« hat falsche unkomprimierte Größe %d, wird übersprungen"
+
+#: pg_receivewal.c:422
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "starte Log-Streaming bei %X/%X (Zeitleiste %u)"
+
+#: pg_receivewal.c:537 pg_recvlogical.c:761
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "ungültige Portnummer »%s«"
+
+#: pg_receivewal.c:565 pg_recvlogical.c:787
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "konnte Endposition »%s« nicht parsen"
+
+#: pg_receivewal.c:625
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "--create-slot kann nicht zusammen mit --drop-slot verwendet werden"
+
+#: pg_receivewal.c:643
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "--synchronous kann nicht zusammen mit --no-sync verwendet werden"
+
+#: pg_receivewal.c:723
+#, c-format
+msgid "replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr "Replikationsverbindung, die Slot »%s« verwendet, ist unerwarteterweise datenbankspezifisch"
+
+#: pg_receivewal.c:734 pg_recvlogical.c:968
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "lösche Replikations-Slot »%s«"
+
+#: pg_receivewal.c:745 pg_recvlogical.c:978
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "erzeuge Replikations-Slot »%s«"
+
+#: pg_receivewal.c:771 pg_recvlogical.c:1003
+#, c-format
+msgid "disconnected"
+msgstr "Verbindung beendet"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:777 pg_recvlogical.c:1009
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "Verbindung beendet; erneuter Versuch in %d Sekunden"
+
+#: pg_recvlogical.c:73
+#, c-format
+msgid ""
+"%s controls PostgreSQL logical decoding streams.\n"
+"\n"
+msgstr ""
+"%s kontrolliert logische Dekodierungsströme von PostgreSQL.\n"
+"\n"
+
+#: pg_recvlogical.c:77
+#, c-format
+msgid ""
+"\n"
+"Action to be performed:\n"
+msgstr ""
+"\n"
+"Auszuführende Aktion:\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid " --start start streaming in a replication slot (for the slot's name see --slot)\n"
+msgstr " --start Streaming in einem Replikations-Slot starten (Slot-Name siehe --slot)\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr " -f, --file=DATEI Log in diese Datei empfangen, - für Standardausgabe\n"
+
+#: pg_recvlogical.c:84
+#, c-format
+msgid ""
+" -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: %d)\n"
+msgstr ""
+" -F --fsync-interval=SEK\n"
+" Zeit zwischen Fsyncs der Ausgabedatei (Standard: %d)\n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid " -I, --startpos=LSN where in an existing slot should the streaming start\n"
+msgstr " -I, --startpos=LSN wo in einem bestehenden Slot das Streaming starten soll\n"
+
+#: pg_recvlogical.c:89
+#, c-format
+msgid ""
+" -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr ""
+" -o, --option=NAME[=WERT]\n"
+" Option NAME mit optionalem Wert WERT an den\n"
+" Ausgabe-Plugin übergeben\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr " -P, --plugin=PLUGIN Ausgabe-Plugin PLUGIN verwenden (Standard: %s)\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=SLOTNAME Name des logischen Replikations-Slots\n"
+
+#: pg_recvlogical.c:100
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=DBNAME Datenbank, mit der verbunden werden soll\n"
+
+#: pg_recvlogical.c:133
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "bestätige Schreiben bis %X/%X, Flush bis %X/%X (Slot %s)"
+
+#: pg_recvlogical.c:157 receivelog.c:356
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "konnte Rückmeldungspaket nicht senden: %s"
+
+#: pg_recvlogical.c:228
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "starte Log-Streaming bei %X/%X (Slot %s)"
+
+#: pg_recvlogical.c:270
+#, c-format
+msgid "streaming initiated"
+msgstr "Streaming eingeleitet"
+
+#: pg_recvlogical.c:334
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "konnte Logdatei »%s« nicht öffnen: %m"
+
+#: pg_recvlogical.c:360 receivelog.c:886
+#, c-format
+msgid "invalid socket: %s"
+msgstr "ungültiges Socket: %s"
+
+#: pg_recvlogical.c:413 receivelog.c:914
+#, c-format
+msgid "%s() failed: %m"
+msgstr "%s() fehlgeschlagen: %m"
+
+#: pg_recvlogical.c:420 receivelog.c:964
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "konnte keine Daten vom WAL-Stream empfangen: %s"
+
+#: pg_recvlogical.c:462 pg_recvlogical.c:513 receivelog.c:1008
+#: receivelog.c:1074
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "Streaming-Header zu klein: %d"
+
+#: pg_recvlogical.c:497 receivelog.c:846
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "unbekannter Streaming-Header: »%c«"
+
+#: pg_recvlogical.c:551 pg_recvlogical.c:563
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "konnte %u Bytes nicht in Logdatei »%s« schreiben: %m"
+
+#: pg_recvlogical.c:617 receivelog.c:642 receivelog.c:679
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "unerwarteter Abbruch des Replikations-Streams: %s"
+
+#: pg_recvlogical.c:741
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "ungültiges Fsync-Intervall »%s«"
+
+#: pg_recvlogical.c:779
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "konnte Startposition »%s« nicht parsen"
+
+#: pg_recvlogical.c:868
+#, c-format
+msgid "no slot specified"
+msgstr "kein Slot angegeben"
+
+#: pg_recvlogical.c:876
+#, c-format
+msgid "no target file specified"
+msgstr "keine Zieldatei angegeben"
+
+#: pg_recvlogical.c:884
+#, c-format
+msgid "no database specified"
+msgstr "keine Datenbank angegeben"
+
+#: pg_recvlogical.c:892
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "mindestens eine Aktion muss angegeben werden"
+
+#: pg_recvlogical.c:900
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr "--create-slot oder --start kann nicht zusammen mit --drop-slot verwendet werden"
+
+#: pg_recvlogical.c:908
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr "--create-slot oder --drop-slot kann nicht zusammen mit --startpos verwendet werden"
+
+#: pg_recvlogical.c:916
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "--endpos kann nur zusammen mit --start angegeben werden"
+
+#: pg_recvlogical.c:950
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr "konnte keine datenbankspezifische Replikationsverbindung herstellen"
+
+#: pg_recvlogical.c:1049
+#, c-format
+msgid "end position %X/%X reached by keepalive"
+msgstr "Endposition %X/%X durch Keepalive erreicht"
+
+#: pg_recvlogical.c:1052
+#, c-format
+msgid "end position %X/%X reached by WAL record at %X/%X"
+msgstr "Endposition %X/%X erreicht durch WAL-Eintrag bei %X/%X"
+
+#: receivelog.c:68
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "konnte Archivstatusdatei »%s« nicht erstellen: %s"
+
+#: receivelog.c:75
+#, c-format
+msgid "could not close archive status file \"%s\": %s"
+msgstr "konnte Archivstatusdatei »%s« nicht schließen: %s"
+
+#: receivelog.c:123
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "konnte Größe der Write-Ahead-Log-Datei »%s« nicht ermittlen: %s"
+
+#: receivelog.c:134
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "konnte bestehende Write-Ahead-Log-Datei »%s« nicht öffnen: %s"
+
+#: receivelog.c:143
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr "konnte bestehende Write-Ahead-Log-Datei »%s« nicht fsyncen: %s"
+
+#: receivelog.c:158
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] "Write-Ahead-Log-Datei »%s« hat %d Byte, sollte 0 oder %d sein"
+msgstr[1] "Write-Ahead-Log-Datei »%s« hat %d Bytes, sollte 0 oder %d sein"
+
+#: receivelog.c:174
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "konnte Write-Ahead-Log-Datei »%s« nicht öffnen: %s"
+
+#: receivelog.c:202
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "konnte Positionszeiger in Datei »%s« nicht ermitteln: %s"
+
+#: receivelog.c:216
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "»%s%s« wird nicht umbenannt, Segment ist noch nicht vollständig"
+
+#: receivelog.c:228 receivelog.c:313 receivelog.c:688
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "konnte Datei »%s« nicht schließen: %s"
+
+#: receivelog.c:285
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "Server berichtete unerwarteten History-Dateinamen für Zeitleiste %u: %s"
+
+#: receivelog.c:293
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "konnte Zeitleisten-History-Datei »%s« nicht erzeugen: %s"
+
+#: receivelog.c:300
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "konnte Zeitleisten-History-Datei »%s« nicht schreiben: %s"
+
+#: receivelog.c:390
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions older than %s"
+msgstr "inkompatible Serverversion %s; Client unterstützt Streaming nicht mit Serverversionen älter als %s"
+
+#: receivelog.c:399
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions newer than %s"
+msgstr "inkompatible Serverversion %s; Client unterstützt Streaming nicht mit Serverversionen neuer als %s"
+
+#: receivelog.c:501 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid "could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "Konnte System nicht identifizieren: %d Zeilen und %d Felder erhalten, %d Zeilen und %d oder mehr Felder erwartet"
+
+#: receivelog.c:508
+#, c-format
+msgid "system identifier does not match between base backup and streaming connection"
+msgstr "Systemidentifikator stimmt nicht zwischen Basissicherung und Streaming-Verbindung überein"
+
+#: receivelog.c:514
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "Startzeitleiste %u ist auf dem Server nicht vorhanden"
+
+#: receivelog.c:555
+#, c-format
+msgid "unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "unerwartete Antwort auf Befehl TIMELINE_HISTORY: %d Zeilen und %d Felder erhalten, %d Zeilen und %d Felder erwartet"
+
+#: receivelog.c:626
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "Server berichtete unerwartete nächste Zeitleiste %u, folgend auf Zeitleiste %u"
+
+#: receivelog.c:632
+#, c-format
+msgid "server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"
+msgstr "Server beendete Streaming von Zeitleiste %u bei %X/%X, aber gab an, dass nächste Zeitleiste %u bei %X/%X beginnt"
+
+#: receivelog.c:672
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "Replikationsstrom wurde vor Stopppunkt abgebrochen"
+
+#: receivelog.c:718
+#, c-format
+msgid "unexpected result set after end-of-timeline: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "unerwartete Ergebnismenge nach Ende der Zeitleiste: %d Zeilen und %d Felder erhalten, %d Zeilen und %d Felder erwartet"
+
+#: receivelog.c:727
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "konnte Startpunkt der nächsten Zeitleiste (»%s«) nicht interpretieren"
+
+#: receivelog.c:776 receivelog.c:1028 walmethods.c:994
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "konnte Datei »%s« nicht fsyncen: %s"
+
+#: receivelog.c:1091
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "Write-Ahead-Log-Eintrag für Offset %u erhalten ohne offene Datei"
+
+#: receivelog.c:1101
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "WAL-Daten-Offset %08x erhalten, %08x erwartet"
+
+#: receivelog.c:1135
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "konnte %u Bytes nicht in WAL-Datei »%s« schreiben: %s"
+
+#: receivelog.c:1160 receivelog.c:1200 receivelog.c:1230
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "konnte COPY-Ende-Paket nicht senden: %s"
+
+#: streamutil.c:162
+msgid "Password: "
+msgstr "Passwort: "
+
+#: streamutil.c:186
+#, c-format
+msgid "could not connect to server"
+msgstr "konnte nicht mit Server verbinden"
+
+#: streamutil.c:231
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "konnte search_path nicht auf leer setzen: %s"
+
+#: streamutil.c:247
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "konnte Servereinstellung für integer_datetimes nicht ermitteln"
+
+#: streamutil.c:254
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "Kompilieroption »integer_datetimes« stimmt nicht mit Server überein"
+
+#: streamutil.c:305
+#, c-format
+msgid "could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "konnte WAL-Segmentgröße nicht ermitteln: %d Zeilen und %d Felder erhalten, %d Zeilen und %d oder mehr Felder erwartet"
+
+#: streamutil.c:315
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "WAL-Segmentgröße konnte nicht interpretiert werden"
+
+#: streamutil.c:333
+#, c-format
+msgid "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"
+msgid_plural "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"
+msgstr[0] "WAL-Segmentgröße muss eine Zweierpotenz zwischen 1 MB und 1 GB sein, aber der Server gab einen Wert von %d Byte an"
+msgstr[1] "WAL-Segmentgröße muss eine Zweierpotenz zwischen 1 MB und 1 GB sein, aber der Server gab einen Wert von %d Bytes an"
+
+#: streamutil.c:378
+#, c-format
+msgid "could not fetch group access flag: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "konnte Gruppenzugriffseinstellung nicht ermitteln: %d Zeilen und %d Felder erhalten, %d Zeilen und %d oder mehr Felder erwartet"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "Gruppenzugriffseinstellung konnte nicht interpretiert werden: %s"
+
+#: streamutil.c:544
+#, c-format
+msgid "could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "konnte Replikations-Slot »%s« nicht erzeugen: %d Zeilen und %d Felder erhalten, %d Zeilen und %d Felder erwartet"
+
+#: streamutil.c:588
+#, c-format
+msgid "could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "konnte Replikations-Slot »%s« nicht löschen: %d Zeilen und %d Felder erhalten, %d Zeilen und %d Felder erwartet"
+
+#: walmethods.c:521 walmethods.c:1057
+msgid "could not compress data"
+msgstr "konnte Daten nicht komprimieren"
+
+#: walmethods.c:550
+msgid "could not reset compression stream"
+msgstr "konnte Komprimierungsstrom nicht zurücksetzen"
+
+#: walmethods.c:670
+msgid "could not initialize compression library"
+msgstr "konnte Komprimierungsbibliothek nicht initialisieren"
+
+#: walmethods.c:681
+msgid "implementation error: tar files can't have more than one open file"
+msgstr "Implementierungsfehler: Tar-Dateien können nicht mehr als eine offene Datei haben"
+
+#: walmethods.c:695
+msgid "could not create tar header"
+msgstr "konnte Tar-Dateikopf nicht erzeugen"
+
+#: walmethods.c:711 walmethods.c:751 walmethods.c:965 walmethods.c:977
+msgid "could not change compression parameters"
+msgstr "konnte Komprimierungsparameter nicht ändern"
+
+#: walmethods.c:850
+msgid "unlink not supported with compression"
+msgstr "Unlink wird bei Komprimierung nicht unterstützt"
+
+#: walmethods.c:1081
+msgid "could not close compression stream"
+msgstr "konnte Komprimierungsstrom nicht schließen"
diff --git a/src/bin/pg_basebackup/po/el.po b/src/bin/pg_basebackup/po/el.po
new file mode 100644
index 0000000..32a0589
--- /dev/null
+++ b/src/bin/pg_basebackup/po/el.po
@@ -0,0 +1,1476 @@
+# Greek message translation file for pg_basebackup
+# Copyright (C) 2021 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_basebackup (PostgreSQL) package.
+# Georgios Kokolatos <gkokolatos@pm.me>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_basebackup (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-11-16 04:46+0000\n"
+"PO-Revision-Date: 2021-11-23 11:05+0100\n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"Last-Translator: Georgios Kokolatos <gkokolatos@pm.me>\n"
+"Language-Team: \n"
+"X-Generator: Poedit 3.0\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "κρίσιμο: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "σφάλμα: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "προειδοποίηση: "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98 ../../common/fe_memutils.c:162
+#, c-format
+msgid "out of memory\n"
+msgstr "έλλειψη μνήμης\n"
+
+#: ../../common/fe_memutils.c:92 ../../common/fe_memutils.c:154
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "δεν ήταν δυνατή η αντιγραφή δείκτη null (εσωτερικό σφάλμα)\n"
+
+#: ../../common/file_utils.c:87 ../../common/file_utils.c:451
+#: pg_receivewal.c:266 pg_recvlogical.c:340
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "δεν ήταν δυνατή η εκτέλεση stat στο αρχείο «%s»: %m"
+
+#: ../../common/file_utils.c:166 pg_receivewal.c:169
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "δεν ήταν δυνατό το άνοιγμα του καταλόγου «%s»: %m"
+
+#: ../../common/file_utils.c:200 pg_receivewal.c:337
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "δεν ήταν δυνατή η ανάγνωση του καταλόγου «%s»: %m"
+
+#: ../../common/file_utils.c:232 ../../common/file_utils.c:291
+#: ../../common/file_utils.c:365 ../../fe_utils/recovery_gen.c:134
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "δεν ήταν δυνατό το άνοιγμα του αρχείου «%s»: %m"
+
+#: ../../common/file_utils.c:303 ../../common/file_utils.c:373
+#: pg_recvlogical.c:193
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "δεν ήταν δυνατή η εκτέλεση της εντολής fsync στο αρχείο «%s»: %m"
+
+#: ../../common/file_utils.c:383
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "δεν ήταν δυνατή η μετονομασία του αρχείου «%s» σε «%s»: %m"
+
+#: ../../fe_utils/recovery_gen.c:35 ../../fe_utils/recovery_gen.c:49
+#: ../../fe_utils/recovery_gen.c:77 ../../fe_utils/recovery_gen.c:100
+#: ../../fe_utils/recovery_gen.c:171 pg_basebackup.c:1248
+#, c-format
+msgid "out of memory"
+msgstr "έλλειψη μνήμης"
+
+#: ../../fe_utils/recovery_gen.c:140 pg_basebackup.c:1021 pg_basebackup.c:1714
+#: pg_basebackup.c:1770
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "δεν ήταν δυνατή η εγγραφή στο αρχείο «%s»: %m"
+
+#: ../../fe_utils/recovery_gen.c:152 pg_basebackup.c:1166 pg_basebackup.c:1671
+#: pg_basebackup.c:1747
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "δεν ήταν δυνατή η δημιουργία αρχείου «%s»: %m"
+
+#: pg_basebackup.c:224
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "αφαιρείται ο κατάλογος δεδομένων «%s»"
+
+#: pg_basebackup.c:226
+#, c-format
+msgid "failed to remove data directory"
+msgstr "απέτυχε η αφαίρεση καταλόγου δεδομένων"
+
+#: pg_basebackup.c:230
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "αφαιρούνται περιεχόμενα του καταλόγου δεδομένων «%s»"
+
+#: pg_basebackup.c:232
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "απέτυχε η αφαίρεση περιεχομένων του καταλόγου δεδομένων"
+
+#: pg_basebackup.c:237
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "αφαίρεση καταλόγου WAL «%s»"
+
+#: pg_basebackup.c:239
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "απέτυχε η αφαίρεση καταλόγου WAL"
+
+#: pg_basebackup.c:243
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "αφαιρούνται τα περιεχόμενα του καταλόγου WAL «%s»"
+
+#: pg_basebackup.c:245
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "απέτυχε η αφαίρεση περιεχόμενων του καταλόγου WAL"
+
+#: pg_basebackup.c:251
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "ο κατάλογος δεδομένων «%s» δεν αφαιρείται κατα απαίτηση του χρήστη"
+
+#: pg_basebackup.c:254
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "κατάλογος WAL «%s» δεν αφαιρέθηκε κατά απαίτηση του χρήστη"
+
+#: pg_basebackup.c:258
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "οι αλλαγές στους καταλόγους πινακοχώρων δεν θα αναιρεθούν"
+
+#: pg_basebackup.c:299
+#, c-format
+msgid "directory name too long"
+msgstr "πολύ μακρύ όνομα καταλόγου"
+
+#: pg_basebackup.c:309
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "πολλαπλά σύμβολα \"=\" στην αντιστοίχιση πινακοχώρου"
+
+#: pg_basebackup.c:321
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr "μη έγκυρη μορφή αντιστοίχισης πινακοχώρου «%s», πρέπει να είναι «OLDDIR=NEWDIR»"
+
+#: pg_basebackup.c:333
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr "ο παλιός κατάλογος δεν είναι απόλυτη διαδρομή στην αντιστοίχιση πινακοχώρου: %s"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr "ο νέος κατάλογος δεν είναι μια απόλυτη διαδρομή στην αντιστοίχιση πινακοχώρου: %s"
+
+#: pg_basebackup.c:379
+#, c-format
+msgid ""
+"%s takes a base backup of a running PostgreSQL server.\n"
+"\n"
+msgstr ""
+"%s λαμβάνει ένα αντίγραφο ασφαλείας βάσης ενός διακομιστή PostgreSQL που εκτελείται.\n"
+"\n"
+
+#: pg_basebackup.c:381 pg_receivewal.c:79 pg_recvlogical.c:75
+#, c-format
+msgid "Usage:\n"
+msgstr "Χρήση:\n"
+
+#: pg_basebackup.c:382 pg_receivewal.c:80 pg_recvlogical.c:76
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s [ΕΠΙΛΟΓΗ]...\n"
+
+#: pg_basebackup.c:383
+#, c-format
+msgid ""
+"\n"
+"Options controlling the output:\n"
+msgstr ""
+"\n"
+"Επιλογές που ελέγχουν το περιεχόμενο εξόδου:\n"
+
+#: pg_basebackup.c:384
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, --pgdata=Directory λάβε το αντίγραφο ασφαλείας βάσης στον κατάλογο\n"
+
+#: pg_basebackup.c:385
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr " -F, --format=p|t μορφή εξόδου (απλή (προεπιλογή), tar)\n"
+
+#: pg_basebackup.c:386
+#, c-format
+msgid ""
+" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr ""
+" -r, --max-rate=RATE μέγιστος ρυθμός μεταφοράς για τη μεταφορά καταλόγου δεδομένων\n"
+" (σε kB/s, ή χρησιμοποιήστε το επίθημα «k» ή «M»)\n"
+
+#: pg_basebackup.c:388
+#, c-format
+msgid ""
+" -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr ""
+" -R, --write-recovery-conf\n"
+" εγγραφή των ρυθμίσεων αναπαραγωγής\n"
+
+#: pg_basebackup.c:390
+#, c-format
+msgid ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" μετακίνησε τον πινακοχώρο από OLDDIR σε NEWDIR\n"
+
+#: pg_basebackup.c:392
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr " --waldir=WALDIR τοποθεσία για τον κατάλογο write-ahead log\n"
+
+#: pg_basebackup.c:393
+#, c-format
+msgid ""
+" -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr ""
+" -X, --wal-method=none|fetch|stream\n"
+" περιέλαβε τα απαιτούμενα αρχεία WAL με την ορισμένη μέθοδο\n"
+
+#: pg_basebackup.c:395
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr " -z, --gzip συμπίεσε την έξοδο tar\n"
+
+#: pg_basebackup.c:396
+#, c-format
+msgid " -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr " -Z, --compress=0-9 συμπίεσε την έξοδο tar με το ορισμένο επίπεδο συμπίεσης\n"
+
+#: pg_basebackup.c:397
+#, c-format
+msgid ""
+"\n"
+"General options:\n"
+msgstr ""
+"\n"
+"Γενικές επιλογές:\n"
+
+#: pg_basebackup.c:398
+#, c-format
+msgid ""
+" -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr ""
+" -c, --checkpoint=fast|spread\n"
+" όρισε fast ή spread λειτουργία λήψης σημείων ελέγχου\n"
+
+#: pg_basebackup.c:400
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " -C, --create-slot δημιούργησε υποδοχή αναπαραγωγής\n"
+
+#: pg_basebackup.c:401
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=LABEL όρισε ετικέτα αντιγράφου ασφαλείας\n"
+
+#: pg_basebackup.c:402
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --no-clean να μην καθαριστούν σφάλματα\n"
+
+#: pg_basebackup.c:403
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync να μην αναμένει την ασφαλή εγγραφή αλλαγών στον δίσκο\n"
+
+#: pg_basebackup.c:404
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress εμφάνισε πληροφορίες προόδου\n"
+
+#: pg_basebackup.c:405 pg_receivewal.c:89
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=SLOTNAME υποδοχή αναπαραγωγής για χρήση\n"
+
+#: pg_basebackup.c:406 pg_receivewal.c:91 pg_recvlogical.c:96
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose περιφραστικά μηνύματα εξόδου\n"
+
+#: pg_basebackup.c:407 pg_receivewal.c:92 pg_recvlogical.c:97
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version εμφάνισε πληροφορίες έκδοσης, στη συνέχεια έξοδος\n"
+
+#: pg_basebackup.c:408
+#, c-format
+msgid ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" use algorithm for manifest checksums\n"
+msgstr ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" χρησιμοποίησε αυτόν τον αλγόριθμο για τα αθροίσματα ελέγχου διακήρυξης\n"
+
+#: pg_basebackup.c:410
+#, c-format
+msgid ""
+" --manifest-force-encode\n"
+" hex encode all file names in manifest\n"
+msgstr ""
+" --manifest-force-encode\n"
+" χρήση δεκαεξαδικής κωδικοποίησης για όλα\n"
+" τα ονόματα αρχείων στη διακήρυξη\n"
+
+#: pg_basebackup.c:412
+#, c-format
+msgid " --no-estimate-size do not estimate backup size in server side\n"
+msgstr " --no-estimate-size να μην εκτιμήσει το μέγεθος του αντιγράφου ασφαλείας στην πλευρά του διακομιστή\n"
+
+#: pg_basebackup.c:413
+#, c-format
+msgid " --no-manifest suppress generation of backup manifest\n"
+msgstr ""
+
+#: pg_basebackup.c:414
+#, c-format
+msgid " --no-slot prevent creation of temporary replication slot\n"
+msgstr " --no-slot εμπόδισε την δημιουργία προσωρινής υποδοχής αναπαραγωγής\n"
+
+#: pg_basebackup.c:415
+#, c-format
+msgid ""
+" --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr ""
+" --no-verify-checksums\n"
+" να μην επιβεβαιώσει τα αθροίσματα ελέγχου\n"
+
+#: pg_basebackup.c:417 pg_receivewal.c:94 pg_recvlogical.c:98
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help εμφάνισε αυτό το μήνυμα βοήθειας, μετά έξοδος\n"
+
+#: pg_basebackup.c:418 pg_receivewal.c:95 pg_recvlogical.c:99
+#, c-format
+msgid ""
+"\n"
+"Connection options:\n"
+msgstr ""
+"\n"
+"Επιλογές σύνδεσης:\n"
+
+#: pg_basebackup.c:419 pg_receivewal.c:96
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=CONNSTR συμβολοσειρά σύνδεσης\n"
+
+#: pg_basebackup.c:420 pg_receivewal.c:97 pg_recvlogical.c:101
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr " -h, --host=HOSTNAME διακομιστής βάσης δεδομένων ή κατάλογος υποδοχών\n"
+
+#: pg_basebackup.c:421 pg_receivewal.c:98 pg_recvlogical.c:102
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=PORT θύρα διακομιστή βάσης δεδομένων\n"
+
+#: pg_basebackup.c:422
+#, c-format
+msgid ""
+" -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in seconds)\n"
+msgstr ""
+" -s, --status-interval=INTERVAL\n"
+" χρόνος μεταξύ αποστολής πακέτων κατάστασης στον διακομιστή (σε δευτερόλεπτα)\n"
+
+#: pg_basebackup.c:424 pg_receivewal.c:99 pg_recvlogical.c:103
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr " -U, --username=NAME σύνδεση ως ο ορισμένος χρήστης βάσης δεδομένων\n"
+
+#: pg_basebackup.c:425 pg_receivewal.c:100 pg_recvlogical.c:104
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password να μην ζητείται ποτέ κωδικός πρόσβασης\n"
+
+#: pg_basebackup.c:426 pg_receivewal.c:101 pg_recvlogical.c:105
+#, c-format
+msgid " -W, --password force password prompt (should happen automatically)\n"
+msgstr " -W, --password αναγκαστική προτροπή κωδικού πρόσβασης (πρέπει να συμβεί αυτόματα)\n"
+
+#: pg_basebackup.c:427 pg_receivewal.c:105 pg_recvlogical.c:106
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Υποβάλετε αναφορές σφάλματων σε <%s>.\n"
+
+#: pg_basebackup.c:428 pg_receivewal.c:106 pg_recvlogical.c:107
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s αρχική σελίδα: <%s>\n"
+
+#: pg_basebackup.c:471
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "δεν ήταν δυνατή η ανάγνωση από έτοιμη pipe: %m"
+
+#: pg_basebackup.c:477 pg_basebackup.c:608 pg_basebackup.c:2133
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "δεν ήταν δυνατή η ανάλυση της τοποθεσίας write-ahead log «%s»"
+
+#: pg_basebackup.c:573 pg_receivewal.c:441
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "δεν ήταν δυνατός ο τερματισμός εγγραφής αρχείων WAL: %m"
+
+#: pg_basebackup.c:620
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "δεν ήταν δυνατή η δημιουργία pipe για διεργασίες παρασκηνίου : %m"
+
+#: pg_basebackup.c:655
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "δημιουργήθηκε προσωρινή υποδοχή αναπαραγωγής «%s»"
+
+#: pg_basebackup.c:658
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "δημιουργήθηκε υποδοχή αναπαραγωγής «%s»"
+
+#: pg_basebackup.c:678 pg_basebackup.c:731 pg_basebackup.c:1620
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "δεν ήταν δυνατή η δημιουργία του καταλόγου «%s»: %m"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not create background process: %m"
+msgstr "δεν ήταν δυνατή η δημιουργία διαδικασίας παρασκηνίου: %m"
+
+#: pg_basebackup.c:708
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "δεν ήταν δυνατή η δημιουργία νήματος παρασκηνίου: %m"
+
+#: pg_basebackup.c:752
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "ο κατάλογος «%s» υπάρχει και δεν είναι άδειος"
+
+#: pg_basebackup.c:759
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "δεν ήταν δυνατή η πρόσβαση του καταλόγου «%s»: %m"
+
+#: pg_basebackup.c:824
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s kB (100%%), %d/%d πινακοχώρος %*s"
+msgstr[1] "%*s/%s kB (100%%), %d/%d πινακοχώροι %*s"
+
+#: pg_basebackup.c:836
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d πινακοχώρος (%s%-*.*s)"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d πινακοχώροι (%s%-*.*s)"
+
+#: pg_basebackup.c:852
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d πινακοχώρος"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d πινακοχώροι"
+
+#: pg_basebackup.c:877
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "η τιμή ρυθμού μεταφοράς «%s» δεν είναι έγκυρη"
+
+#: pg_basebackup.c:882
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "μη έγκυρος ρυθμός μεταφοράς «%s»: %m"
+
+#: pg_basebackup.c:891
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "ο ρυθμός μεταφοράς πρέπει να είναι μεγαλύτερος από μηδέν"
+
+#: pg_basebackup.c:923
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "μη έγκυρη μονάδα --max-rate: «%s»"
+
+#: pg_basebackup.c:930
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "ο ρυθμός μεταφοράς «%s» υπερβαίνει το εύρος ακεραίων"
+
+#: pg_basebackup.c:940
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "ο ρυθμός μεταφοράς «%s» βρίσκεται εκτός εύρους τιμών"
+
+#: pg_basebackup.c:961
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "δεν ήταν δυνατή η λήψη ροής δεδομένων COPY: %s"
+
+#: pg_basebackup.c:981 pg_recvlogical.c:435 pg_recvlogical.c:607
+#: receivelog.c:973
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "δεν ήταν δυνατή η ανάγνωση δεδομένων COPY: %s"
+
+#: pg_basebackup.c:1007
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "δεν ήταν δυνατή η εγγραφή σε συμπιεσμένο αρχείο «%s»: %s"
+
+#: pg_basebackup.c:1071
+#, c-format
+msgid "could not duplicate stdout: %m"
+msgstr "δεν ήταν δυνατή η αναπαραγωγή τυπικής εξόδου: %m"
+
+#: pg_basebackup.c:1078
+#, c-format
+msgid "could not open output file: %m"
+msgstr "δεν ήταν δυνατό το άνοιγμα αρχείου εξόδου %m"
+
+#: pg_basebackup.c:1085 pg_basebackup.c:1106 pg_basebackup.c:1135
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "δεν ήταν δυνατή η ρύθμιση επιπέδου συμπίεσης %d: %s"
+
+#: pg_basebackup.c:1155
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "δεν ήταν δυνατή η δημιουργία συμπιεσμένου αρχείου «%s»: %s"
+
+#: pg_basebackup.c:1267
+#, c-format
+msgid "could not close compressed file \"%s\": %s"
+msgstr "δεν ήταν δυνατό το κλείσιμο του συμπιεσμένου αρχείου «%s»: %s"
+
+#: pg_basebackup.c:1279 pg_recvlogical.c:632
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "δεν ήταν δυνατό το κλείσιμο του αρχείου «%s»: %m"
+
+#: pg_basebackup.c:1541
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "η ροή COPY τερματίστηκε πριν ολοκληρωθεί το τελευταίο αρχείο"
+
+#: pg_basebackup.c:1570
+#, c-format
+msgid "invalid tar block header size: %zu"
+msgstr "μη έγκυρο μέγεθος κεφαλίδας μπλοκ tar: %zu"
+
+#: pg_basebackup.c:1627
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "δεν ήταν δυνατή η ανάγνωση δικαιωμάτων του καταλόγου «%s»: %m"
+
+#: pg_basebackup.c:1651
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "δεν ήταν δυνατή η δημιουργία συμβολικού συνδέσμου από «%s» σε «%s»: %m"
+
+#: pg_basebackup.c:1658
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "μη αναγνωρίσιμος δείκτης σύνδεσης «%c»"
+
+#: pg_basebackup.c:1677
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "δεν ήταν δυνατός ο ορισμός δικαιωμάτων στο αρχείο «%s»: %m"
+
+#: pg_basebackup.c:1831
+#, c-format
+msgid "incompatible server version %s"
+msgstr "μη συμβατή έκδοση διακομιστή %s"
+
+#: pg_basebackup.c:1846
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr "ΥΠΟΔΕΙΞΗ: χρησιμοποίησε -X none ή -X fetch για την απενεργοποίηση της ροής καταγραφής"
+
+#: pg_basebackup.c:1882
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr "έναρξη δημιουργίας αντιγράφων ασφαλείας βάσης, αναμονή ολοκλήρωσης του σημείου ελέγχου"
+
+#: pg_basebackup.c:1908 pg_recvlogical.c:262 receivelog.c:489 receivelog.c:538
+#: receivelog.c:577 streamutil.c:297 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "δεν ήταν δυνατή η αποστολή εντολής αναπαραγωγής «%s»: %s"
+
+#: pg_basebackup.c:1919
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "δεν ήταν δυνατή η έναρξη αντιγράφου ασφαλείας βάσης: %s"
+
+#: pg_basebackup.c:1925
+#, c-format
+msgid "server returned unexpected response to BASE_BACKUP command; got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "ο διακομιστής επέστρεψε μη αναμενόμενη απόκριση στην εντολή BASE_BACKUP· έλαβε %d σειρές και %d πεδία, ανέμενε %d σειρές και %d πεδία"
+
+#: pg_basebackup.c:1933
+#, c-format
+msgid "checkpoint completed"
+msgstr "ολοκληρώθηκε το σημείο ελέγχου"
+
+#: pg_basebackup.c:1948
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "σημείο εκκίνησης write-ahead: %s στην χρονογραμμή %u"
+
+#: pg_basebackup.c:1957
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "δεν ήταν δυνατή η απόκτηση κεφαλίδας αντιγράφου ασφαλείας: %s"
+
+#: pg_basebackup.c:1963
+#, c-format
+msgid "no data returned from server"
+msgstr "δεν επιστράφηκαν δεδομένα από τον διακομιστή"
+
+#: pg_basebackup.c:1995
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr "μπορεί να γράψει μόνο έναν πινακοχώρο στην τυπική έξοδο, η βάση δεδομένων διαθέτει %d"
+
+#: pg_basebackup.c:2007
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "εκκίνηση λήψης WAL στο παρασκήνιο"
+
+#: pg_basebackup.c:2046
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr "δεν ήταν δυνατή η απόκτηση τελικής θέσης write-ahead log από τον διακομιστή: %s"
+
+#: pg_basebackup.c:2052
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "δεν επιστράφηκε τελική θέση write-ahead log από τον διακομιστή"
+
+#: pg_basebackup.c:2057
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "τελικό σημείο write-ahead log: %s"
+
+#: pg_basebackup.c:2068
+#, c-format
+msgid "checksum error occurred"
+msgstr "προέκυψε σφάλμα αθροίσματος ελέγχου"
+
+#: pg_basebackup.c:2073
+#, c-format
+msgid "final receive failed: %s"
+msgstr "απέτυχε η τελική λήψη: %s"
+
+#: pg_basebackup.c:2097
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "αναμένει τη διαδικασία παρασκηνίου να ολοκληρώσει τη ροή ..."
+
+#: pg_basebackup.c:2102
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "δεν ήταν δυνατή η αποστολή της εντολής σε pipe παρασκηνίου: %m"
+
+#: pg_basebackup.c:2110
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "δεν ήταν δυνατή η αναμονή απογονικής διεργασίας: %m"
+
+#: pg_basebackup.c:2115
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "απόγονος %d πέθανε, ανέμενε %d"
+
+#: pg_basebackup.c:2120 streamutil.c:92 streamutil.c:203
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2145
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "δεν ήταν δυνατή η αναμονή απογονικού νήματος: %m"
+
+#: pg_basebackup.c:2151
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "δεν ήταν δυνατή η απόκτηση κατάστασης εξόδου απογονικού νήματος: %m"
+
+#: pg_basebackup.c:2156
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "το απογονικό νήμα εξήλθε με σφάλμα %u"
+
+#: pg_basebackup.c:2184
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "συγχρονίζονται δεδομένα στο δίσκο …"
+
+#: pg_basebackup.c:2209
+#, c-format
+msgid "renaming backup_manifest.tmp to backup_manifest"
+msgstr "μετονομάζει backup_manifest.tmp σε backup_manifest"
+
+#: pg_basebackup.c:2220
+#, c-format
+msgid "base backup completed"
+msgstr "ολοκληρώθηκε το αντίγραφο ασφαλείας βάσης"
+
+#: pg_basebackup.c:2305
+#, c-format
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\""
+msgstr "μη έγκυρη μορφή εξόδου «%s», πρέπει να είναι «plain» ή «tar»"
+
+#: pg_basebackup.c:2349
+#, c-format
+msgid "invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr "μη έγκυρη επιλογή μεθόδου wal «%s», πρέπει να είναι «fetch», «stream», ή «none»"
+
+#: pg_basebackup.c:2377 pg_receivewal.c:580
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "μη έγκυρο επίπεδο συμπίεσης «%s»"
+
+#: pg_basebackup.c:2388
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr "μη έγκυρη παράμετρος σημείου ελέγχου «%s», πρέπει να είναι «fast» ή «spread»"
+
+#: pg_basebackup.c:2415 pg_receivewal.c:555 pg_recvlogical.c:820
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "μη έγκυρο διάστημα status «%s»"
+
+#: pg_basebackup.c:2445 pg_basebackup.c:2458 pg_basebackup.c:2469
+#: pg_basebackup.c:2480 pg_basebackup.c:2488 pg_basebackup.c:2496
+#: pg_basebackup.c:2506 pg_basebackup.c:2519 pg_basebackup.c:2528
+#: pg_basebackup.c:2539 pg_basebackup.c:2549 pg_basebackup.c:2567
+#: pg_basebackup.c:2576 pg_basebackup.c:2585 pg_receivewal.c:605
+#: pg_receivewal.c:618 pg_receivewal.c:626 pg_receivewal.c:636
+#: pg_receivewal.c:644 pg_receivewal.c:655 pg_recvlogical.c:846
+#: pg_recvlogical.c:859 pg_recvlogical.c:870 pg_recvlogical.c:878
+#: pg_recvlogical.c:886 pg_recvlogical.c:894 pg_recvlogical.c:902
+#: pg_recvlogical.c:910 pg_recvlogical.c:918
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Δοκιμάστε «%s --help» για περισσότερες πληροφορίες.\n"
+
+#: pg_basebackup.c:2456 pg_receivewal.c:616 pg_recvlogical.c:857
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "πάρα πολλές παράμετροι εισόδου από την γραμμή εντολών (η πρώτη είναι η «%s»)"
+
+#: pg_basebackup.c:2468 pg_receivewal.c:654
+#, c-format
+msgid "no target directory specified"
+msgstr "δεν καθορίστηκε κατάλογος δεδομένων προορισμού"
+
+#: pg_basebackup.c:2479
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "μόνο τα αντίγραφα ασφαλείας tar μπορούν να συμπιεστούν"
+
+#: pg_basebackup.c:2487
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "δεν είναι δυνατή η ροή write-ahead logs σε λειτουργία tar στην τυπική έξοδο"
+
+#: pg_basebackup.c:2495
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "οι υποδοχές αναπαραγωγής μπορούν να χρησιμοποιηθούν μόνο με ροή WAL"
+
+#: pg_basebackup.c:2505
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "--no-slot δεν μπορεί να χρησιμοποιηθεί σε συνδυασμό με όνομα υποδοχής"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2517 pg_receivewal.c:634
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "%s χρειάζεται να έχει οριστεί μία υποδοχή με --slot"
+
+#: pg_basebackup.c:2526 pg_basebackup.c:2565 pg_basebackup.c:2574
+#: pg_basebackup.c:2583
+#, c-format
+msgid "%s and %s are incompatible options"
+msgstr "%s και %s αποτελούν μη συμβατές επιλογές"
+
+#: pg_basebackup.c:2538
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "η τοποθεσία του καταλόγου WAL μπορεί να καθοριστεί μόνο σε λειτουργία plain"
+
+#: pg_basebackup.c:2548
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "η τοποθεσία του καταλόγου WAL πρέπει να είναι μία πλήρης διαδρομή"
+
+#: pg_basebackup.c:2558 pg_receivewal.c:663
+#, c-format
+msgid "this build does not support compression"
+msgstr "η παρούσα κατασκευή δεν υποστηρίζει συμπίεση"
+
+#: pg_basebackup.c:2643
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "δεν ήταν δυνατή η δημιουργία του συμβολικού συνδέσμου «%s»: %m"
+
+#: pg_basebackup.c:2647
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "συμβολικοί σύνδεσμοι δεν υποστηρίζονται στην παρούσα πλατφόρμα"
+
+#: pg_receivewal.c:77
+#, c-format
+msgid ""
+"%s receives PostgreSQL streaming write-ahead logs.\n"
+"\n"
+msgstr ""
+"%s λαμβάνει ροές PostgreSQL write-ahead logs.\n"
+"\n"
+
+#: pg_receivewal.c:81 pg_recvlogical.c:81
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Επιλογές:\n"
+
+#: pg_receivewal.c:82
+#, c-format
+msgid " -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr " -D, --directory=DIR να λάβει αρχεία write-ahead log files into this directory\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:82
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr " -E, --endpos=LSN έξοδος μετά τη λήψη του καθορισμένου LSN\n"
+
+#: pg_receivewal.c:84 pg_recvlogical.c:86
+#, c-format
+msgid " --if-not-exists do not error if slot already exists when creating a slot\n"
+msgstr " --if-not-exists μην θεωρηθεί ώς σφάλμα η ήδη ύπαρξη υποδοχής κατά τη δημιουργία μιας υποδοχής\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:88
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop να μην εισέλθει σε βρόχο κατά την απώλεια σύνδεσης\n"
+
+#: pg_receivewal.c:86
+#, c-format
+msgid " --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " --no-sync να μην αναμένει την ασφαλή εγγραφή αλλαγών στον δίσκο\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:93
+#, c-format
+msgid ""
+" -s, --status-interval=SECS\n"
+" time between status packets sent to server (default: %d)\n"
+msgstr ""
+" -s, --status-interval=SECS\n"
+" χρόνος μεταξύ πακέτων κατάστασης που αποστέλλονται στο διακομιστή (προεπιλογή: %d)\n"
+
+#: pg_receivewal.c:90
+#, c-format
+msgid " --synchronous flush write-ahead log immediately after writing\n"
+msgstr " --synchronous flush write-ahead log αμέσως μετά τη γραφή\n"
+
+#: pg_receivewal.c:93
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr " -Z, --compress=0-9 συμπίεσε logs με το ορισμένο επίπεδο συμπίεσης\n"
+
+#: pg_receivewal.c:102
+#, c-format
+msgid ""
+"\n"
+"Optional actions:\n"
+msgstr ""
+"\n"
+"Προαιρετικές δράσεις:\n"
+
+#: pg_receivewal.c:103 pg_recvlogical.c:78
+#, c-format
+msgid " --create-slot create a new replication slot (for the slot's name see --slot)\n"
+msgstr " --create-slot δημιούργησε μια νέα υποδοχή αναπαραγωγής (για το όνομα της υποδοχής, δείτε --slot)\n"
+
+#: pg_receivewal.c:104 pg_recvlogical.c:79
+#, c-format
+msgid " --drop-slot drop the replication slot (for the slot's name see --slot)\n"
+msgstr " --drop-slot εγκατάληψη της υποδοχής αναπαραγωγής (για το όνομα της υποδοχής δείτε --slot)\n"
+
+#: pg_receivewal.c:117
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "τελείωσε το τμήμα σε %X/%X (χρονογραμμή %u)"
+
+#: pg_receivewal.c:124
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "διακοπή ροής αρχείων καταγραφής σε %X/%X (χρονογραμμή %u)"
+
+#: pg_receivewal.c:140
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "μεταπήδησε στη χρονογραμμή %u στο %X/%X"
+
+#: pg_receivewal.c:150
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "λήψη σήματος διακοπής, έξοδος"
+
+#: pg_receivewal.c:186
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "δεν ήταν δυνατό το κλείσιμο του καταλόγου «%s»: %m"
+
+#: pg_receivewal.c:272
+#, c-format
+msgid "segment file \"%s\" has incorrect size %lld, skipping"
+msgstr "το αρχείο τμήματος «%s» έχει εσφαλμένο μέγεθος %lld, θα παραληφθεί"
+
+#: pg_receivewal.c:290
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "δεν ήταν δυνατό το άνοιγμα του συμπιεσμένου αρχείου «%s»: %m"
+
+#: pg_receivewal.c:296
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "δεν ήταν δυνατή η αναζήτηση στο συμπιεσμένο αρχείο «%s»: %m"
+
+#: pg_receivewal.c:304
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "δεν ήταν δυνατή η ανάγνωση του συμπιεσμένου αρχείου «%s»: %m"
+
+#: pg_receivewal.c:307
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "δεν ήταν δυνατή η ανάγνωση του συμπιεσμένου αρχείου «%s»: ανέγνωσε %d από %zu"
+
+#: pg_receivewal.c:318
+#, c-format
+msgid "compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr "συμπιεσμένο αρχείο τμήματος «%s» έχει εσφαλμένο μη συμπιεσμένο μέγεθος %d, θα παραληφθεί"
+
+#: pg_receivewal.c:422
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "έναρξη ροής αρχείων καταγραφής σε %X/%X (χρονογραμμή %u)"
+
+#: pg_receivewal.c:537 pg_recvlogical.c:762
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "μη έγκυρος αριθμός πύλης: «%s»"
+
+#: pg_receivewal.c:565 pg_recvlogical.c:788
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "δεν ήταν δυνατή η ανάλυση της τελικής τοποθεσίας «%s»"
+
+#: pg_receivewal.c:625
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "δεν είναι δυνατή η χρήση --create-slot σε συνδυασμό με --drop-slot"
+
+#: pg_receivewal.c:643
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "δεν είναι δυνατή η χρήση --synchronous σε συνδυασμό με --no-sync"
+
+#: pg_receivewal.c:719
+#, c-format
+msgid "replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr "η σύνδεση αναπαραγωγής χρησιμοποιώντας την υποδοχή «%s» είναι απροσδόκητα συνυφασμένη με βάση δεδομένων"
+
+#: pg_receivewal.c:730 pg_recvlogical.c:966
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "κατάργηση υποδοχής αναπαραγωγής «%s»"
+
+#: pg_receivewal.c:741 pg_recvlogical.c:976
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "δημιουργία υποδοχής αναπαραγωγής «%s»"
+
+#: pg_receivewal.c:767 pg_recvlogical.c:1001
+#, c-format
+msgid "disconnected"
+msgstr "αποσυνδέθηκε"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:773 pg_recvlogical.c:1007
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "αποσυνδέθηκε· αναμένει %d δεύτερα για να προσπαθήσει ξανά"
+
+#: pg_recvlogical.c:73
+#, c-format
+msgid ""
+"%s controls PostgreSQL logical decoding streams.\n"
+"\n"
+msgstr ""
+"%s ελέγχει ροές λογικής αποκωδικοποίησης PostgreSQL.\n"
+"\n"
+
+#: pg_recvlogical.c:77
+#, c-format
+msgid ""
+"\n"
+"Action to be performed:\n"
+msgstr ""
+"\n"
+"Δράση που θα πραγματοποιηθεί:\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid " --start start streaming in a replication slot (for the slot's name see --slot)\n"
+msgstr " --start εκκίνηση ροής σε μια υποδοχή αναπαραγωγής (για το όνομα της υποδοχής δείτε --slot)\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr " -f, --file=FILE λάβε το log σε αυτό το αρείο, - για τυπική έξοδο\n"
+
+#: pg_recvlogical.c:84
+#, c-format
+msgid ""
+" -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: %d)\n"
+msgstr ""
+" -F --fsync-interval=SECS\n"
+" χρόνος μεταξύ fsyncs του αρχείου εξόδου (προεπιλογή: %d)\n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid " -I, --startpos=LSN where in an existing slot should the streaming start\n"
+msgstr " -I, --startpos=LSN από πού θα ξεκινήσει η ροή σε μια υπάρχουσα υποδοχή\n"
+
+#: pg_recvlogical.c:89
+#, c-format
+msgid ""
+" -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr ""
+" -o, --option=NAME[=VALUE]\n"
+" πέρασε την επιλογή NAME με προαιρετική τιμή VALUE στο\n"
+" plugin εξόδου\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr " -P, --plugin=PLUGIN χρησιμοποίησε το plugin εξόδου PLUGIN (προεπιλογή: %s)\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=SLOTNAME όνομα της λογικής υποδοχής αναπαραγωγής\n"
+
+#: pg_recvlogical.c:100
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=DBNAME βάσης δεδομένων για να συνδεθεί\n"
+
+#: pg_recvlogical.c:133
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "επιβεβαίωση εγγραφής έως %X/%X, flush σε %X/%X (υποδοχή %s)"
+
+#: pg_recvlogical.c:157 receivelog.c:351
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "δεν ήταν δυνατή η αποστολή πακέτου σχολίων: %s"
+
+#: pg_recvlogical.c:230
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "έναρξη ροής αρχείων καταγραφής σε %X/%X (υποδοχή %s)"
+
+#: pg_recvlogical.c:271
+#, c-format
+msgid "streaming initiated"
+msgstr "έναρξη ροής"
+
+#: pg_recvlogical.c:335
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "δεν ήταν δυνατό το άνοιγμα του αρχείου καταγραφής «%s»: %m"
+
+#: pg_recvlogical.c:361 receivelog.c:881
+#, c-format
+msgid "invalid socket: %s"
+msgstr "άκυρος υποδοχέας: %s"
+
+#: pg_recvlogical.c:414 receivelog.c:909
+#, c-format
+msgid "%s() failed: %m"
+msgstr "%s() απέτυχε: %m"
+
+#: pg_recvlogical.c:421 receivelog.c:959
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "δεν ήταν δυνατή η λήψη δεδομένων από τη ροή WAL: %s"
+
+#: pg_recvlogical.c:463 pg_recvlogical.c:514 receivelog.c:1003
+#: receivelog.c:1069
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "πολύ μικρή κεφαλίδα ροής: %d"
+
+#: pg_recvlogical.c:498 receivelog.c:841
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "μη αναγνωρίσιμη κεφαλίδα ροής: «%c»"
+
+#: pg_recvlogical.c:552 pg_recvlogical.c:564
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "δεν ήταν δυνατή η εγγραφή %u bytes στο αρχείο καταγραφής «%s»: %m"
+
+#: pg_recvlogical.c:618 receivelog.c:637 receivelog.c:674
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "μη αναμενόμενος τερματισμός της ροής αναπαραγωγής: %s"
+
+#: pg_recvlogical.c:742
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "μη έγκυρο διάστημα FSYNC «%s»"
+
+#: pg_recvlogical.c:780
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "δεν ήταν δυνατή η ανάλυση της θέσης έναρξης «%s»"
+
+#: pg_recvlogical.c:869
+#, c-format
+msgid "no slot specified"
+msgstr "δεν καθορίστηκε υποδοχή"
+
+#: pg_recvlogical.c:877
+#, c-format
+msgid "no target file specified"
+msgstr "δεν καθορίστηκε αρχείο προορισμού"
+
+#: pg_recvlogical.c:885
+#, c-format
+msgid "no database specified"
+msgstr "δεν καθορίστηκε βάση δεδομένων"
+
+#: pg_recvlogical.c:893
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "πρέπει να οριστεί τουλάχιστον μία πράξη"
+
+#: pg_recvlogical.c:901
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr "δεν είναι δυνατή η χρήση --create-slot ή --start σε συνδυασμό με --drop-slot"
+
+#: pg_recvlogical.c:909
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr "δεν είναι δυνατή η χρήση --create-slot ή --start σε συνδυασμό με --startpos"
+
+#: pg_recvlogical.c:917
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "--endpos μπορεί να καθοριστεί μόνο με --start"
+
+#: pg_recvlogical.c:948
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr "δεν ήταν δυνατή η δημιουργία σύνδεσης αναπαραγωγής συγκεκριμένης βάσης δεδομένων"
+
+#: pg_recvlogical.c:1047
+#, c-format
+msgid "end position %X/%X reached by keepalive"
+msgstr "τελική θέση %X/%X που επιτεύχθηκε από keepalive"
+
+#: pg_recvlogical.c:1050
+#, c-format
+msgid "end position %X/%X reached by WAL record at %X/%X"
+msgstr "τελική θέση %X/%X που επιτεύχθηκε από εγγραφή WAL στο %X/%X"
+
+#: receivelog.c:68
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "δεν ήταν δυνατή η δημιουργία αρχείου κατάστασης αρχειοθήκης «%s»: %s"
+
+#: receivelog.c:118
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "δεν ήταν δυνατή η απόκτηση μεγέθους του υπάρχοντος αρχείου write-ahead log «%s»: %s"
+
+#: receivelog.c:129
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "δεν ήταν δυνατό το άνοιγμα του υπάρχοντος αρχείου write-ahead log «%s»: %s"
+
+#: receivelog.c:138
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr "δεν ήταν δυνατό το fsync του υπάρχοντος αρχείου write-ahead log «%s»: %s"
+
+#: receivelog.c:153
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] "το αρχείο write-ahead log «%s» έχει %d byte, θα έπρεπε να είναι 0 ή %d"
+msgstr[1] "το αρχείο write-ahead log «%s» έχει %d bytes, θα έπρεπε να είναι 0 ή %d"
+
+#: receivelog.c:169
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "δεν ήταν δυνατό το άνοιγμα του αρχείου write-ahead log «%s»: %s"
+
+#: receivelog.c:197
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "δεν ήταν δυνατός ο προσδιορισμός της θέσης αναζήτησης στο αρχείο «%s»: %s"
+
+#: receivelog.c:211
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "δεν μετονομάζει \"%s%s\", το τμήμα δεν είναι πλήρες"
+
+#: receivelog.c:223 receivelog.c:308 receivelog.c:683
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "δεν ήταν δυνατό το κλείσιμο του αρχείου «%s»: %s"
+
+#: receivelog.c:280
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "ο διακομιστής ανέφερε μη αναμενόμενο όνομα αρχείου ιστορικού για την χρονογραμμή %u: %s"
+
+#: receivelog.c:288
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "δεν ήταν δυνατή η δημιουργία αρχείου ιστορικού χρονογραμμής «%s»: %s"
+
+#: receivelog.c:295
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "δεν ήταν δυνατή η εγγραφή αρχείου ιστορικού χρονογραμμής «%s»: %s"
+
+#: receivelog.c:385
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions older than %s"
+msgstr "μη συμβατή έκδοση διακομιστή %s· Ο πελάτης δεν υποστηρίζει ροή από εκδόσεις διακομιστών παλαιότερες από %s"
+
+#: receivelog.c:394
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions newer than %s"
+msgstr "μη συμβατή έκδοση διακομιστή %s· Ο πελάτης δεν υποστηρίζει ροή από εκδόσεις διακομιστών νεότερες από %s"
+
+#: receivelog.c:496 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid "could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "δεν ήταν δυνατή η αναγνώριση του συστήματος: έλαβε %d σειρές και %d πεδία, ανέμενε %d σειρές και %d ή περισσότερα πεδία"
+
+#: receivelog.c:503
+#, c-format
+msgid "system identifier does not match between base backup and streaming connection"
+msgstr "το αναγνωριστικό συστήματος δεν αντιστοιχεί μεταξύ βασικού αντιγράφου ασφαλείας και σύνδεσης ροής"
+
+#: receivelog.c:509
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "η χρονογραμμή εκκίνησης %u δεν υπάρχει στο διακομιστή"
+
+#: receivelog.c:550
+#, c-format
+msgid "unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "μη αναμενόμενη απόκριση στην εντολή TIMELINE_HISTORY: έλαβε %d σειρές και %d πεδία, ανέμενε %d σειρές και %d πεδία"
+
+#: receivelog.c:621
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "ο διακομιστής ανέφερε απροσδόκητη επόμενη χρονογραμμή %u, ακολουθώντας τη χρονογραμμή %u"
+
+#: receivelog.c:627
+#, c-format
+msgid "server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"
+msgstr "ο διακομιστής σταμάτησε τη ροή χρονογραμμής %u στο %X/%X, αλλά ανέφερε ότι η επόμενη χρονογραμμή %u να ξεκινήσει από το %X/%X"
+
+#: receivelog.c:667
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "η ροή αναπαραγωγής τερματίστηκε πριν από το σημείο διακοπής"
+
+#: receivelog.c:713
+#, c-format
+msgid "unexpected result set after end-of-timeline: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "μη αναμενόμενο σύνολο αποτελεσμάτων μετά το τέλος της χρονογραμμής: έλαβε %d σειρές και %d πεδία, ανέμενε %d σειρές και %d πεδία"
+
+#: receivelog.c:722
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "δεν ήταν δυνατή η ανάλυση του σημείου εκκίνησης «%s» της επόμενης χρονογραμμής"
+
+#: receivelog.c:771 receivelog.c:1023
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "δεν ήταν δυνατή η εκτέλεση της εντολής fsync στο αρχείο «%s»: %s"
+
+#: receivelog.c:1086
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "έλαβε εγγραφή write-ahead log για μετατόπιση %u χωρίς ανοικτό αρχείου"
+
+#: receivelog.c:1096
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "έλαβε μετατόπιση δεδομένων WAL %08x, ανέμενε %08x"
+
+#: receivelog.c:1130
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "δεν ήταν δυνατή η εγγραφή %u bytes στο αρχείο WAL «%s»: %s"
+
+#: receivelog.c:1155 receivelog.c:1195 receivelog.c:1225
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "δεν ήταν δυνατή η αποστολή πακέτου copy-end: %s"
+
+#: streamutil.c:162
+msgid "Password: "
+msgstr "Κωδικός πρόσβασης: "
+
+#: streamutil.c:186
+#, c-format
+msgid "could not connect to server"
+msgstr "δεν ήταν δυνατή η σύνδεση με το διακομιστή"
+
+#: streamutil.c:231
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "δεν ήταν δυνατή η εκκαθάριση του search_path: %s"
+
+#: streamutil.c:247
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "δεν ήταν δυνατός ο προσδιορισμός της ρύθμισης διακομιστή για integer_datetimes"
+
+#: streamutil.c:254
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "η επισήμανση μεταγλώττισης integer_datetimes δεν συμφωνεί με το διακομιστή"
+
+#: streamutil.c:305
+#, c-format
+msgid "could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "δεν ήταν δυνατή η λήψη μεγέθους τμήματος WAL: %d σειρές και %d πεδία, ανέμενε %d σειρές και %d ή περισσότερα πεδία"
+
+#: streamutil.c:315
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "δεν ήταν δυνατή η ανάλυση του μεγέθους του τμήματος WAL"
+
+#: streamutil.c:333
+#, c-format
+msgid "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"
+msgid_plural "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"
+msgstr[0] "το μέγεθος τμήματος WAL πρέπει να έχει τιμή δύναμη του δύο μεταξύ 1 MB και 1 GB, αλλά ο απομακρυσμένος διακομιστής ανέφερε τιμή %d byte"
+msgstr[1] "το μέγεθος τμήματος WAL πρέπει να έχει τιμή δύναμη του δύο μεταξύ 1 MB και 1 GB, αλλά ο απομακρυσμένος διακομιστής ανέφερε τιμή %d bytes"
+
+#: streamutil.c:378
+#, c-format
+msgid "could not fetch group access flag: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "δεν ήταν δυνατή η λήψη επισήμανσης πρόσβασης group: %d σειρές και %d πεδία, ανέμενε %d σειρές και %d ή περισσότερα πεδία"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "δεν ήταν δυνατή η ανάλυση της σημαίας πρόσβασης γκρουπ: %s"
+
+#: streamutil.c:544
+#, c-format
+msgid "could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "δεν ήταν δυνατή η δημιουργία της υποδοχής αναπαραγωγής «%s»: %d σειρές και %d πεδία, ανέμενε %d σειρές και %d πεδία"
+
+#: streamutil.c:588
+#, c-format
+msgid "could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "δεν ήταν δυνατή η κατάργηση της υποδοχής αναπαραγωγής «%s»: έλαβε %d σειρές και %d πεδία, ανέμενε %d σειρές και %d πεδία"
+
+#: walmethods.c:467 walmethods.c:980
+msgid "could not compress data"
+msgstr "δεν ήταν δυνατή η συμπίεση δεδομένων"
+
+#: walmethods.c:499
+msgid "could not reset compression stream"
+msgstr "δεν ήταν δυνατή η επαναφορά της ροής συμπίεσης"
+
+#: walmethods.c:608
+msgid "could not initialize compression library"
+msgstr "δεν ήταν δυνατή η αρχικοποίηση της βιβλιοθήκης συμπίεσης"
+
+#: walmethods.c:620
+msgid "implementation error: tar files can't have more than one open file"
+msgstr "σφάλμα υλοποίησης: τα αρχεία tar δεν μπορούν να έχουν περισσότερα από ένα ανοιχτά αρχεία"
+
+#: walmethods.c:634
+msgid "could not create tar header"
+msgstr "δεν ήταν δυνατή η δημιουργία κεφαλίδας tar"
+
+#: walmethods.c:650 walmethods.c:692 walmethods.c:895 walmethods.c:907
+msgid "could not change compression parameters"
+msgstr "δεν ήταν δυνατή η αλλαγή παραμέτρων συμπίεσης"
+
+#: walmethods.c:782
+msgid "unlink not supported with compression"
+msgstr "το unlink δεν υποστηρίζεται με συμπίεση"
+
+#: walmethods.c:1005
+msgid "could not close compression stream"
+msgstr "δεν ήταν δυνατό το κλείσιμο της ροής συμπίεσης"
diff --git a/src/bin/pg_basebackup/po/es.po b/src/bin/pg_basebackup/po/es.po
new file mode 100644
index 0000000..9201483
--- /dev/null
+++ b/src/bin/pg_basebackup/po/es.po
@@ -0,0 +1,1487 @@
+# Spanish message translation file for pg_basebackup
+#
+# Copyright (c) 2011-2021, PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Álvaro Herrera <alvherre@alvh.no-ip.org>, 2011-2014.
+# Carlos Chapi <carlos.chapi@2ndquadrant.com>, 2017, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_basebackup (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-08-07 20:33+0000\n"
+"PO-Revision-Date: 2022-01-12 17:29-0500\n"
+"Last-Translator: Carlos Chapi <carloswaldo@babelruins.org>\n"
+"Language-Team: PgSQL-es-Ayuda <pgsql-es-ayuda@lists.postgresql.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: BlackCAT 1.1\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "fatal: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "error: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "precaución: "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98 ../../common/fe_memutils.c:162
+#, c-format
+msgid "out of memory\n"
+msgstr "memoria agotada\n"
+
+#: ../../common/fe_memutils.c:92 ../../common/fe_memutils.c:154
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "no se puede duplicar un puntero nulo (error interno)\n"
+
+#: ../../common/file_utils.c:87 ../../common/file_utils.c:451
+#: pg_receivewal.c:266 pg_recvlogical.c:339
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "no se pudo hacer stat al archivo «%s»: %m"
+
+#: ../../common/file_utils.c:166 pg_receivewal.c:169
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "no se pudo abrir el directorio «%s»: %m"
+
+#: ../../common/file_utils.c:200 pg_receivewal.c:337
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "no se pudo leer el directorio «%s»: %m"
+
+#: ../../common/file_utils.c:232 ../../common/file_utils.c:291
+#: ../../common/file_utils.c:365 ../../fe_utils/recovery_gen.c:134
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "no se pudo abrir el archivo «%s»: %m"
+
+#: ../../common/file_utils.c:303 ../../common/file_utils.c:373
+#: pg_recvlogical.c:193
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "no se pudo sincronizar (fsync) archivo «%s»: %m"
+
+#: ../../common/file_utils.c:383
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "no se pudo renombrar el archivo de «%s» a «%s»: %m"
+
+#: ../../fe_utils/recovery_gen.c:35 ../../fe_utils/recovery_gen.c:49
+#: ../../fe_utils/recovery_gen.c:77 ../../fe_utils/recovery_gen.c:100
+#: ../../fe_utils/recovery_gen.c:171 pg_basebackup.c:1248
+#, c-format
+msgid "out of memory"
+msgstr "memoria agotada"
+
+#: ../../fe_utils/recovery_gen.c:140 pg_basebackup.c:1021 pg_basebackup.c:1715
+#: pg_basebackup.c:1771
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "no se pudo escribir a archivo «%s»: %m"
+
+#: ../../fe_utils/recovery_gen.c:152 pg_basebackup.c:1166 pg_basebackup.c:1672
+#: pg_basebackup.c:1748
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "no se pudo crear archivo «%s»: %m"
+
+#: pg_basebackup.c:224
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "eliminando el directorio de datos «%s»"
+
+#: pg_basebackup.c:226
+#, c-format
+msgid "failed to remove data directory"
+msgstr "no se pudo eliminar el directorio de datos"
+
+#: pg_basebackup.c:230
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "eliminando el contenido del directorio «%s»"
+
+#: pg_basebackup.c:232
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "no se pudo eliminar el contenido del directorio de datos"
+
+#: pg_basebackup.c:237
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "eliminando el directorio de WAL «%s»"
+
+#: pg_basebackup.c:239
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "no se pudo eliminar el directorio de WAL"
+
+#: pg_basebackup.c:243
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "eliminando el contenido del directorio de WAL «%s»"
+
+#: pg_basebackup.c:245
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "no se pudo eliminar el contenido del directorio de WAL"
+
+#: pg_basebackup.c:251
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "directorio de datos «%s» no eliminado a petición del usuario"
+
+#: pg_basebackup.c:254
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "directorio de WAL «%s» no eliminado a petición del usuario"
+
+#: pg_basebackup.c:258
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "los cambios a los directorios de tablespaces no se desharán"
+
+#: pg_basebackup.c:299
+#, c-format
+msgid "directory name too long"
+msgstr "nombre de directorio demasiado largo"
+
+#: pg_basebackup.c:309
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "múltiples signos «=» en mapeo de tablespace"
+
+#: pg_basebackup.c:321
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr "formato de mapeo de tablespace «%s» no válido, debe ser «ANTIGUO=NUEVO»"
+
+#: pg_basebackup.c:333
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr "directorio antiguo no es una ruta absoluta en mapeo de tablespace: %s"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr "directorio nuevo no es una ruta absoluta en mapeo de tablespace: %s"
+
+#: pg_basebackup.c:379
+#, c-format
+msgid ""
+"%s takes a base backup of a running PostgreSQL server.\n"
+"\n"
+msgstr ""
+"%s obtiene un respaldo base a partir de un servidor PostgreSQL en ejecución.\n"
+"\n"
+
+#: pg_basebackup.c:381 pg_receivewal.c:79 pg_recvlogical.c:75
+#, c-format
+msgid "Usage:\n"
+msgstr "Empleo:\n"
+
+#: pg_basebackup.c:382 pg_receivewal.c:80 pg_recvlogical.c:76
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s [OPCIÓN]...\n"
+
+#: pg_basebackup.c:383
+#, c-format
+msgid ""
+"\n"
+"Options controlling the output:\n"
+msgstr ""
+"\n"
+"Opciones que controlan la salida:\n"
+
+#: pg_basebackup.c:384
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, --pgdata=DIR directorio en el cual recibir el respaldo base\n"
+
+#: pg_basebackup.c:385
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr " -F, --format=p|t formato de salida (plano (por omisión), tar)\n"
+
+#: pg_basebackup.c:386
+#, c-format
+msgid ""
+" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr ""
+" -r, --max-rate=TASA máxima tasa a la que transferir el directorio de datos\n"
+" (en kB/s, o use sufijos «k» o «M»)\n"
+
+#: pg_basebackup.c:388
+#, c-format
+msgid ""
+" -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr ""
+" -R, --write-recovery-conf\n"
+" escribe configuración para replicación\n"
+
+#: pg_basebackup.c:390
+#, c-format
+msgid ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr ""
+" -T, --tablespace-mapping=ANTIGUO=NUEVO\n"
+" reubicar el directorio de tablespace de ANTIGUO a NUEVO\n"
+
+#: pg_basebackup.c:392
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr " --waldir=DIRWAL ubicación para el directorio WAL\n"
+
+#: pg_basebackup.c:393
+#, c-format
+msgid ""
+" -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr ""
+" -X, --wal-method=none|fetch|stream\n"
+" incluye los archivos WAL necesarios,\n"
+" en el modo especificado\n"
+
+#: pg_basebackup.c:395
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr " -z, --gzip comprimir la salida de tar\n"
+
+#: pg_basebackup.c:396
+#, c-format
+msgid " -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr " -Z, --compress=0-9 comprimir salida tar con el nivel de compresión dado\n"
+
+#: pg_basebackup.c:397
+#, c-format
+msgid ""
+"\n"
+"General options:\n"
+msgstr ""
+"\n"
+"Opciones generales:\n"
+
+#: pg_basebackup.c:398
+#, c-format
+msgid ""
+" -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr ""
+" -c, --checkpoint=fast|spread\n"
+" utilizar checkpoint rápido o extendido\n"
+
+#: pg_basebackup.c:400
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " -C, --create-slot crear un slot de replicación\n"
+
+#: pg_basebackup.c:401
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=ETIQUETA establecer etiqueta del respaldo\n"
+
+#: pg_basebackup.c:402
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --no-clean no hacer limpieza tras errores\n"
+
+#: pg_basebackup.c:403
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync no esperar que los cambios se sincronicen a disco\n"
+
+#: pg_basebackup.c:404
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress mostrar información de progreso\n"
+
+#: pg_basebackup.c:405 pg_receivewal.c:89
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=NOMBRE slot de replicación a usar\n"
+
+#: pg_basebackup.c:406 pg_receivewal.c:91 pg_recvlogical.c:96
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose desplegar mensajes verbosos\n"
+
+#: pg_basebackup.c:407 pg_receivewal.c:92 pg_recvlogical.c:97
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version mostrar información de versión, luego salir\n"
+
+#: pg_basebackup.c:408
+#, c-format
+msgid ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" use algorithm for manifest checksums\n"
+msgstr ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" usar algoritmo para sumas de comprobación del manifiesto\n"
+
+#: pg_basebackup.c:410
+#, c-format
+msgid ""
+" --manifest-force-encode\n"
+" hex encode all file names in manifest\n"
+msgstr ""
+" --manifest-force-encode\n"
+" codifica a hexadecimal todos los nombres de archivo en el manifiesto\n"
+
+#: pg_basebackup.c:412
+#, c-format
+msgid " --no-estimate-size do not estimate backup size in server side\n"
+msgstr " --no-estimate-size no estimar el tamaño del la copia de seguridad en el lado del servidor\n"
+
+#: pg_basebackup.c:413
+#, c-format
+msgid " --no-manifest suppress generation of backup manifest\n"
+msgstr " --no-manifest suprimir la generación del manifiesto de la copia de seguridad\n"
+
+#: pg_basebackup.c:414
+#, c-format
+msgid " --no-slot prevent creation of temporary replication slot\n"
+msgstr " --no-slot evitar la creación de un slot de replicación temporal\n"
+
+#: pg_basebackup.c:415
+#, c-format
+msgid ""
+" --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr ""
+" --no-verify-checksums\n"
+" no verificar checksums\n"
+
+#: pg_basebackup.c:417 pg_receivewal.c:94 pg_recvlogical.c:98
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help mostrar esta ayuda, luego salir\n"
+
+#: pg_basebackup.c:418 pg_receivewal.c:95 pg_recvlogical.c:99
+#, c-format
+msgid ""
+"\n"
+"Connection options:\n"
+msgstr ""
+"\n"
+"Opciones de conexión:\n"
+
+#: pg_basebackup.c:419 pg_receivewal.c:96
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=CONSTR cadena de conexión\n"
+
+#: pg_basebackup.c:420 pg_receivewal.c:97 pg_recvlogical.c:101
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr " -h, --host=ANFITRIÓN dirección del servidor o directorio del socket\n"
+
+#: pg_basebackup.c:421 pg_receivewal.c:98 pg_recvlogical.c:102
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=PORT número de port del servidor\n"
+
+#: pg_basebackup.c:422
+#, c-format
+msgid ""
+" -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in seconds)\n"
+msgstr ""
+" -s, --status-interval=INTERVALO (segundos)\n"
+" tiempo entre envíos de paquetes de estado al servidor\n"
+
+#: pg_basebackup.c:424 pg_receivewal.c:99 pg_recvlogical.c:103
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr " -U, --username=NOMBRE conectarse con el usuario especificado\n"
+
+#: pg_basebackup.c:425 pg_receivewal.c:100 pg_recvlogical.c:104
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password nunca pedir contraseña\n"
+
+#: pg_basebackup.c:426 pg_receivewal.c:101 pg_recvlogical.c:105
+#, c-format
+msgid " -W, --password force password prompt (should happen automatically)\n"
+msgstr ""
+" -W, --password forzar un prompt para la contraseña\n"
+" (debería ser automático)\n"
+
+#: pg_basebackup.c:427 pg_receivewal.c:105 pg_recvlogical.c:106
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Reporte errores a <%s>.\n"
+
+#: pg_basebackup.c:428 pg_receivewal.c:106 pg_recvlogical.c:107
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Sitio web de %s: <%s>\n"
+
+#: pg_basebackup.c:471
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "no se pudo leer desde la tubería: %m"
+
+#: pg_basebackup.c:477 pg_basebackup.c:608 pg_basebackup.c:2134
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "no se pudo interpretar la ubicación del WAL «%s»"
+
+#: pg_basebackup.c:573 pg_receivewal.c:441
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "no se pudo completar la escritura de archivos WAL: %m"
+
+#: pg_basebackup.c:620
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "no se pudo crear la tubería para el proceso en segundo plano: %m"
+
+#: pg_basebackup.c:655
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "se creó slot temporal de replicación «%s»"
+
+#: pg_basebackup.c:658
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "se creó el slot de replicación «%s»"
+
+#: pg_basebackup.c:678 pg_basebackup.c:731 pg_basebackup.c:1621
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "no se pudo crear el directorio «%s»: %m"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not create background process: %m"
+msgstr "no se pudo lanzar el proceso en segundo plano: %m"
+
+#: pg_basebackup.c:708
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "no se pudo lanzar el hilo en segundo plano: %m"
+
+#: pg_basebackup.c:752
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "el directorio «%s» existe pero no está vacío"
+
+#: pg_basebackup.c:759
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "no se pudo acceder al directorio «%s»: %m"
+
+#: pg_basebackup.c:824
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgstr[1] "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+
+#: pg_basebackup.c:836
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+
+#: pg_basebackup.c:852
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d tablespace"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d tablespaces"
+
+#: pg_basebackup.c:877
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "tasa de transferencia «%s» no es un valor válido"
+
+#: pg_basebackup.c:882
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "tasa de transferencia «%s» no válida: %m"
+
+#: pg_basebackup.c:891
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "tasa de transferencia debe ser mayor que cero"
+
+#: pg_basebackup.c:923
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "unidad de --max-rato no válida: «%s»"
+
+#: pg_basebackup.c:930
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "la tasa de transferencia «%s» excede el rango de enteros"
+
+#: pg_basebackup.c:940
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "la tasa de transferencia «%s» está fuera de rango"
+
+#: pg_basebackup.c:961
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "no se pudo obtener un flujo de datos COPY: %s"
+
+#: pg_basebackup.c:981 pg_recvlogical.c:434 pg_recvlogical.c:606
+#: receivelog.c:978
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "no fue posible leer datos COPY: %s"
+
+#: pg_basebackup.c:1007
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "no se pudo escribir al archivo comprimido «%s»: %s"
+
+#: pg_basebackup.c:1071
+#, c-format
+msgid "could not duplicate stdout: %m"
+msgstr "no se pudo duplicar stdout: %m"
+
+#: pg_basebackup.c:1078
+#, c-format
+msgid "could not open output file: %m"
+msgstr "no se pudo abrir el archivo de salida: %m"
+
+#: pg_basebackup.c:1085 pg_basebackup.c:1106 pg_basebackup.c:1135
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "no se pudo definir el nivel de compresión %d: %s"
+
+#: pg_basebackup.c:1155
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "no se pudo crear el archivo comprimido «%s»: %s"
+
+#: pg_basebackup.c:1268
+#, c-format
+msgid "could not close compressed file \"%s\": %m"
+msgstr "no se pudo cerrar el archivo comprimido «%s»: %m"
+
+#: pg_basebackup.c:1280 pg_recvlogical.c:631
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "no se pudo cerrar el archivo «%s»: %m"
+
+#: pg_basebackup.c:1542
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "el flujo COPY terminó antes que el último archivo estuviera completo"
+
+#: pg_basebackup.c:1571
+#, c-format
+msgid "invalid tar block header size: %zu"
+msgstr "tamaño de bloque de cabecera de tar no válido: %zu"
+
+#: pg_basebackup.c:1628
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "no se pudo definir los permisos del directorio «%s»: %m"
+
+#: pg_basebackup.c:1652
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "no se pudo crear un enlace simbólico desde «%s» a «%s»: %m"
+
+#: pg_basebackup.c:1659
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "indicador de enlace «%c» no reconocido"
+
+#: pg_basebackup.c:1678
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "no se pudo definir los permisos al archivo «%s»: %m"
+
+#: pg_basebackup.c:1832
+#, c-format
+msgid "incompatible server version %s"
+msgstr "versión del servidor %s incompatible"
+
+#: pg_basebackup.c:1847
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr "SUGERENCIA: use -X none o -X fetch para deshabilitar el flujo de log"
+
+#: pg_basebackup.c:1883
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr "iniciando el respaldo base, esperando que el checkpoint se complete"
+
+#: pg_basebackup.c:1909 pg_recvlogical.c:261 receivelog.c:494 receivelog.c:543
+#: receivelog.c:582 streamutil.c:297 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "no se pudo ejecutar la orden de replicación «%s»: %s"
+
+#: pg_basebackup.c:1920
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "no se pudo iniciar el respaldo base: %s"
+
+#: pg_basebackup.c:1926
+#, c-format
+msgid "server returned unexpected response to BASE_BACKUP command; got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "el servidor envió una respuesta inesperada a la orden BASE_BACKUP; se obtuvieron %d filas y %d campos, se esperaban %d filas y %d campos"
+
+#: pg_basebackup.c:1934
+#, c-format
+msgid "checkpoint completed"
+msgstr "el checkpoint se ha completado"
+
+#: pg_basebackup.c:1949
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "punto de inicio del WAL: %s en el timeline %u"
+
+#: pg_basebackup.c:1958
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "no se pudo obtener la cabecera de respaldo: %s"
+
+#: pg_basebackup.c:1964
+#, c-format
+msgid "no data returned from server"
+msgstr "el servidor no retornó datos"
+
+#: pg_basebackup.c:1996
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr "sólo se puede escribir un tablespace a stdout, la base de datos tiene %d"
+
+#: pg_basebackup.c:2008
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "iniciando el receptor de WAL en segundo plano"
+
+#: pg_basebackup.c:2047
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr "no se pudo obtener la posición final del WAL del servidor: %s"
+
+#: pg_basebackup.c:2053
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "el servidor no retornó la posición final del WAL"
+
+#: pg_basebackup.c:2058
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "posición final del WAL: %s"
+
+#: pg_basebackup.c:2069
+#, c-format
+msgid "checksum error occurred"
+msgstr "ocurrió un error de checksums"
+
+#: pg_basebackup.c:2074
+#, c-format
+msgid "final receive failed: %s"
+msgstr "la recepción final falló: %s"
+
+#: pg_basebackup.c:2098
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "esperando que el proceso en segundo plano complete el flujo..."
+
+#: pg_basebackup.c:2103
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "no se pudo enviar una orden a la tubería de segundo plano: %m"
+
+#: pg_basebackup.c:2111
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "no se pudo esperar al proceso hijo: %m"
+
+#: pg_basebackup.c:2116
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "el hijo %d murió, pero se esperaba al %d"
+
+#: pg_basebackup.c:2121 streamutil.c:92 streamutil.c:203
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2146
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "no se pudo esperar el hilo hijo: %m"
+
+#: pg_basebackup.c:2152
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "no se pudo obtener la cabecera de respaldo: %m"
+
+#: pg_basebackup.c:2157
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "el hilo hijo terminó con error %u"
+
+#: pg_basebackup.c:2185
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "sincronizando datos a disco ..."
+
+#: pg_basebackup.c:2210
+#, c-format
+msgid "renaming backup_manifest.tmp to backup_manifest"
+msgstr "renombrando backup_manifest.tmp a backup_manifest"
+
+#: pg_basebackup.c:2221
+#, c-format
+msgid "base backup completed"
+msgstr "el respaldo base se ha completado"
+
+#: pg_basebackup.c:2306
+#, c-format
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\""
+msgstr "formato de salida «%s» no válido, debe ser «plain» o «tar»"
+
+#: pg_basebackup.c:2350
+#, c-format
+msgid "invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr "opción de wal-method «%s» no válida, debe ser «fetch», «stream» o «none»"
+
+#: pg_basebackup.c:2378 pg_receivewal.c:580
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "valor de compresión «%s» no válido"
+
+#: pg_basebackup.c:2389
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr "argumento de checkpoint «%s» no válido, debe ser «fast» o «spread»"
+
+#: pg_basebackup.c:2416 pg_receivewal.c:555 pg_recvlogical.c:819
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "intervalo de estado «%s» no válido"
+
+#: pg_basebackup.c:2446 pg_basebackup.c:2459 pg_basebackup.c:2470
+#: pg_basebackup.c:2481 pg_basebackup.c:2489 pg_basebackup.c:2497
+#: pg_basebackup.c:2507 pg_basebackup.c:2520 pg_basebackup.c:2529
+#: pg_basebackup.c:2540 pg_basebackup.c:2550 pg_basebackup.c:2568
+#: pg_basebackup.c:2577 pg_basebackup.c:2586 pg_receivewal.c:605
+#: pg_receivewal.c:618 pg_receivewal.c:626 pg_receivewal.c:636
+#: pg_receivewal.c:644 pg_receivewal.c:655 pg_recvlogical.c:845
+#: pg_recvlogical.c:858 pg_recvlogical.c:869 pg_recvlogical.c:877
+#: pg_recvlogical.c:885 pg_recvlogical.c:893 pg_recvlogical.c:901
+#: pg_recvlogical.c:909 pg_recvlogical.c:917
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Use «%s --help» para obtener más información.\n"
+
+#: pg_basebackup.c:2457 pg_receivewal.c:616 pg_recvlogical.c:856
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "demasiados argumentos en la línea de órdenes (el primero es «%s»)"
+
+#: pg_basebackup.c:2469 pg_receivewal.c:654
+#, c-format
+msgid "no target directory specified"
+msgstr "no se especificó un directorio de salida"
+
+#: pg_basebackup.c:2480
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "sólo los respaldos de modo tar pueden ser comprimidos"
+
+#: pg_basebackup.c:2488
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "no se puede enviar WALs en modo tar a stdout"
+
+#: pg_basebackup.c:2496
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "los slots de replicación sólo pueden usarse con flujo de WAL"
+
+#: pg_basebackup.c:2506
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "no se puede usar --no-slot junto con nombre de slot"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2518 pg_receivewal.c:634
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "la opcón %s necesita que se especifique un slot con --slot"
+
+#: pg_basebackup.c:2527 pg_basebackup.c:2566 pg_basebackup.c:2575
+#: pg_basebackup.c:2584
+#, c-format
+msgid "%s and %s are incompatible options"
+msgstr "%s y %s son opciones incompatibles"
+
+#: pg_basebackup.c:2539
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "la ubicación del directorio de WAL sólo puede especificarse en modo «plain»"
+
+#: pg_basebackup.c:2549
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "la ubicación del directorio de WAL debe ser una ruta absoluta"
+
+#: pg_basebackup.c:2559 pg_receivewal.c:663
+#, c-format
+msgid "this build does not support compression"
+msgstr "esta instalación no soporta compresión"
+
+#: pg_basebackup.c:2644
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "no se pudo crear el enlace simbólico «%s»: %m"
+
+#: pg_basebackup.c:2648
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "los enlaces simbólicos no están soportados en esta plataforma"
+
+#: pg_receivewal.c:77
+#, c-format
+msgid ""
+"%s receives PostgreSQL streaming write-ahead logs.\n"
+"\n"
+msgstr ""
+"%s recibe flujos del WAL de PostgreSQL.\n"
+"\n"
+
+#: pg_receivewal.c:81 pg_recvlogical.c:81
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Opciones:\n"
+
+#: pg_receivewal.c:82
+#, c-format
+msgid " -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr " -D, --directory=DIR recibir los archivos de WAL en este directorio\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:82
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr " -E, --endpos=LSN salir luego de recibir el LSN especificado\n"
+
+#: pg_receivewal.c:84 pg_recvlogical.c:86
+#, c-format
+msgid " --if-not-exists do not error if slot already exists when creating a slot\n"
+msgstr " --if-not-exists no abandonar si el slot ya existe al crear un slot\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:88
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop no entrar en bucle al perder la conexión\n"
+
+#: pg_receivewal.c:86
+#, c-format
+msgid " --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " --no-sync no esperar que los cambios se sincronicen a disco\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:93
+#, c-format
+msgid ""
+" -s, --status-interval=SECS\n"
+" time between status packets sent to server (default: %d)\n"
+msgstr ""
+" -s, --status-interval=SECS\n"
+" tiempo entre envíos de paquetes de estado al servidor\n"
+" (por omisión: %d)\n"
+
+#: pg_receivewal.c:90
+#, c-format
+msgid " --synchronous flush write-ahead log immediately after writing\n"
+msgstr " --synchronous sincronizar el WAL inmediatamente después de escribir\n"
+
+#: pg_receivewal.c:93
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr " -Z, --compress=0-9 comprimir los segmentos con el nivel de compresión especificado\n"
+
+#: pg_receivewal.c:102
+#, c-format
+msgid ""
+"\n"
+"Optional actions:\n"
+msgstr ""
+"\n"
+"Acciones optativas:\n"
+
+#: pg_receivewal.c:103 pg_recvlogical.c:78
+#, c-format
+msgid " --create-slot create a new replication slot (for the slot's name see --slot)\n"
+msgstr " --create-slot crear un nuevo slot de replicación (para el nombre, vea --slot)\n"
+
+#: pg_receivewal.c:104 pg_recvlogical.c:79
+#, c-format
+msgid " --drop-slot drop the replication slot (for the slot's name see --slot)\n"
+msgstr " --drop-slot eliminar un slot de replicación (para el nombre, vea --slot)\n"
+
+#: pg_receivewal.c:117
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "terminó el segmento en %X/%X (timeline %u)"
+
+#: pg_receivewal.c:124
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "detenido el flujo de log en %X/%X (timeline %u)"
+
+#: pg_receivewal.c:140
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "cambiado al timeline %u en %X/%X"
+
+#: pg_receivewal.c:150
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "se recibió una señal de interrupción, saliendo"
+
+#: pg_receivewal.c:186
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "no se pudo abrir el directorio «%s»: %m"
+
+#: pg_receivewal.c:272
+#, c-format
+msgid "segment file \"%s\" has incorrect size %lld, skipping"
+msgstr "el archivo de segmento «%s» tiene tamaño incorrecto %lld, ignorando"
+
+#: pg_receivewal.c:290
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "no se pudo abrir el archivo comprimido «%s»: %m"
+
+#: pg_receivewal.c:296
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "no se pudo buscar en el archivo comprimido «%s»: %m"
+
+#: pg_receivewal.c:304
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "no se pudo leer el archivo comprimido «%s»: %m"
+
+#: pg_receivewal.c:307
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "no se pudo leer el archivo comprimido «%s»: leídos %d de %zu"
+
+#: pg_receivewal.c:318
+#, c-format
+msgid "compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr "el archivo de segmento «%s» tiene tamaño incorrecto %d al descomprimirse, ignorando"
+
+#: pg_receivewal.c:422
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "iniciando el flujo de log en %X/%X (timeline %u)"
+
+#: pg_receivewal.c:537 pg_recvlogical.c:761
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "número de puerto «%s» no válido"
+
+#: pg_receivewal.c:565 pg_recvlogical.c:787
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "no se pudo interpretar la posición final «%s»"
+
+#: pg_receivewal.c:625
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "no puede usarse --create-slot junto con --drop-slot"
+
+#: pg_receivewal.c:643
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "no puede usarse --synchronous junto con --no-sync"
+
+#: pg_receivewal.c:723
+#, c-format
+msgid "replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr "la conexión de replicación usando el slot «%s» es inesperadamente específica a una base de datos"
+
+#: pg_receivewal.c:734 pg_recvlogical.c:968
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "eliminando el slot de replicación «%s»"
+
+#: pg_receivewal.c:745 pg_recvlogical.c:978
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "creando el slot de replicación «%s»"
+
+#: pg_receivewal.c:771 pg_recvlogical.c:1003
+#, c-format
+msgid "disconnected"
+msgstr "desconectado"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:777 pg_recvlogical.c:1009
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "desconectado; esperando %d segundos para intentar nuevamente"
+
+#: pg_recvlogical.c:73
+#, c-format
+msgid ""
+"%s controls PostgreSQL logical decoding streams.\n"
+"\n"
+msgstr ""
+"%s controla flujos de decodificación lógica de PostgreSQL.\n"
+"\n"
+
+#: pg_recvlogical.c:77
+#, c-format
+msgid ""
+"\n"
+"Action to be performed:\n"
+msgstr ""
+"\n"
+"Acciones a ejecutar:\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid " --start start streaming in a replication slot (for the slot's name see --slot)\n"
+msgstr " --start iniciar flujo en un slot de replicación (para el nombre, vea --slot)\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr " -f, --file=ARCHIVO recibir el log en este archivo, - para stdout\n"
+
+#: pg_recvlogical.c:84
+#, c-format
+msgid ""
+" -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: %d)\n"
+msgstr ""
+" -F, --fsync-interval=SEGS\n"
+" tiempo entre fsyncs del archivo de salida (omisión: %d)\n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid " -I, --startpos=LSN where in an existing slot should the streaming start\n"
+msgstr " -I, --startpos=LSN dónde en un slot existente debe empezar el flujo\n"
+
+#: pg_recvlogical.c:89
+#, c-format
+msgid ""
+" -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr ""
+" -o, --option=NOMBRE[=VALOR]\n"
+" pasar opción NOMBRE con valor opcional VALOR al\n"
+" plugin de salida\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr " -P, --plugin=PLUGIN usar plug-in de salida PLUGIN (omisión: %s)\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=NOMBRE-SLOT nombre del slot de replicación lógica\n"
+
+#: pg_recvlogical.c:100
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=BASE base de datos a la cual conectarse\n"
+
+#: pg_recvlogical.c:133
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "confirmando escritura hasta %X/%X, fsync hasta %X/%X (slot %s)"
+
+#: pg_recvlogical.c:157 receivelog.c:356
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "no se pudo enviar el paquete de retroalimentación: %s"
+
+#: pg_recvlogical.c:228
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "iniciando el flujo de log en %X/%X (slot %s)"
+
+#: pg_recvlogical.c:270
+#, c-format
+msgid "streaming initiated"
+msgstr "flujo iniciado"
+
+#: pg_recvlogical.c:334
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "no se pudo abrir el archivo de registro «%s»: %m"
+
+#: pg_recvlogical.c:360 receivelog.c:886
+#, c-format
+msgid "invalid socket: %s"
+msgstr "el socket no es válido: %s"
+
+#: pg_recvlogical.c:413 receivelog.c:914
+#, c-format
+msgid "%s() failed: %m"
+msgstr "%s() falló: %m"
+
+#: pg_recvlogical.c:420 receivelog.c:964
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "no se pudo recibir datos desde el flujo de WAL: %s"
+
+#: pg_recvlogical.c:462 pg_recvlogical.c:513 receivelog.c:1008
+#: receivelog.c:1074
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "cabecera de flujo demasiado pequeña: %d"
+
+#: pg_recvlogical.c:497 receivelog.c:846
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "cabecera de flujo no reconocida: «%c»"
+
+#: pg_recvlogical.c:551 pg_recvlogical.c:563
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "no se pudo escribir %u bytes al archivo de registro «%s»: %m"
+
+#: pg_recvlogical.c:617 receivelog.c:642 receivelog.c:679
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "término inesperado del flujo de replicación: %s"
+
+#: pg_recvlogical.c:741
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "intervalo de fsync «%s» no válido"
+
+#: pg_recvlogical.c:779
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "no se pudo interpretar la posición de inicio «%s»"
+
+#: pg_recvlogical.c:868
+#, c-format
+msgid "no slot specified"
+msgstr "no se especificó slot"
+
+#: pg_recvlogical.c:876
+#, c-format
+msgid "no target file specified"
+msgstr "no se especificó un archivo de destino"
+
+#: pg_recvlogical.c:884
+#, c-format
+msgid "no database specified"
+msgstr "no se especificó una base de datos"
+
+#: pg_recvlogical.c:892
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "debe especificarse al menos una operación"
+
+#: pg_recvlogical.c:900
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr "no puede usarse --create-slot o --start junto con --drop-slot"
+
+#: pg_recvlogical.c:908
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr "no puede usarse --create-slot o --drop-slot junto con --startpos"
+
+#: pg_recvlogical.c:916
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "--endpos solo se puede utilizar con --start"
+
+#: pg_recvlogical.c:950
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr "no se pudo establecer una conexión de replicación específica a una base de datos"
+
+#: pg_recvlogical.c:1049
+#, c-format
+msgid "end position %X/%X reached by keepalive"
+msgstr "ubicación de término %X/%X alcanzado por «keep-alive»"
+
+#: pg_recvlogical.c:1052
+#, c-format
+msgid "end position %X/%X reached by WAL record at %X/%X"
+msgstr "ubicación de término %X/%X alcanzado por registro WAL en %X/%X"
+
+#: receivelog.c:68
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "no se pudo crear el archivo de estado «%s»: %s"
+
+#: receivelog.c:75
+#, c-format
+msgid "could not close archive status file \"%s\": %s"
+msgstr "no se pudo cerrar el archivo de estado «%s»: %s"
+
+#: receivelog.c:123
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "no se pudo obtener el tamaño del archivo de WAL «%s»: %s"
+
+#: receivelog.c:134
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "no se pudo abrir el archivo de WAL «%s»: %s"
+
+#: receivelog.c:143
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr "no se pudo sincronizar (fsync) el archivo de WAL «%s»: %s"
+
+#: receivelog.c:158
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] "el archivo de WAL «%s» mide %d byte, debería ser 0 o %d"
+msgstr[1] "el archivo de WAL «%s» mide %d bytes, debería ser 0 o %d"
+
+#: receivelog.c:174
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "no se pudo abrir archivo de WAL «%s»: %s"
+
+#: receivelog.c:202
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "no se pudo determinar la posición (seek) en el archivo «%s»: %s"
+
+#: receivelog.c:216
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "no se cambiará el nombre a «%s%s», el segmento no está completo"
+
+#: receivelog.c:228 receivelog.c:313 receivelog.c:688
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "no se pudo cerrar el archivo «%s»: %s"
+
+#: receivelog.c:285
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "el servidor reportó un nombre inesperado para el archivo de historia de timeline %u: %s"
+
+#: receivelog.c:293
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "no se pudo crear el archivo de historia de timeline «%s»: %s"
+
+#: receivelog.c:300
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "no se pudo escribir al archivo de historia de timeline «%s»: %s"
+
+#: receivelog.c:390
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions older than %s"
+msgstr "versión de servidor %s incompatible; el cliente no soporta flujos de servidores anteriores a la versión %s"
+
+#: receivelog.c:399
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions newer than %s"
+msgstr "versión de servidor %s incompatible; el cliente no soporta flujos de servidores posteriores a %s"
+
+#: receivelog.c:501 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid "could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "no se pudo identificar al sistema: se obtuvieron %d filas y %d campos, se esperaban %d filas y %d o más campos"
+
+#: receivelog.c:508
+#, c-format
+msgid "system identifier does not match between base backup and streaming connection"
+msgstr "el identificador de sistema no coincide entre el respaldo base y la conexión de flujo"
+
+#: receivelog.c:514
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "el timeline de inicio %u no está presente en el servidor"
+
+#: receivelog.c:555
+#, c-format
+msgid "unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "respuesta inesperada a la orden TIMELINE_HISTORY: se obtuvieron %d filas y %d campos, se esperaban %d filas y %d campos"
+
+#: receivelog.c:626
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "el servidor reportó un timeline siguiente %u inesperado, a continuación del timeline %u"
+
+#: receivelog.c:632
+#, c-format
+msgid "server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"
+msgstr "el servidor paró la transmisión del timeline %u en %X/%X, pero reportó que el siguiente timeline %u comienza en %X/%X"
+
+#: receivelog.c:672
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "el flujo de replicación terminó antes del punto de término"
+
+#: receivelog.c:718
+#, c-format
+msgid "unexpected result set after end-of-timeline: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "respuesta inesperada después del fin-de-timeline: se obtuvieron %d filas y %d campos, se esperaban %d filas y %d campos"
+
+#: receivelog.c:727
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "no se pudo interpretar el punto de inicio del siguiente timeline «%s»"
+
+#: receivelog.c:776 receivelog.c:1028 walmethods.c:994
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "no se pudo sincronizar (fsync) archivo «%s»: %s"
+
+#: receivelog.c:1091
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "se recibió un registro de WAL para el desplazamiento %u sin ningún archivo abierto"
+
+#: receivelog.c:1101
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "se obtuvo desplazamiento de datos WAL %08x, se esperaba %08x"
+
+#: receivelog.c:1135
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "no se pudo escribir %u bytes al archivo WAL «%s»: %s"
+
+#: receivelog.c:1160 receivelog.c:1200 receivelog.c:1230
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "no se pudo enviar el paquete copy-end: %s"
+
+#: streamutil.c:162
+msgid "Password: "
+msgstr "Contraseña: "
+
+#: streamutil.c:186
+#, c-format
+msgid "could not connect to server"
+msgstr "no se pudo conectar al servidor"
+
+#: streamutil.c:231
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "no se pudo limpiar search_path: %s"
+
+#: streamutil.c:247
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "no se pudo determinar la opción integer_datetimes del servidor"
+
+#: streamutil.c:254
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "la opción de compilación integer_datetimes no coincide con el servidor"
+
+#: streamutil.c:305
+#, c-format
+msgid "could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "no se pudo obtener el tamaño del segmento de WAL: se obtuvo %d filas y %d campos, se esperaban %d filas y %d o más campos"
+
+#: streamutil.c:315
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "el tamaño de segmento de WAL no pudo ser analizado"
+
+#: streamutil.c:333
+#, c-format
+msgid "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"
+msgid_plural "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"
+msgstr[0] "el tamaño de segmento de WAL debe ser una potencia de dos entre 1 MB y 1 GB, pero el servidor remoto reportó un valor de %d byte"
+msgstr[1] "el tamaño de segmento de WAL debe ser una potencia de dos entre 1 MB y 1 GB, pero el servidor remoto reportó un valor de %d bytes"
+
+#: streamutil.c:378
+#, c-format
+msgid "could not fetch group access flag: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "no se pudo obtener el indicador de acceso de grupo: se obtuvo %d filas y %d campos, se esperaban %d filas y %d o más campos"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "el indicador de acceso de grupo no pudo ser analizado: %s"
+
+#: streamutil.c:544
+#, c-format
+msgid "could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "no se pudo create el slot de replicación «%s»: se obtuvieron %d filas y %d campos, se esperaban %d filas y %d campos"
+
+#: streamutil.c:588
+#, c-format
+msgid "could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "no se pudo eliminar el slot de replicación «%s»: se obtuvieron %d filas y %d campos, se esperaban %d filas y %d campos"
+
+#: walmethods.c:521 walmethods.c:1057
+msgid "could not compress data"
+msgstr "no se pudo comprimir datos"
+
+#: walmethods.c:550
+msgid "could not reset compression stream"
+msgstr "no se pudo restablecer el flujo comprimido"
+
+#: walmethods.c:670
+msgid "could not initialize compression library"
+msgstr "no se pudo inicializar la biblioteca de compresión"
+
+#: walmethods.c:681
+msgid "implementation error: tar files can't have more than one open file"
+msgstr "error de implementación: los archivos tar no pueden tener abierto más de un fichero"
+
+#: walmethods.c:695
+msgid "could not create tar header"
+msgstr "no se pudo crear la cabecera del archivo tar"
+
+#: walmethods.c:711 walmethods.c:751 walmethods.c:965 walmethods.c:977
+msgid "could not change compression parameters"
+msgstr "no se pudo cambiar los parámetros de compresión"
+
+#: walmethods.c:850
+msgid "unlink not supported with compression"
+msgstr "unlink no soportado con compresión"
+
+#: walmethods.c:1081
+msgid "could not close compression stream"
+msgstr "no se pudo cerrar el flujo comprimido"
diff --git a/src/bin/pg_basebackup/po/fr.po b/src/bin/pg_basebackup/po/fr.po
new file mode 100644
index 0000000..843c697
--- /dev/null
+++ b/src/bin/pg_basebackup/po/fr.po
@@ -0,0 +1,1790 @@
+# LANGUAGE message translation file for pg_basebackup
+# Copyright (C) 2011 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-12-30 12:47+0000\n"
+"PO-Revision-Date: 2021-12-30 17:09+0100\n"
+"Last-Translator: Christophe Courtois <christophe.courtois@dalibo.com>\n"
+"Language-Team: French <guillaume@lelarge.info>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Generator: Poedit 3.0.1\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "fatal : "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "erreur : "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "attention : "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98 ../../common/fe_memutils.c:162
+#, c-format
+msgid "out of memory\n"
+msgstr "mémoire épuisée\n"
+
+#: ../../common/fe_memutils.c:92 ../../common/fe_memutils.c:154
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "ne peut pas dupliquer un pointeur nul (erreur interne)\n"
+
+#: ../../common/file_utils.c:87 ../../common/file_utils.c:451
+#: pg_receivewal.c:266 pg_recvlogical.c:339
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "n'a pas pu tester le fichier « %s » : %m"
+
+#: ../../common/file_utils.c:166 pg_receivewal.c:169
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "n'a pas pu ouvrir le répertoire « %s » : %m"
+
+#: ../../common/file_utils.c:200 pg_receivewal.c:337
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "n'a pas pu lire le répertoire « %s » : %m"
+
+#: ../../common/file_utils.c:232 ../../common/file_utils.c:291
+#: ../../common/file_utils.c:365 ../../fe_utils/recovery_gen.c:134
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "n'a pas pu ouvrir le fichier « %s » : %m"
+
+#: ../../common/file_utils.c:303 ../../common/file_utils.c:373
+#: pg_recvlogical.c:193
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "n'a pas pu synchroniser sur disque (fsync) le fichier « %s » : %m"
+
+#: ../../common/file_utils.c:383
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "n'a pas pu renommer le fichier « %s » en « %s » : %m"
+
+#: ../../fe_utils/recovery_gen.c:35 ../../fe_utils/recovery_gen.c:49
+#: ../../fe_utils/recovery_gen.c:77 ../../fe_utils/recovery_gen.c:100
+#: ../../fe_utils/recovery_gen.c:171 pg_basebackup.c:1248
+#, c-format
+msgid "out of memory"
+msgstr "mémoire épuisée"
+
+#: ../../fe_utils/recovery_gen.c:140 pg_basebackup.c:1021 pg_basebackup.c:1715
+#: pg_basebackup.c:1771
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "n'a pas pu écrire dans le fichier « %s » : %m"
+
+#: ../../fe_utils/recovery_gen.c:152 pg_basebackup.c:1166 pg_basebackup.c:1672
+#: pg_basebackup.c:1748
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "n'a pas pu créer le fichier « %s » : %m"
+
+#: pg_basebackup.c:224
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "suppression du répertoire des données « %s »"
+
+#: pg_basebackup.c:226
+#, c-format
+msgid "failed to remove data directory"
+msgstr "échec de la suppression du répertoire des données"
+
+#: pg_basebackup.c:230
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "suppression du contenu du répertoire des données « %s »"
+
+#: pg_basebackup.c:232
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "échec de la suppression du contenu du répertoire des données"
+
+#: pg_basebackup.c:237
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "suppression du répertoire des journaux de transactions « %s »"
+
+#: pg_basebackup.c:239
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "échec de la suppression du répertoire des journaux de transactions"
+
+#: pg_basebackup.c:243
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "suppression du contenu du répertoire des journaux de transactions « %s »"
+
+#: pg_basebackup.c:245
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "échec de la suppression du contenu du répertoire des journaux de transactions"
+
+#: pg_basebackup.c:251
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "répertoire des données « %s » non supprimé à la demande de l'utilisateur"
+
+#: pg_basebackup.c:254
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "répertoire des journaux de transactions « %s » non supprimé à la demande de l'utilisateur"
+
+#: pg_basebackup.c:258
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "les modifications des répertoires des tablespaces ne seront pas annulées"
+
+#: pg_basebackup.c:299
+#, c-format
+msgid "directory name too long"
+msgstr "nom du répertoire trop long"
+
+#: pg_basebackup.c:309
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "multiple signes « = » dans la correspondance de tablespace"
+
+#: pg_basebackup.c:321
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr "format de correspondance de tablespace « %s » invalide, doit être « ANCIENREPERTOIRE=NOUVEAUREPERTOIRE »"
+
+#: pg_basebackup.c:333
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr "l'ancien répertoire n'est pas un chemin absolu dans la correspondance de tablespace : %s"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr "le nouveau répertoire n'est pas un chemin absolu dans la correspondance de tablespace : %s"
+
+#: pg_basebackup.c:379
+#, c-format
+msgid ""
+"%s takes a base backup of a running PostgreSQL server.\n"
+"\n"
+msgstr ""
+"%s prend une sauvegarde binaire d'un serveur PostgreSQL en cours\n"
+"d'exécution.\n"
+"\n"
+
+#: pg_basebackup.c:381 pg_receivewal.c:79 pg_recvlogical.c:75
+#, c-format
+msgid "Usage:\n"
+msgstr "Usage :\n"
+
+#: pg_basebackup.c:382 pg_receivewal.c:80 pg_recvlogical.c:76
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s [OPTION]...\n"
+
+#: pg_basebackup.c:383
+#, c-format
+msgid ""
+"\n"
+"Options controlling the output:\n"
+msgstr ""
+"\n"
+"Options contrôlant la sortie :\n"
+
+#: pg_basebackup.c:384
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, --pgdata=RÉPERTOIRE reçoit la sauvegarde de base dans ce répertoire\n"
+
+#: pg_basebackup.c:385
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr " -F, --format=p|t format en sortie (plain (par défaut), tar)\n"
+
+#: pg_basebackup.c:386
+#, c-format
+msgid ""
+" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr ""
+" -r, --max-rate=TAUX taux maximum de transfert du répertoire de\n"
+" données (en Ko/s, ou utiliser le suffixe « k »\n"
+" ou « M »)\n"
+
+#: pg_basebackup.c:388
+#, c-format
+msgid ""
+" -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr " -R, --write-recovery-conf écrit la configuration pour la réplication\n"
+
+#: pg_basebackup.c:390
+#, c-format
+msgid ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr ""
+" -T, --tablespace-mapping=ANCIENREP=NOUVEAUREP\n"
+" déplace le répertoire ANCIENREP en NOUVEAUREP\n"
+
+#: pg_basebackup.c:392
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr ""
+" --waldir=RÉP_WAL emplacement du répertoire des journaux de\n"
+" transactions\n"
+
+#: pg_basebackup.c:393
+#, c-format
+msgid ""
+" -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr ""
+" -X, --wal-method=none|fetch|stream\n"
+" inclut les journaux de transactions requis avec\n"
+" la méthode spécifiée\n"
+
+#: pg_basebackup.c:395
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr " -z, --gzip compresse la sortie tar\n"
+
+#: pg_basebackup.c:396
+#, c-format
+msgid " -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr ""
+" -Z, --compress=0-9 compresse la sortie tar avec le niveau de\n"
+" compression indiqué\n"
+
+#: pg_basebackup.c:397
+#, c-format
+msgid ""
+"\n"
+"General options:\n"
+msgstr ""
+"\n"
+"Options générales :\n"
+
+#: pg_basebackup.c:398
+#, c-format
+msgid ""
+" -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr " -c, --checkpoint=fast|spread exécute un CHECKPOINT rapide ou réparti\n"
+
+#: pg_basebackup.c:400
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " --create-slot crée un slot de réplication\n"
+
+#: pg_basebackup.c:401
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=LABEL configure le label de sauvegarde\n"
+
+#: pg_basebackup.c:402
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --no-clean ne nettoie pas en cas d'erreur\n"
+
+#: pg_basebackup.c:403
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr ""
+" -N, --no-sync n'attend pas que les modifications soient\n"
+" proprement écrites sur disque\n"
+
+#: pg_basebackup.c:404
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress affiche la progression de la sauvegarde\n"
+
+#: pg_basebackup.c:405 pg_receivewal.c:89
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=NOMREP slot de réplication à utiliser\n"
+
+#: pg_basebackup.c:406 pg_receivewal.c:91 pg_recvlogical.c:96
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose affiche des messages verbeux\n"
+
+#: pg_basebackup.c:407 pg_receivewal.c:92 pg_recvlogical.c:97
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version affiche la version puis quitte\n"
+
+#: pg_basebackup.c:408
+#, c-format
+msgid ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" use algorithm for manifest checksums\n"
+msgstr ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" utilise cet algorithme pour les sommes de\n"
+" contrôle du manifeste\n"
+
+#: pg_basebackup.c:410
+#, c-format
+msgid ""
+" --manifest-force-encode\n"
+" hex encode all file names in manifest\n"
+msgstr ""
+" --manifest-force-encode encode tous les noms de fichier dans le\n"
+" manifeste en hexadécimal\n"
+
+#: pg_basebackup.c:412
+#, c-format
+msgid " --no-estimate-size do not estimate backup size in server side\n"
+msgstr ""
+" --no-estimate-size ne réalise pas d'estimation sur la taille de la\n"
+" sauvegarde côté serveur\n"
+
+#: pg_basebackup.c:413
+#, c-format
+msgid " --no-manifest suppress generation of backup manifest\n"
+msgstr ""
+" --no-manifest supprime la génération de manifeste de\n"
+" sauvegarde\n"
+
+#: pg_basebackup.c:414
+#, c-format
+msgid " --no-slot prevent creation of temporary replication slot\n"
+msgstr ""
+" --no-slot empêche la création de slots de réplication\n"
+" temporaires\n"
+
+#: pg_basebackup.c:415
+#, c-format
+msgid ""
+" --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr " --no-verify-checksums ne vérifie pas les sommes de contrôle\n"
+
+#: pg_basebackup.c:417 pg_receivewal.c:94 pg_recvlogical.c:98
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help affiche cette aide puis quitte\n"
+
+#: pg_basebackup.c:418 pg_receivewal.c:95 pg_recvlogical.c:99
+#, c-format
+msgid ""
+"\n"
+"Connection options:\n"
+msgstr ""
+"\n"
+"Options de connexion :\n"
+
+#: pg_basebackup.c:419 pg_receivewal.c:96
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=CHAÎNE_CONNEX chaîne de connexion\n"
+
+#: pg_basebackup.c:420 pg_receivewal.c:97 pg_recvlogical.c:101
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr ""
+" -h, --host=HÔTE hôte du serveur de bases de données ou\n"
+" répertoire des sockets\n"
+
+#: pg_basebackup.c:421 pg_receivewal.c:98 pg_recvlogical.c:102
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=PORT numéro de port du serveur de bases de données\n"
+
+#: pg_basebackup.c:422
+#, c-format
+msgid ""
+" -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in seconds)\n"
+msgstr ""
+" -s, --status-interval=INTERVAL durée entre l'envoi de paquets de statut au\n"
+" serveur (en secondes)\n"
+
+#: pg_basebackup.c:424 pg_receivewal.c:99 pg_recvlogical.c:103
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr " -U, --username=UTILISATEUR se connecte avec cet utilisateur\n"
+
+#: pg_basebackup.c:425 pg_receivewal.c:100 pg_recvlogical.c:104
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password ne demande jamais le mot de passe\n"
+
+#: pg_basebackup.c:426 pg_receivewal.c:101 pg_recvlogical.c:105
+#, c-format
+msgid " -W, --password force password prompt (should happen automatically)\n"
+msgstr ""
+" -W, --password force la demande du mot de passe (devrait\n"
+" survenir automatiquement)\n"
+
+#: pg_basebackup.c:427 pg_receivewal.c:105 pg_recvlogical.c:106
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Rapporter les bogues à <%s>.\n"
+
+#: pg_basebackup.c:428 pg_receivewal.c:106 pg_recvlogical.c:107
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Page d'accueil de %s : <%s>\n"
+
+#: pg_basebackup.c:471
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "n'a pas pu lire à partir du tube : %m"
+
+#: pg_basebackup.c:477 pg_basebackup.c:608 pg_basebackup.c:2134
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "n'a pas pu analyser l'emplacement du journal des transactions « %s »"
+
+#: pg_basebackup.c:573 pg_receivewal.c:441
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "n'a pas pu finir l'écriture dans les fichiers de transactions : %m"
+
+#: pg_basebackup.c:620
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "n'a pas pu créer un tube pour le processus en tâche de fond : %m"
+
+#: pg_basebackup.c:655
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "a créé le slot de réplication temporaire « %s »"
+
+#: pg_basebackup.c:658
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "a créé le slot de réplication « %s »"
+
+#: pg_basebackup.c:678 pg_basebackup.c:731 pg_basebackup.c:1621
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "n'a pas pu créer le répertoire « %s » : %m"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not create background process: %m"
+msgstr "n'a pas pu créer un processus en tâche de fond : %m"
+
+#: pg_basebackup.c:708
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "n'a pas pu créer un thread en tâche de fond : %m"
+
+#: pg_basebackup.c:752
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "le répertoire « %s » existe mais n'est pas vide"
+
+#: pg_basebackup.c:759
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "n'a pas pu accéder au répertoire « %s » : %m"
+
+#: pg_basebackup.c:824
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s Ko (100%%), %d/%d tablespace %*s"
+msgstr[1] "%*s/%s Ko (100%%), %d/%d tablespaces %*s"
+
+#: pg_basebackup.c:836
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s Ko (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgstr[1] "%*s/%s Ko (%d%%), %d/%d tablespaces (%s%-*.*s)"
+
+#: pg_basebackup.c:852
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s Ko (%d%%), %d/%d tablespace"
+msgstr[1] "%*s/%s Ko (%d%%), %d/%d tablespaces"
+
+#: pg_basebackup.c:877
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "le taux de transfert « %s » ne correspond pas à une valeur valide"
+
+#: pg_basebackup.c:882
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "taux de transfert invalide (« %s ») : %m"
+
+#: pg_basebackup.c:891
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "le taux de transfert doit être supérieur à zéro"
+
+#: pg_basebackup.c:923
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "unité invalide pour --max-rate : « %s »"
+
+#: pg_basebackup.c:930
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "le taux de transfert « %s » dépasse l'échelle des entiers"
+
+#: pg_basebackup.c:940
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "le taux de transfert « %s » est en dehors des limites"
+
+#: pg_basebackup.c:961
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "n'a pas pu obtenir le flux de données de COPY : %s"
+
+#: pg_basebackup.c:981 pg_recvlogical.c:434 pg_recvlogical.c:606
+#: receivelog.c:978
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "n'a pas pu lire les données du COPY : %s"
+
+#: pg_basebackup.c:1007
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "n'a pas pu écrire dans le fichier compressé « %s » : %s"
+
+#: pg_basebackup.c:1071
+#, c-format
+msgid "could not duplicate stdout: %m"
+msgstr "n'a pas pu dupliquer la sortie (stdout) : %m"
+
+#: pg_basebackup.c:1078
+#, c-format
+msgid "could not open output file: %m"
+msgstr "n'a pas pu ouvrir le fichier de sauvegarde : %m"
+
+#: pg_basebackup.c:1085 pg_basebackup.c:1106 pg_basebackup.c:1135
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "n'a pas pu configurer le niveau de compression %d : %s"
+
+#: pg_basebackup.c:1155
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "n'a pas pu créer le fichier compressé « %s » : %s"
+
+#: pg_basebackup.c:1268
+#, c-format
+msgid "could not close compressed file \"%s\": %m"
+msgstr "n'a pas pu fermer le fichier compressé « %s » : %m"
+
+#: pg_basebackup.c:1280 pg_recvlogical.c:631
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "n'a pas pu fermer le fichier « %s » : %m"
+
+#: pg_basebackup.c:1542
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "le flux COPY s'est terminé avant que le dernier fichier soit terminé"
+
+#: pg_basebackup.c:1571
+#, c-format
+msgid "invalid tar block header size: %zu"
+msgstr "taille invalide de l'en-tête de bloc du fichier tar : %zu"
+
+#: pg_basebackup.c:1628
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "n'a pas pu configurer les droits du répertoire « %s » : %m"
+
+#: pg_basebackup.c:1652
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "n'a pas pu créer le lien symbolique de « %s » vers « %s » : %m"
+
+#: pg_basebackup.c:1659
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "indicateur de lien « %c » non reconnu"
+
+#: pg_basebackup.c:1678
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "n'a pas pu initialiser les droits du fichier « %s » : %m"
+
+#: pg_basebackup.c:1832
+#, c-format
+msgid "incompatible server version %s"
+msgstr "version « %s » du serveur incompatible"
+
+#: pg_basebackup.c:1847
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr "ASTUCE : utilisez -X none ou -X fetch pour désactiver la réplication en flux"
+
+#: pg_basebackup.c:1883
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr "début de la sauvegarde de base, en attente de la fin du checkpoint"
+
+#: pg_basebackup.c:1909 pg_recvlogical.c:261 receivelog.c:494 receivelog.c:543
+#: receivelog.c:582 streamutil.c:297 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "n'a pas pu envoyer la commande de réplication « %s » : %s"
+
+#: pg_basebackup.c:1920
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "n'a pas pu initier la sauvegarde de base : %s"
+
+#: pg_basebackup.c:1926
+#, c-format
+msgid "server returned unexpected response to BASE_BACKUP command; got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "le serveur a renvoyé une réponse inattendue à la commande BASE_BACKUP ; a récupéré %d lignes et %d champs, alors qu'il attendait %d lignes et %d champs"
+
+#: pg_basebackup.c:1934
+#, c-format
+msgid "checkpoint completed"
+msgstr "checkpoint terminé"
+
+#: pg_basebackup.c:1949
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "point de départ du journal de transactions : %s sur la timeline %u"
+
+#: pg_basebackup.c:1958
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "n'a pas pu obtenir l'en-tête du serveur : %s"
+
+#: pg_basebackup.c:1964
+#, c-format
+msgid "no data returned from server"
+msgstr "aucune donnée renvoyée du serveur"
+
+#: pg_basebackup.c:1996
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr "peut seulement écrire un tablespace sur la sortie standard, la base en a %d"
+
+#: pg_basebackup.c:2008
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "lance le récepteur de journaux de transactions en tâche de fond"
+
+#: pg_basebackup.c:2047
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr "n'a pas pu obtenir la position finale des journaux de transactions à partir du serveur : %s"
+
+#: pg_basebackup.c:2053
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "aucune position de fin du journal de transactions renvoyée par le serveur"
+
+#: pg_basebackup.c:2058
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "point final du journal de transactions : %s"
+
+#: pg_basebackup.c:2069
+#, c-format
+msgid "checksum error occurred"
+msgstr "erreur de somme de contrôle"
+
+#: pg_basebackup.c:2074
+#, c-format
+msgid "final receive failed: %s"
+msgstr "échec lors de la réception finale : %s"
+
+#: pg_basebackup.c:2098
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "en attente que le processus en tâche de fond termine le flux..."
+
+#: pg_basebackup.c:2103
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "n'a pas pu envoyer la commande au tube du processus : %m"
+
+#: pg_basebackup.c:2111
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "n'a pas pu attendre le processus fils : %m"
+
+#: pg_basebackup.c:2116
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "le fils %d est mort, %d attendu"
+
+#: pg_basebackup.c:2121 streamutil.c:92 streamutil.c:203
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2146
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "n'a pas pu attendre le thread : %m"
+
+#: pg_basebackup.c:2152
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "n'a pas pu obtenir le code de sortie du thread : %m"
+
+#: pg_basebackup.c:2157
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "le thread a quitté avec le code d'erreur %u"
+
+#: pg_basebackup.c:2185
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "synchronisation des données sur disque..."
+
+#: pg_basebackup.c:2210
+#, c-format
+msgid "renaming backup_manifest.tmp to backup_manifest"
+msgstr "renommage de backup_manifest.tmp en backup_manifest"
+
+#: pg_basebackup.c:2221
+#, c-format
+msgid "base backup completed"
+msgstr "sauvegarde de base terminée"
+
+#: pg_basebackup.c:2306
+#, c-format
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\""
+msgstr "format de sortie « %s » invalide, doit être soit « plain » soit « tar »"
+
+#: pg_basebackup.c:2350
+#, c-format
+msgid "invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr "option wal-method « %s » invalide, doit être soit « fetch » soit « stream » soit « none »"
+
+#: pg_basebackup.c:2378 pg_receivewal.c:580
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "niveau de compression « %s » invalide"
+
+#: pg_basebackup.c:2389
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr "argument « %s » invalide pour le CHECKPOINT, doit être soit « fast » soit « spread »"
+
+#: pg_basebackup.c:2416 pg_receivewal.c:555 pg_recvlogical.c:819
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "intervalle « %s » invalide du statut"
+
+#: pg_basebackup.c:2446 pg_basebackup.c:2459 pg_basebackup.c:2470
+#: pg_basebackup.c:2481 pg_basebackup.c:2489 pg_basebackup.c:2497
+#: pg_basebackup.c:2507 pg_basebackup.c:2520 pg_basebackup.c:2529
+#: pg_basebackup.c:2540 pg_basebackup.c:2550 pg_basebackup.c:2568
+#: pg_basebackup.c:2577 pg_basebackup.c:2586 pg_receivewal.c:605
+#: pg_receivewal.c:618 pg_receivewal.c:626 pg_receivewal.c:636
+#: pg_receivewal.c:644 pg_receivewal.c:655 pg_recvlogical.c:845
+#: pg_recvlogical.c:858 pg_recvlogical.c:869 pg_recvlogical.c:877
+#: pg_recvlogical.c:885 pg_recvlogical.c:893 pg_recvlogical.c:901
+#: pg_recvlogical.c:909 pg_recvlogical.c:917
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Essayer « %s --help » pour plus d'informations.\n"
+
+#: pg_basebackup.c:2457 pg_receivewal.c:616 pg_recvlogical.c:856
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "trop d'arguments en ligne de commande (le premier étant « %s »)"
+
+#: pg_basebackup.c:2469 pg_receivewal.c:654
+#, c-format
+msgid "no target directory specified"
+msgstr "aucun répertoire cible indiqué"
+
+#: pg_basebackup.c:2480
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "seules les sauvegardes en mode tar peuvent être compressées"
+
+#: pg_basebackup.c:2488
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "ne peut pas envoyer les journaux de transactions vers stdout en mode tar"
+
+#: pg_basebackup.c:2496
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "les slots de réplications peuvent seulement être utilisés avec la réplication en flux des WAL"
+
+#: pg_basebackup.c:2506
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "--no-slot ne peut pas être utilisé avec un nom de slot"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2518 pg_receivewal.c:634
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "%s a besoin du slot avec l'option --slot"
+
+#: pg_basebackup.c:2527 pg_basebackup.c:2566 pg_basebackup.c:2575
+#: pg_basebackup.c:2584
+#, c-format
+msgid "%s and %s are incompatible options"
+msgstr "%s et %s sont des options incompatibles"
+
+#: pg_basebackup.c:2539
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "l'emplacement du répertoire des journaux de transactions doit être indiqué uniquement dans le mode plain"
+
+#: pg_basebackup.c:2549
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "l'emplacement du répertoire des journaux de transactions doit être indiqué avec un chemin absolu"
+
+#: pg_basebackup.c:2559 pg_receivewal.c:663
+#, c-format
+msgid "this build does not support compression"
+msgstr "cette construction ne supporte pas la compression"
+
+#: pg_basebackup.c:2644
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "n'a pas pu créer le lien symbolique « %s » : %m"
+
+#: pg_basebackup.c:2648
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "les liens symboliques ne sont pas supportés sur cette plateforme"
+
+#: pg_receivewal.c:77
+#, c-format
+msgid ""
+"%s receives PostgreSQL streaming write-ahead logs.\n"
+"\n"
+msgstr ""
+"%s reçoit le flux des journaux de transactions PostgreSQL.\n"
+"\n"
+
+#: pg_receivewal.c:81 pg_recvlogical.c:81
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Options :\n"
+
+#: pg_receivewal.c:82
+#, c-format
+msgid " -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr ""
+" -D, --directory=RÉPERTOIRE reçoit les journaux de transactions dans ce\n"
+" répertoire\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:82
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr " -E, --endpos=LSN quitte après avoir reçu le LSN spécifié\n"
+
+#: pg_receivewal.c:84 pg_recvlogical.c:86
+#, c-format
+msgid " --if-not-exists do not error if slot already exists when creating a slot\n"
+msgstr ""
+" --if-not-exists ne pas renvoyer une erreur si le slot existe\n"
+" déjà lors de sa création\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:88
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop ne boucle pas en cas de perte de la connexion\n"
+
+#: pg_receivewal.c:86
+#, c-format
+msgid " --no-sync do not wait for changes to be written safely to disk\n"
+msgstr ""
+" --no-sync n'attend pas que les modifications soient\n"
+" proprement écrites sur disque\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:93
+#, c-format
+msgid ""
+" -s, --status-interval=SECS\n"
+" time between status packets sent to server (default: %d)\n"
+msgstr ""
+" -s, --status-interval=SECS durée entre l'envoi de paquets de statut au\n"
+" (par défaut %d)\n"
+
+#: pg_receivewal.c:90
+#, c-format
+msgid " --synchronous flush write-ahead log immediately after writing\n"
+msgstr ""
+" --synchronous vide le journal de transactions immédiatement\n"
+" après son écriture\n"
+
+#: pg_receivewal.c:93
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr ""
+" -Z, --compress=0-9 compresse la sortie tar avec le niveau de\n"
+" compression indiqué\n"
+
+#: pg_receivewal.c:102
+#, c-format
+msgid ""
+"\n"
+"Optional actions:\n"
+msgstr ""
+"\n"
+"Actions optionnelles :\n"
+
+#: pg_receivewal.c:103 pg_recvlogical.c:78
+#, c-format
+msgid " --create-slot create a new replication slot (for the slot's name see --slot)\n"
+msgstr ""
+" --create-slot crée un nouveau slot de réplication\n"
+" (pour le nom du slot, voir --slot)\n"
+
+#: pg_receivewal.c:104 pg_recvlogical.c:79
+#, c-format
+msgid " --drop-slot drop the replication slot (for the slot's name see --slot)\n"
+msgstr ""
+" --drop-slot supprime un nouveau slot de réplication\n"
+" (pour le nom du slot, voir --slot)\n"
+
+#: pg_receivewal.c:117
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "segment terminé à %X/%X (timeline %u)"
+
+#: pg_receivewal.c:124
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "arrêt du flux streaming à %X/%X (timeline %u)"
+
+#: pg_receivewal.c:140
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "a basculé sur la timeline %u à %X/%X"
+
+#: pg_receivewal.c:150
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "a reçu un signal d'interruption, quitte"
+
+#: pg_receivewal.c:186
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "n'a pas pu fermer le répertoire « %s » : %m"
+
+#: pg_receivewal.c:272
+#, c-format
+msgid "segment file \"%s\" has incorrect size %lld, skipping"
+msgstr "le segment « %s » a une taille incorrecte (%lld), ignoré"
+
+#: pg_receivewal.c:290
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "n'a pas pu ouvrir le fichier compressé « %s » : %m"
+
+#: pg_receivewal.c:296
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "n'a pas pu chercher dans le fichier compressé « %s » : %m"
+
+#: pg_receivewal.c:304
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "n'a pas pu lire le fichier compressé « %s » : %m"
+
+#: pg_receivewal.c:307
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "n'a pas pu lire le fichier compressé « %s » : a lu %d sur %zu"
+
+#: pg_receivewal.c:318
+#, c-format
+msgid "compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr "le segment compressé « %s » a une taille %d non compressé incorrecte, ignoré"
+
+#: pg_receivewal.c:422
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "commence le flux des journaux à %X/%X (timeline %u)"
+
+#: pg_receivewal.c:537 pg_recvlogical.c:761
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "numéro de port invalide : « %s »"
+
+#: pg_receivewal.c:565 pg_recvlogical.c:787
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "n'a pas pu analyser la position finale « %s »"
+
+#: pg_receivewal.c:625
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "ne peut pas utiliser --create-slot avec --drop-slot"
+
+#: pg_receivewal.c:643
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "ne peut pas utiliser --synchronous avec --no-sync"
+
+#: pg_receivewal.c:723
+#, c-format
+msgid "replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr "la connexion de réplication utilisant le slot « %s » est spécifique à une base, ce qui est inattendu"
+
+#: pg_receivewal.c:734 pg_recvlogical.c:968
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "suppression du slot de réplication « %s »"
+
+#: pg_receivewal.c:745 pg_recvlogical.c:978
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "création du slot de réplication « %s »"
+
+#: pg_receivewal.c:771 pg_recvlogical.c:1003
+#, c-format
+msgid "disconnected"
+msgstr "déconnecté"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:777 pg_recvlogical.c:1009
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "déconnecté, attente de %d secondes avant une nouvelle tentative"
+
+#: pg_recvlogical.c:73
+#, c-format
+msgid ""
+"%s controls PostgreSQL logical decoding streams.\n"
+"\n"
+msgstr ""
+"%s contrôle le flux des modifications logiques de PostgreSQL.\n"
+"\n"
+
+#: pg_recvlogical.c:77
+#, c-format
+msgid ""
+"\n"
+"Action to be performed:\n"
+msgstr ""
+"\n"
+"Action à réaliser :\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid " --start start streaming in a replication slot (for the slot's name see --slot)\n"
+msgstr ""
+" --start lance le flux dans un slot de réplication (pour\n"
+" le nom du slot, voir --slot)\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr ""
+" -f, --file=FICHIER trace la réception dans ce fichier, - pour\n"
+" stdout\n"
+
+#: pg_recvlogical.c:84
+#, c-format
+msgid ""
+" -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: %d)\n"
+msgstr ""
+" -F --fsync-interval=SECS durée entre les fsyncs vers le fichier de sortie\n"
+" (par défaut %d)\n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid " -I, --startpos=LSN where in an existing slot should the streaming start\n"
+msgstr ""
+" -I, --startpos=LSN position de début du streaming dans le slot\n"
+" existant\n"
+
+#: pg_recvlogical.c:89
+#, c-format
+msgid ""
+" -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr ""
+" -o, --option=NOM[=VALEUR] passe l'option NOM avec la valeur optionnelle\n"
+" VALEUR au plugin en sortie\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr ""
+" -P, --plugin=PLUGIN utilise le plugin PLUGIN en sortie (par défaut\n"
+" %s)\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=SLOT nom du slot de réplication logique\n"
+
+#: pg_recvlogical.c:100
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=BASE base de données de connexion\n"
+
+#: pg_recvlogical.c:133
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "confirmation d'écriture jusqu'à %X/%X et de synchronisation jusqu'à %X/%X (slot %s)"
+
+#: pg_recvlogical.c:157 receivelog.c:356
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "n'a pas pu envoyer le paquet d'informations en retour : %s"
+
+#: pg_recvlogical.c:228
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "commence le flux des journaux à %X/%X (slot %s)"
+
+#: pg_recvlogical.c:270
+#, c-format
+msgid "streaming initiated"
+msgstr "flux lancé"
+
+#: pg_recvlogical.c:334
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "n'a pas pu ouvrir le journal applicatif « %s » : %m"
+
+#: pg_recvlogical.c:360 receivelog.c:886
+#, c-format
+msgid "invalid socket: %s"
+msgstr "socket invalide : %s"
+
+#: pg_recvlogical.c:413 receivelog.c:914
+#, c-format
+msgid "%s() failed: %m"
+msgstr "échec de %s() : %m"
+
+#: pg_recvlogical.c:420 receivelog.c:964
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "n'a pas pu recevoir des données du flux de WAL : %s"
+
+#: pg_recvlogical.c:462 pg_recvlogical.c:513 receivelog.c:1008
+#: receivelog.c:1074
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "en-tête de flux trop petit : %d"
+
+#: pg_recvlogical.c:497 receivelog.c:846
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "entête non reconnu du flux : « %c »"
+
+#: pg_recvlogical.c:551 pg_recvlogical.c:563
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "n'a pas pu écrire %u octets dans le journal de transactions « %s » : %m"
+
+#: pg_recvlogical.c:617 receivelog.c:642 receivelog.c:679
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "fin inattendue du flux de réplication : %s"
+
+#: pg_recvlogical.c:741
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "intervalle fsync « %s » invalide"
+
+#: pg_recvlogical.c:779
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "n'a pas pu analyser la position de départ « %s »"
+
+#: pg_recvlogical.c:868
+#, c-format
+msgid "no slot specified"
+msgstr "aucun slot de réplication indiqué"
+
+#: pg_recvlogical.c:876
+#, c-format
+msgid "no target file specified"
+msgstr "aucun fichier cible indiqué"
+
+#: pg_recvlogical.c:884
+#, c-format
+msgid "no database specified"
+msgstr "aucune base de données indiquée"
+
+#: pg_recvlogical.c:892
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "au moins une action doit être indiquée"
+
+#: pg_recvlogical.c:900
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr "ne peut pas utiliser --create-slot ou --start avec --drop-slot"
+
+#: pg_recvlogical.c:908
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr "ne peut pas utiliser --create-slot ou --drop-slot avec --startpos"
+
+#: pg_recvlogical.c:916
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "--endpos peut seulement être spécifié avec --start"
+
+#: pg_recvlogical.c:950
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr "n'a pas pu établir une connexion de réplication spécifique à la base"
+
+#: pg_recvlogical.c:1049
+#, c-format
+msgid "end position %X/%X reached by keepalive"
+msgstr "position finale %X/%X atteinte par keepalive"
+
+#: pg_recvlogical.c:1052
+#, c-format
+msgid "end position %X/%X reached by WAL record at %X/%X"
+msgstr "position finale %X/%X atteinte à l'enregistrement WAL %X/%X"
+
+#: receivelog.c:68
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "n'a pas pu créer le fichier de statut d'archivage « %s » : %s"
+
+#: receivelog.c:75
+#, c-format
+msgid "could not close archive status file \"%s\": %s"
+msgstr "n'a pas pu fermer le fichier de statut d'archivage « %s » : %s"
+
+#: receivelog.c:123
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "n'a pas pu obtenir la taille du journal de transactions « %s » : %s"
+
+#: receivelog.c:134
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "n'a pas pu ouvrir le journal des transactions « %s » existant : %s"
+
+#: receivelog.c:143
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr "n'a pas pu synchroniser sur disque le journal de transactions « %s » existant : %s"
+
+#: receivelog.c:158
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] "le journal de transactions « %s » comprend %d octet, cela devrait être 0 ou %d"
+msgstr[1] "le journal de transactions « %s » comprend %d octets, cela devrait être 0 ou %d"
+
+#: receivelog.c:174
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "n'a pas pu ouvrir le journal de transactions « %s » : %s"
+
+#: receivelog.c:202
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "n'a pas pu déterminer la position de recherche dans le fichier d'archive « %s » : %s"
+
+#: receivelog.c:216
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "pas de renommage de « %s%s », le segment n'est pas complet"
+
+#: receivelog.c:228 receivelog.c:313 receivelog.c:688
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "n'a pas pu fermer le fichier « %s » : %s"
+
+#: receivelog.c:285
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "le serveur a renvoyé un nom de fichier historique inattendu pour la timeline %u : %s"
+
+#: receivelog.c:293
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "n'a pas pu créer le fichier historique de la timeline « %s » : %s"
+
+#: receivelog.c:300
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "n'a pas pu écrire dans le fichier historique de la timeline « %s » : %s"
+
+#: receivelog.c:390
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions older than %s"
+msgstr "version %s du serveur incompatible ; le client ne supporte pas le streaming de versions plus anciennes que %s"
+
+#: receivelog.c:399
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions newer than %s"
+msgstr "version %s du serveur incompatible ; le client ne supporte pas le streaming de versions plus récentes que %s"
+
+#: receivelog.c:501 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid "could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "n'a pas pu identifier le système : a récupéré %d lignes et %d champs, attendait %d lignes et %d champs (ou plus)."
+
+#: receivelog.c:508
+#, c-format
+msgid "system identifier does not match between base backup and streaming connection"
+msgstr "l'identifiant système ne correspond pas entre la sauvegarde des fichiers et la connexion de réplication"
+
+#: receivelog.c:514
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "la timeline %u de départ n'est pas dans le serveur"
+
+#: receivelog.c:555
+#, c-format
+msgid "unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "réponse inattendue à la commande TIMELINE_HISTORY : a récupéré %d lignes et %d champs, alors qu'il attendait %d lignes et %d champs"
+
+#: receivelog.c:626
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "le serveur a renvoyé une timeline suivante %u inattendue, après la timeline %u"
+
+#: receivelog.c:632
+#, c-format
+msgid "server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"
+msgstr "le serveur a arrêté l'envoi de la timeline %u à %X/%X, mais a indiqué que la timeline suivante, %u, commence à %X/%X"
+
+#: receivelog.c:672
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "le flux de réplication a été abandonné avant d'arriver au point d'arrêt"
+
+#: receivelog.c:718
+#, c-format
+msgid "unexpected result set after end-of-timeline: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "ensemble de résultats inattendu après la fin de la timeline : a récupéré %d lignes et %d champs, alors qu'il attendait %d lignes et %d champs"
+
+#: receivelog.c:727
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "n'a pas pu analyser la position de départ de la prochaine timeline « %s »"
+
+#: receivelog.c:776 receivelog.c:1028 walmethods.c:994
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "n'a pas pu synchroniser sur disque (fsync) le fichier « %s » : %s"
+
+#: receivelog.c:1091
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "a reçu l'enregistrement du journal de transactions pour le décalage %u sans fichier ouvert"
+
+#: receivelog.c:1101
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "a obtenu le décalage %08x pour les données du journal, attendait %08x"
+
+#: receivelog.c:1135
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "n'a pas pu écrire %u octets dans le journal de transactions « %s » : %s"
+
+#: receivelog.c:1160 receivelog.c:1200 receivelog.c:1230
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "n'a pas pu envoyer le paquet de fin de copie : %s"
+
+#: streamutil.c:162
+msgid "Password: "
+msgstr "Mot de passe : "
+
+#: streamutil.c:186
+#, c-format
+msgid "could not connect to server"
+msgstr "n'a pas pu se connecter au serveur"
+
+#: streamutil.c:231
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "n'a pas pu effacer search_path : %s"
+
+#: streamutil.c:247
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "n'a pas pu déterminer la configuration serveur de integer_datetimes"
+
+#: streamutil.c:254
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "l'option de compilation integer_datetimes ne correspond pas au serveur"
+
+#: streamutil.c:305
+#, c-format
+msgid "could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "n'a pas pu récupéré la taille d'un segment WAL : a obtenu %d lignes et %d champs, attendait %d lignes et %d champs (ou plus)"
+
+#: streamutil.c:315
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "la taille du segment WAL n'a pas pu être analysée"
+
+#: streamutil.c:333
+#, c-format
+msgid "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"
+msgid_plural "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"
+msgstr[0] "la taille d'un WAL doit être une puissance de deux comprise entre 1 Mo et 1 Go mais le serveur distant a rapporté une valeur de %d octet"
+msgstr[1] "la taille d'un WAL doit être une puissance de deux comprise entre 1 Mo et 1 Go mais le serveur distant a rapporté une valeur de %d octets"
+
+#: streamutil.c:378
+#, c-format
+msgid "could not fetch group access flag: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "n'a pas pu récupérer les options d'accès du groupe : a obtenu %d lignes et %d champs, attendait %d lignes et %d champs (ou plus)"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "l'option d'accès du groupe n'a pas pu être analysé : %s"
+
+#: streamutil.c:544
+#, c-format
+msgid "could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "n'a pas pu créer le slot de réplication « %s » : a récupéré %d lignes et %d champs, attendait %d lignes et %d champs"
+
+#: streamutil.c:588
+#, c-format
+msgid "could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "n'a pas pu supprimer le slot de réplication « %s » : a récupéré %d lignes et %d champs, attendait %d lignes et %d champs"
+
+#: walmethods.c:521 walmethods.c:1057
+msgid "could not compress data"
+msgstr "n'a pas pu compresser les données"
+
+#: walmethods.c:550
+msgid "could not reset compression stream"
+msgstr "n'a pas pu réinitialiser le flux de compression"
+
+#: walmethods.c:670
+msgid "could not initialize compression library"
+msgstr "n'a pas pu initialiser la bibliothèque de compression"
+
+#: walmethods.c:681
+msgid "implementation error: tar files can't have more than one open file"
+msgstr "erreur d'implémentation : les fichiers tar ne peuvent pas avoir plus d'un fichier ouvert"
+
+#: walmethods.c:695
+msgid "could not create tar header"
+msgstr "n'a pas pu créer l'en-tête du fichier tar"
+
+#: walmethods.c:711 walmethods.c:751 walmethods.c:965 walmethods.c:977
+msgid "could not change compression parameters"
+msgstr "n'a pas pu modifier les paramètres de compression"
+
+#: walmethods.c:850
+msgid "unlink not supported with compression"
+msgstr "suppression non supportée avec la compression"
+
+#: walmethods.c:1081
+msgid "could not close compression stream"
+msgstr "n'a pas pu fermer le flux de compression"
+
+#~ msgid ""
+#~ "\n"
+#~ "Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Rapporter les bogues à <pgsql-bugs@lists.postgresql.org>.\n"
+
+#~ msgid " --help show this help, then exit\n"
+#~ msgstr " --help affiche cette aide et quitte\n"
+
+#~ msgid " --version output version information, then exit\n"
+#~ msgstr " --version affiche la version et quitte\n"
+
+#~ msgid " -?, --help show this help, then exit\n"
+#~ msgstr " -?, --help affiche cette aide puis quitte\n"
+
+#~ msgid " -V, --version output version information, then exit\n"
+#~ msgstr " -V, --version affiche la version puis quitte\n"
+
+#~ msgid " -x, --xlog include required WAL files in backup (fetch mode)\n"
+#~ msgstr ""
+#~ " -x, --xlog inclut les journaux de transactions nécessaires\n"
+#~ " dans la sauvegarde (mode fetch)\n"
+
+#~ msgid "%s: WAL directory \"%s\" not removed at user's request\n"
+#~ msgstr "%s : répertoire des journaux de transactions « %s » non supprimé à la demande de l'utilisateur\n"
+
+#~ msgid "%s: WAL directory location must be an absolute path\n"
+#~ msgstr ""
+#~ "%s : l'emplacement du répertoire des journaux de transactions doit être\n"
+#~ "indiqué avec un chemin absolu\n"
+
+#~ msgid "%s: WAL streaming can only be used in plain mode\n"
+#~ msgstr "%s : le flux de journaux de transactions peut seulement être utilisé en mode plain\n"
+
+#~ msgid "%s: cannot specify both --xlog and --xlog-method\n"
+#~ msgstr "%s : ne peut pas spécifier à la fois --xlog et --xlog-method\n"
+
+#~ msgid "%s: child process did not exit normally\n"
+#~ msgstr "%s : le processus fils n'a pas quitté normalement\n"
+
+#~ msgid "%s: child process exited with error %d\n"
+#~ msgstr "%s : le processus fils a quitté avec le code erreur %d\n"
+
+#~ msgid "%s: could not access directory \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu accéder au répertoire « %s » : %s\n"
+
+#~ msgid "%s: could not clear search_path: %s"
+#~ msgstr "%s : n'a pas pu effacer search_path : %s"
+
+#~ msgid "%s: could not close directory \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu fermer le répertoire « %s » : %s\n"
+
+#~ msgid "%s: could not close file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu fermer le fichier « %s » : %s\n"
+
+#~ msgid "%s: could not close file %s: %s\n"
+#~ msgstr "%s : n'a pas pu fermer le fichier %s : %s\n"
+
+#~ msgid "%s: could not connect to server\n"
+#~ msgstr "%s : n'a pas pu se connecter au serveur\n"
+
+#~ msgid "%s: could not connect to server: %s"
+#~ msgstr "%s : n'a pas pu se connecter au serveur : %s"
+
+#~ msgid "%s: could not create archive status file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu créer le fichier de statut d'archivage « %s » : %s\n"
+
+#~ msgid "%s: could not create directory \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu créer le répertoire « %s » : %s\n"
+
+#~ msgid "%s: could not create file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu créer le fichier « %s » : %s\n"
+
+#~ msgid "%s: could not create symbolic link \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu créer le lien symbolique « %s » : %s\n"
+
+#~ msgid "%s: could not fsync file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu synchroniser sur disque le fichier « %s » : %s\n"
+
+#~ msgid "%s: could not fsync log file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu synchroniser sur disque le fichier « %s » : %s\n"
+
+#~ msgid "%s: could not get current position in file %s: %s\n"
+#~ msgstr "%s : n'a pas pu obtenir la position courant dans le fichier %s : %s\n"
+
+#~ msgid "%s: could not identify system: %s"
+#~ msgstr "%s : n'a pas pu identifier le système : %s"
+
+#~ msgid "%s: could not identify system: %s\n"
+#~ msgstr "%s : n'a pas pu identifier le système : %s\n"
+
+#~ msgid "%s: could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields\n"
+#~ msgstr ""
+#~ "%s : n'a pas pu identifier le système, a récupéré %d lignes et %d champs,\n"
+#~ "attendait %d lignes et %d champs (ou plus)\n"
+
+#~ msgid "%s: could not open WAL segment %s: %s\n"
+#~ msgstr "%s : n'a pas pu ouvrir le segment WAL %s : %s\n"
+
+#~ msgid "%s: could not open directory \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu ouvrir le répertoire « %s » : %s\n"
+
+#~ msgid "%s: could not open file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu ouvrir le fichier « %s » : %s\n"
+
+#~ msgid "%s: could not open log file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu ouvrir le journal applicatif « %s » : %s\n"
+
+#~ msgid "%s: could not open timeline history file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu ouvrir le journal historique de la timeline « %s » : %s\n"
+
+#~ msgid "%s: could not open write-ahead log file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu ouvrir le journal de transactions « %s » : %s\n"
+
+#~ msgid "%s: could not pad WAL segment %s: %s\n"
+#~ msgstr "%s : n'a pas pu terminer le segment WAL %s : %s\n"
+
+#~ msgid "%s: could not pad transaction log file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu remplir de zéros le journal de transactions « %s » : %s\n"
+
+#~ msgid "%s: could not parse file mode\n"
+#~ msgstr "%s : n'a pas pu analyser le mode du fichier\n"
+
+#~ msgid "%s: could not parse file size\n"
+#~ msgstr "%s : n'a pas pu analyser la taille du fichier\n"
+
+#~ msgid "%s: could not parse log start position from value \"%s\"\n"
+#~ msgstr "%s : n'a pas pu analyser la position de départ des WAL à partir de la valeur « %s »\n"
+
+#~ msgid "%s: could not parse transaction log file name \"%s\"\n"
+#~ msgstr "%s : n'a pas pu analyser le nom du journal de transactions « %s »\n"
+
+#~ msgid "%s: could not read copy data: %s\n"
+#~ msgstr "%s : n'a pas pu lire les données du COPY : %s\n"
+
+#~ msgid "%s: could not read directory \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu lire le répertoire « %s » : %s\n"
+
+#~ msgid "%s: could not receive data from WAL stream: %s"
+#~ msgstr "%s : n'a pas pu recevoir des données du flux de WAL : %s"
+
+#~ msgid "%s: could not rename file \"%s\" to \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu renommer le fichier « %s » en « %s » : %s\n"
+
+#~ msgid "%s: could not rename file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu renommer le fichier « %s » : %s\n"
+
+#~ msgid "%s: could not seek back to beginning of WAL segment %s: %s\n"
+#~ msgstr "%s : n'a pas pu se déplacer au début du segment WAL %s : %s\n"
+
+#~ msgid "%s: could not seek to beginning of transaction log file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu rechercher le début du journal de transaction « %s » : %s\n"
+
+#~ msgid "%s: could not send base backup command: %s"
+#~ msgstr "%s : n'a pas pu envoyer la commande de sauvegarde de base : %s"
+
+#~ msgid "%s: could not set permissions on directory \"%s\": %s\n"
+#~ msgstr "%s : n'a pas configurer les droits sur le répertoire « %s » : %s\n"
+
+#~ msgid "%s: could not set permissions on file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu configurer les droits sur le fichier « %s » : %s\n"
+
+#~ msgid "%s: could not stat WAL segment %s: %s\n"
+#~ msgstr "%s : n'a pas pu récupérer les informations sur le segment WAL %s : %s\n"
+
+#~ msgid "%s: could not stat file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu récupérer les informations sur le fichier « %s » : %s\n"
+
+#~ msgid "%s: could not stat transaction log file \"%s\": %s\n"
+#~ msgstr ""
+#~ "%s : n'a pas pu récupérer les informations sur le journal de transactions\n"
+#~ "« %s » : %s\n"
+
+#~ msgid "%s: could not write to file \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu écrire dans le fichier « %s » : %s\n"
+
+#~ msgid "%s: data directory \"%s\" not removed at user's request\n"
+#~ msgstr "%s : répertoire des données « %s » non supprimé à la demande de l'utilisateur\n"
+
+#~ msgid "%s: directory \"%s\" exists but is not empty\n"
+#~ msgstr "%s : le répertoire « %s » existe mais n'est pas vide\n"
+
+#~ msgid "%s: failed to remove WAL directory\n"
+#~ msgstr "%s : échec de la suppression du répertoire des journaux de transactions\n"
+
+#~ msgid "%s: failed to remove contents of WAL directory\n"
+#~ msgstr "%s : échec de la suppression du contenu du répertoire des journaux de transactions\n"
+
+#~ msgid "%s: failed to remove contents of data directory\n"
+#~ msgstr "%s : échec de la suppression du contenu du répertoire des données\n"
+
+#~ msgid "%s: failed to remove data directory\n"
+#~ msgstr "%s : échec de la suppression du répertoire des données\n"
+
+#~ msgid "%s: invalid format of xlog location: %s\n"
+#~ msgstr "%s : format invalide de l'emplacement du journal de transactions : %s\n"
+
+#~ msgid "%s: invalid port number \"%s\"\n"
+#~ msgstr "%s : numéro de port invalide : « %s »\n"
+
+#~ msgid "%s: invalid socket: %s"
+#~ msgstr "%s : socket invalide : %s"
+
+#~ msgid "%s: keepalive message has incorrect size %d\n"
+#~ msgstr "%s : le message keepalive a une taille %d incorrecte\n"
+
+#~ msgid "%s: no start point returned from server\n"
+#~ msgstr "%s : aucun point de redémarrage renvoyé du serveur\n"
+
+#~ msgid "%s: out of memory\n"
+#~ msgstr "%s : mémoire épuisée\n"
+
+#~ msgid "%s: removing WAL directory \"%s\"\n"
+#~ msgstr "%s : suppression du répertoire des journaux de transactions « %s »\n"
+
+#~ msgid "%s: removing contents of WAL directory \"%s\"\n"
+#~ msgstr "%s : suppression du contenu du répertoire des journaux de transactions « %s »\n"
+
+#~ msgid "%s: removing contents of data directory \"%s\"\n"
+#~ msgstr "%s : suppression du contenu du répertoire des données « %s »\n"
+
+#~ msgid "%s: removing data directory \"%s\"\n"
+#~ msgstr "%s : suppression du répertoire des données « %s »\n"
+
+#~ msgid "%s: select() failed: %s\n"
+#~ msgstr "%s : échec de select() : %s\n"
+
+#~ msgid "%s: socket not open"
+#~ msgstr "%s : socket non ouvert"
+
+#~ msgid "%s: symlinks are not supported on this platform\n"
+#~ msgstr "%s : les liens symboliques ne sont pas supportés sur cette plateforme\n"
+
+#~ msgid "%s: timeline does not match between base backup and streaming connection\n"
+#~ msgstr ""
+#~ "%s : la timeline ne correspond pas entre la sauvegarde des fichiers et la\n"
+#~ "connexion de réplication\n"
+
+#~ msgid "%s: too many command-line arguments (first is \"%s\")\n"
+#~ msgstr "%s : trop d'arguments en ligne de commande (le premier étant « %s »)\n"
+
+#~ msgid "--create-slot and --no-slot are incompatible options"
+#~ msgstr "--create-slot et --no-slot sont des options incompatibles"
+
+#~ msgid "--no-manifest and --manifest-checksums are incompatible options"
+#~ msgstr "--no-manifest et --manifest-checksums sont des options incompatibles"
+
+#~ msgid "--no-manifest and --manifest-force-encode are incompatible options"
+#~ msgstr "--no-manifest et --manifest-force-encode sont des options incompatibles"
+
+#~ msgid "--progress and --no-estimate-size are incompatible options"
+#~ msgstr "--progress et --no-estimate-size sont des options incompatibles"
+
+#~ msgid "could not connect to server: %s"
+#~ msgstr "n'a pas pu se connecter au serveur : %s"
+
+#~ msgid "deflate failed"
+#~ msgstr "échec en décompression"
+
+#~ msgid "deflateEnd failed"
+#~ msgstr "échec de deflateEnd"
+
+#~ msgid "deflateInit2 failed"
+#~ msgstr "échec de deflateInit2"
+
+#~ msgid "deflateParams failed"
+#~ msgstr "échec de deflateParams"
+
+#~ msgid "deflateReset failed"
+#~ msgstr "échec de deflateReset"
+
+#~ msgid "select() failed: %m"
+#~ msgstr "échec de select() : %m"
diff --git a/src/bin/pg_basebackup/po/ja.po b/src/bin/pg_basebackup/po/ja.po
new file mode 100644
index 0000000..9061033
--- /dev/null
+++ b/src/bin/pg_basebackup/po/ja.po
@@ -0,0 +1,1487 @@
+# pg_basebackup.po
+# Japanese message translation file for pg_basebackup
+#
+# Copyright (C) 2013-2022 PostgreSQL Global Development Group
+#
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# <iwata.aya@jp.fujitsu.com>, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_basebackup (PostgreSQL 14)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-05-12 14:05+0900\n"
+"PO-Revision-Date: 2022-05-12 14:37+0900\n"
+"Last-Translator: Kyotaro Horiguchi <horikyota.ntt@gmail.com>\n"
+"Language-Team: Japan PostgreSQL Users Group <jpug-doc@ml.postgresql.jp>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.8.13\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "致命的エラー: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "エラー: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "警告: "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98 ../../common/fe_memutils.c:162
+#, c-format
+msgid "out of memory\n"
+msgstr "メモリ不足\n"
+
+#: ../../common/fe_memutils.c:92 ../../common/fe_memutils.c:154
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "nullポインタは複製できません (内部エラー)\n"
+
+#: ../../common/file_utils.c:87 ../../common/file_utils.c:451
+#: pg_receivewal.c:266 pg_recvlogical.c:339
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "ファイル\"%s\"のstatに失敗しました: %m"
+
+#: ../../common/file_utils.c:166 pg_receivewal.c:169
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "ディレクトリ\"%s\"をオープンできませんでした: %m"
+
+#: ../../common/file_utils.c:200 pg_receivewal.c:337
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "ディレクトリ\"%s\"を読み取れませんでした: %m"
+
+#: ../../common/file_utils.c:232 ../../common/file_utils.c:291
+#: ../../common/file_utils.c:365 ../../fe_utils/recovery_gen.c:134
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "ファイル\"%s\"をオープンできませんでした: %m"
+
+#: ../../common/file_utils.c:303 ../../common/file_utils.c:373
+#: pg_recvlogical.c:193
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "ファイル\"%s\"をfsyncできませんでした: %m"
+
+#: ../../common/file_utils.c:383
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "ファイル\"%s\"の名前を\"%s\"に変更できませんでした: %m"
+
+#: ../../fe_utils/recovery_gen.c:35 ../../fe_utils/recovery_gen.c:49
+#: ../../fe_utils/recovery_gen.c:77 ../../fe_utils/recovery_gen.c:100
+#: ../../fe_utils/recovery_gen.c:171 pg_basebackup.c:1248
+#, c-format
+msgid "out of memory"
+msgstr "メモリ不足"
+
+#: ../../fe_utils/recovery_gen.c:140 pg_basebackup.c:1021 pg_basebackup.c:1715
+#: pg_basebackup.c:1771
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "ファイル\"%s\"に書き込めませんでした: %m"
+
+#: ../../fe_utils/recovery_gen.c:152 pg_basebackup.c:1166 pg_basebackup.c:1672
+#: pg_basebackup.c:1748
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "ファイル\"%s\"を作成できませんでした: %m"
+
+#: pg_basebackup.c:224
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "データディレクトリ\"%s\"を削除しています"
+
+#: pg_basebackup.c:226
+#, c-format
+msgid "failed to remove data directory"
+msgstr "データディレクトリの削除に失敗しました"
+
+#: pg_basebackup.c:230
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "データディレクトリ\"%s\"の内容を削除しています"
+
+#: pg_basebackup.c:232
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "データディレクトリの内容の削除に失敗しました"
+
+#: pg_basebackup.c:237
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "WALディレクトリ\"%s\"を削除しています"
+
+#: pg_basebackup.c:239
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "WALディレクトリの削除に失敗しました"
+
+#: pg_basebackup.c:243
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "WALディレクトリ\"%s\"の中身を削除しています"
+
+#: pg_basebackup.c:245
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "WALディレクトリの中身の削除に失敗しました"
+
+#: pg_basebackup.c:251
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "ユーザーの要求により、データディレクトリ\"%s\"を削除しませんでした"
+
+#: pg_basebackup.c:254
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "ユーザーの要求により、WALディレクトリ\"%s\"を削除しませんでした"
+
+#: pg_basebackup.c:258
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "テーブル空間用ディレクトリへの変更は取り消されません"
+
+#: pg_basebackup.c:299
+#, c-format
+msgid "directory name too long"
+msgstr "ディレクトリ名が長すぎます"
+
+#: pg_basebackup.c:309
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "テーブル空間のマッピングに複数の\"=\"記号があります"
+
+#: pg_basebackup.c:321
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr "テーブル空間のマッピング形式\"%s\"が不正です。\"旧DIR=新DIR\"でなければなりません"
+
+#: pg_basebackup.c:333
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr "テーブル空間のマッピングにおいて、旧ディレクトリが絶対パスではありません: %s"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr "テーブル空間のマッピングにおいて、新ディレクトリが絶対パスではありません: %s"
+
+#: pg_basebackup.c:379
+#, c-format
+msgid ""
+"%s takes a base backup of a running PostgreSQL server.\n"
+"\n"
+msgstr ""
+"%sは実行中のPostgreSQLサーバーのベースバックアップを取得します。\n"
+"\n"
+
+#: pg_basebackup.c:381 pg_receivewal.c:79 pg_recvlogical.c:75
+#, c-format
+msgid "Usage:\n"
+msgstr "使用方法:\n"
+
+#: pg_basebackup.c:382 pg_receivewal.c:80 pg_recvlogical.c:76
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s [オプション]...\n"
+
+#: pg_basebackup.c:383
+#, c-format
+msgid ""
+"\n"
+"Options controlling the output:\n"
+msgstr ""
+"\n"
+"出力を制御するオプション:\n"
+
+#: pg_basebackup.c:384
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, --pgdata=DIRECTORY ベースバックアップをディレクトリ内に格納\n"
+
+#: pg_basebackup.c:385
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr " -F, --format=p|t 出力フォーマット(プレイン(デフォルト)またはtar)\n"
+
+#: pg_basebackup.c:386
+#, c-format
+msgid ""
+" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr ""
+" -r, --max-rate=RATE データディレクトリ転送の際の最大転送速度\n"
+" (kB/s 単位、または 接尾辞 \"k\" か\"M\" を使用)\n"
+
+#: pg_basebackup.c:388
+#, c-format
+msgid ""
+" -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr ""
+" -R, --write-recovery-conf\n"
+" レプリケーションのための設定を書き込む\n"
+
+#: pg_basebackup.c:390
+#, c-format
+msgid ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr ""
+" -T, --tablespace-mapping=旧DIR=新DIR\n"
+" テーブル空間を旧DIRから新DIRに移動する\n"
+
+#: pg_basebackup.c:392
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr " --waldir=WALDIR 先行書き込みログ用ディレクトリの位置\n"
+
+#: pg_basebackup.c:393
+#, c-format
+msgid ""
+" -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr ""
+" -X, --wal-method=none|fetch|stream\n"
+" 要求されたWALファイルを指定のメソッドを使ってバック\n"
+" アップに含める\n"
+
+#: pg_basebackup.c:395
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr " -z, --gzip tar の出力を圧縮する\n"
+
+#: pg_basebackup.c:396
+#, c-format
+msgid " -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr " -Z, --compress=0-9 指定した圧縮レベルで tar の出力を圧縮する\n"
+
+#: pg_basebackup.c:397
+#, c-format
+msgid ""
+"\n"
+"General options:\n"
+msgstr ""
+"\n"
+"一般的なオプション:\n"
+
+#: pg_basebackup.c:398
+#, c-format
+msgid ""
+" -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr ""
+" -c, --checkpoint=fast|spread\n"
+" 高速または分散チェックポイント処理の指定\n"
+
+#: pg_basebackup.c:400
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " -C, --create-slot 新しいレプリケーションスロットを作成する\n"
+
+#: pg_basebackup.c:401
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=LABEL バックアップラベルの設定\n"
+
+#: pg_basebackup.c:402
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --noclean エラー発生後作成したファイルの削除を行わない\n"
+
+#: pg_basebackup.c:403
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --nosync ディスクへの安全な書き込みを待機しない\n"
+
+#: pg_basebackup.c:404
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress 進行状況の表示\n"
+
+#: pg_basebackup.c:405 pg_receivewal.c:89
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=スロット名 使用するレプリケーションスロット\n"
+
+#: pg_basebackup.c:406 pg_receivewal.c:91 pg_recvlogical.c:96
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose 冗長メッセージの出力\n"
+
+#: pg_basebackup.c:407 pg_receivewal.c:92 pg_recvlogical.c:97
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version バージョン情報を表示して終了\n"
+
+#: pg_basebackup.c:408
+#, c-format
+msgid ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" use algorithm for manifest checksums\n"
+msgstr ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" 目録チェックサムに使用するアルゴリズム\n"
+
+#: pg_basebackup.c:410
+#, c-format
+msgid ""
+" --manifest-force-encode\n"
+" hex encode all file names in manifest\n"
+msgstr ""
+" --manifest-force-encode\n"
+" 目録中の全てのファイル名を16進エンコードする\n"
+
+#: pg_basebackup.c:412
+#, c-format
+msgid " --no-estimate-size do not estimate backup size in server side\n"
+msgstr " --no-estimate-size サーバー側でバックアップサイズを見積もらない\n"
+
+#: pg_basebackup.c:413
+#, c-format
+msgid " --no-manifest suppress generation of backup manifest\n"
+msgstr " --no-manifest バックアップ目録の作成を省略する\n"
+
+#: pg_basebackup.c:414
+#, c-format
+msgid " --no-slot prevent creation of temporary replication slot\n"
+msgstr " --no-slot 一時レプリケーションスロットの作成を行わない\n"
+
+#: pg_basebackup.c:415
+#, c-format
+msgid ""
+" --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr ""
+" --no-verify-checksums\n"
+" チェックサムを検証しない\n"
+
+#: pg_basebackup.c:417 pg_receivewal.c:94 pg_recvlogical.c:98
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help このヘルプを表示して終了\n"
+
+#: pg_basebackup.c:418 pg_receivewal.c:95 pg_recvlogical.c:99
+#, c-format
+msgid ""
+"\n"
+"Connection options:\n"
+msgstr ""
+"\n"
+"接続オプション:\n"
+
+#: pg_basebackup.c:419 pg_receivewal.c:96
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=CONNSTR 接続文字列\n"
+
+#: pg_basebackup.c:420 pg_receivewal.c:97 pg_recvlogical.c:101
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr " -h, --host=HOSTNAME データベースサーバーホストまたはソケットディレクトリ\n"
+
+#: pg_basebackup.c:421 pg_receivewal.c:98 pg_recvlogical.c:102
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=PORT データベースサーバーのポート番号\n"
+
+#: pg_basebackup.c:422
+#, c-format
+msgid ""
+" -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in seconds)\n"
+msgstr ""
+" -s, --status-interval=INTERVAL\n"
+" サーバーへ送出するステータスパケットの間隔(秒単位)\n"
+
+#: pg_basebackup.c:424 pg_receivewal.c:99 pg_recvlogical.c:103
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr " -U, --username=NAME 指定したデータベースユーザーで接続\n"
+
+#: pg_basebackup.c:425 pg_receivewal.c:100 pg_recvlogical.c:104
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password パスワードの入力を要求しない\n"
+
+#: pg_basebackup.c:426 pg_receivewal.c:101 pg_recvlogical.c:105
+#, c-format
+msgid " -W, --password force password prompt (should happen automatically)\n"
+msgstr " -W, --password パスワード入力要求を強制(自動的に行われるはず)\n"
+
+#: pg_basebackup.c:427 pg_receivewal.c:105 pg_recvlogical.c:106
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"バグは<%s>に報告してください。\n"
+
+#: pg_basebackup.c:428 pg_receivewal.c:106 pg_recvlogical.c:107
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s ホームページ: <%s>\n"
+
+#: pg_basebackup.c:471
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "準備ができたパイプからの読み込みが失敗しました: %m"
+
+#: pg_basebackup.c:477 pg_basebackup.c:608 pg_basebackup.c:2134
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "先行書き込みログの位置\"%s\"をパースできませんでした"
+
+#: pg_basebackup.c:573 pg_receivewal.c:441
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "WALファイルの書き込みを終了できませんでした: %m"
+
+#: pg_basebackup.c:620
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "バックグランドプロセス用のパイプを作成できませんでした: \"%m"
+
+#: pg_basebackup.c:655
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "一時レプリケーションスロット\"%s\"を作成しました"
+
+#: pg_basebackup.c:658
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "レプリケーションスロット\"%s\"を作成していました"
+
+#: pg_basebackup.c:678 pg_basebackup.c:731 pg_basebackup.c:1621
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "ディレクトリ\"%s\"を作成できませんでした: %m"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not create background process: %m"
+msgstr "バックグラウンドプロセスを生成できませんでした: %m"
+
+#: pg_basebackup.c:708
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "バックグラウンドスレッドを生成できませんでした: %m"
+
+#: pg_basebackup.c:752
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "ディレクトリ\"%s\"は存在しますが、空ではありません"
+
+#: pg_basebackup.c:759
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "ディレクトリ\"%s\"にアクセスできませんでした: %m"
+
+#: pg_basebackup.c:824
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s kB (100%%), %d/%d テーブル空間 %*s"
+
+#: pg_basebackup.c:836
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d テーブル空間 (%s%-*.*s)"
+
+#: pg_basebackup.c:852
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d テーブル空間"
+
+#: pg_basebackup.c:877
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "転送速度\"%s\"は無効な値です"
+
+#: pg_basebackup.c:882
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "転送速度\"%s\"は無効です: %m"
+
+#: pg_basebackup.c:891
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "転送速度は0より大きな値でなければなりません"
+
+#: pg_basebackup.c:923
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "--max-rate の単位が不正です: \"%s\""
+
+#: pg_basebackup.c:930
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "転送速度\"%s\"がintegerの範囲を超えています"
+
+#: pg_basebackup.c:940
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "転送速度\"%s\"が範囲外です"
+
+#: pg_basebackup.c:961
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "COPYデータストリームを取得できませんでした: %s"
+
+#: pg_basebackup.c:981 pg_recvlogical.c:434 pg_recvlogical.c:606
+#: receivelog.c:978
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "COPYデータを読み取ることができませんでした: %s"
+
+#: pg_basebackup.c:1007
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "圧縮ファイル\"%s\"に書き込めませんでした: %s"
+
+#: pg_basebackup.c:1071
+#, c-format
+msgid "could not duplicate stdout: %m"
+msgstr "標準出力の複製に失敗しました: %m"
+
+#: pg_basebackup.c:1078
+#, c-format
+msgid "could not open output file: %m"
+msgstr "出力ファイルをオープンできませんでした: %m"
+
+#: pg_basebackup.c:1085 pg_basebackup.c:1106 pg_basebackup.c:1135
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "圧縮レベルを%dに設定できませんでした: %s"
+
+#: pg_basebackup.c:1155
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "圧縮ファイル\"%s\"を作成できませんでした: %s"
+
+#: pg_basebackup.c:1268
+#, c-format
+msgid "could not close compressed file \"%s\": %m"
+msgstr "圧縮ファイル\"%s\"をクローズできませんでした: %m"
+
+#: pg_basebackup.c:1280 pg_recvlogical.c:631
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "ファイル\"%s\"をクローズできませんでした: %m"
+
+#: pg_basebackup.c:1542
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "最後のファイルが終わる前にCOPYストリームが終了しました"
+
+#: pg_basebackup.c:1571
+#, c-format
+msgid "invalid tar block header size: %zu"
+msgstr "無効なtarブロックヘッダサイズ: %zu"
+
+#: pg_basebackup.c:1628
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "ディレクトリ\"%s\"に権限を設定できませんでした: %m"
+
+#: pg_basebackup.c:1652
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "\"%s\"から\"%s\"へのシンボリックリンクを作成できませんでした: %m"
+
+#: pg_basebackup.c:1659
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "リンク指示子\"%c\"を認識できません"
+
+#: pg_basebackup.c:1678
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "ファイル\"%s\"の権限を設定できませんでした: %m"
+
+#: pg_basebackup.c:1832
+#, c-format
+msgid "incompatible server version %s"
+msgstr "非互換のサーバーバージョン \"%s\""
+
+#: pg_basebackup.c:1847
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr "ヒント: -X none または -X fetch でログストリーミングを無効にできます"
+
+#: pg_basebackup.c:1883
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr "ベースバックアップを開始しています - チェックポイントの完了を待機中"
+
+#: pg_basebackup.c:1909 pg_recvlogical.c:261 receivelog.c:494 receivelog.c:543
+#: receivelog.c:582 streamutil.c:297 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "レプリケーションコマンド\"%s\"を送信できませんでした: %s"
+
+#: pg_basebackup.c:1920
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "ベースバックアップを開始できませんでした: %s"
+
+#: pg_basebackup.c:1926
+#, c-format
+msgid "server returned unexpected response to BASE_BACKUP command; got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "サーバーが BASE_BACKUP コマンドに期待していない応答を返しました; %d行 %d列を受信しましたが期待は %d列 %d行でした"
+
+#: pg_basebackup.c:1934
+#, c-format
+msgid "checkpoint completed"
+msgstr "チェックポイントが完了しました"
+
+#: pg_basebackup.c:1949
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "先行書き込みログの開始ポイント: タイムライン %2$u 上の %1$s"
+
+#: pg_basebackup.c:1958
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "バックアップヘッダを取得できませんでした: %s"
+
+#: pg_basebackup.c:1964
+#, c-format
+msgid "no data returned from server"
+msgstr "サーバーからデータが返されませんでした"
+
+#: pg_basebackup.c:1996
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr "標準出力に書き出せるテーブル空間は1つだけですが、データベースには%d個あります"
+
+#: pg_basebackup.c:2008
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "バックグランドWAL受信処理を起動します"
+
+#: pg_basebackup.c:2047
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr "サーバーから先行書き込みログの終了位置を取得できませんでした: %s"
+
+#: pg_basebackup.c:2053
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "サーバーから先行書き込みログの終了位置が返されませんでした"
+
+#: pg_basebackup.c:2058
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "先行書き込みログの終了ポイント: %s"
+
+#: pg_basebackup.c:2069
+#, c-format
+msgid "checksum error occurred"
+msgstr "チェックサムエラーが発生しました"
+
+#: pg_basebackup.c:2074
+#, c-format
+msgid "final receive failed: %s"
+msgstr "終端の受信に失敗しました: %s"
+
+#: pg_basebackup.c:2098
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "バックグランドプロセスがストリーミング処理が終わるまで待機します ..."
+
+#: pg_basebackup.c:2103
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "バックグランドへのパイプにコマンドを送信できませんでした: %m"
+
+#: pg_basebackup.c:2111
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "子プロセスの待機ができませんでした: %m"
+
+#: pg_basebackup.c:2116
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "子プロセス %d が終了しましたが、期待していたのは %d でした"
+
+#: pg_basebackup.c:2121 streamutil.c:92 streamutil.c:203
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2146
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "子スレッドの待機ができませんでした: %m"
+
+#: pg_basebackup.c:2152
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "子スレッドの終了ステータスを取得できませんでした: %m"
+
+#: pg_basebackup.c:2157
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "子スレッドがエラー%uで終了しました"
+
+#: pg_basebackup.c:2185
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "データをディスクに同期しています..."
+
+#: pg_basebackup.c:2210
+#, c-format
+msgid "renaming backup_manifest.tmp to backup_manifest"
+msgstr "backup_manifest.tmp の名前を backup_manifest に変更してください"
+
+#: pg_basebackup.c:2221
+#, c-format
+msgid "base backup completed"
+msgstr "ベースバックアップが完了しました"
+
+#: pg_basebackup.c:2306
+#, c-format
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\""
+msgstr "不正な出力フォーマット\"%s\"、\"plain\"か\"tar\"でなければなりません"
+
+#: pg_basebackup.c:2350
+#, c-format
+msgid "invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr "不正な wal-method オプション\"%s\"、\"fetch\"、\"stream\" または \"none\" のいずれかでなければなりません"
+
+#: pg_basebackup.c:2378 pg_receivewal.c:580
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "無効な圧縮レベル \"%s\""
+
+#: pg_basebackup.c:2389
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr "不正な checkpoint の引数\"%s\"、\"fast\" または \"spreadでなければなりません"
+
+#: pg_basebackup.c:2416 pg_receivewal.c:555 pg_recvlogical.c:819
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "不正な status-interval \"%s\""
+
+#: pg_basebackup.c:2446 pg_basebackup.c:2459 pg_basebackup.c:2470
+#: pg_basebackup.c:2481 pg_basebackup.c:2489 pg_basebackup.c:2497
+#: pg_basebackup.c:2507 pg_basebackup.c:2520 pg_basebackup.c:2529
+#: pg_basebackup.c:2540 pg_basebackup.c:2550 pg_basebackup.c:2568
+#: pg_basebackup.c:2577 pg_basebackup.c:2586 pg_receivewal.c:605
+#: pg_receivewal.c:618 pg_receivewal.c:626 pg_receivewal.c:636
+#: pg_receivewal.c:644 pg_receivewal.c:655 pg_recvlogical.c:845
+#: pg_recvlogical.c:858 pg_recvlogical.c:869 pg_recvlogical.c:877
+#: pg_recvlogical.c:885 pg_recvlogical.c:893 pg_recvlogical.c:901
+#: pg_recvlogical.c:909 pg_recvlogical.c:917
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "詳細は\"%s --help\"で確認してください。\n"
+
+#: pg_basebackup.c:2457 pg_receivewal.c:616 pg_recvlogical.c:856
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "コマンドライン引数が多すぎます (先頭は\"%s\")"
+
+#: pg_basebackup.c:2469 pg_receivewal.c:654
+#, c-format
+msgid "no target directory specified"
+msgstr "格納先ディレクトリが指定されていません"
+
+#: pg_basebackup.c:2480
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "tarモードでのバックアップのみが圧縮可能です"
+
+#: pg_basebackup.c:2488
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "標準出力への tar モードでは書き込み先行ログをストリーム出力できません"
+
+#: pg_basebackup.c:2496
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "レプリケーションスロットはWALストリーミングでのみ使用可能です"
+
+#: pg_basebackup.c:2506
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "--no-slot はスロット名と同時には指定できません"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2518 pg_receivewal.c:634
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "%s は --slot でスロットを指定する必要があります"
+
+#: pg_basebackup.c:2527 pg_basebackup.c:2566 pg_basebackup.c:2575
+#: pg_basebackup.c:2584
+#, c-format
+msgid "%s and %s are incompatible options"
+msgstr "%s と %s は非互換なオプションです"
+
+#: pg_basebackup.c:2539
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "WALディレクトリの位置は plainモードでのみ指定可能です"
+
+#: pg_basebackup.c:2549
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "WALディレクトリの位置は、絶対パスでなければなりません"
+
+#: pg_basebackup.c:2559 pg_receivewal.c:663
+#, c-format
+msgid "this build does not support compression"
+msgstr "このビルドでは圧縮をサポートしていません"
+
+#: pg_basebackup.c:2644
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "シンボリックリンク\"%s\"を作成できませんでした: %m"
+
+#: pg_basebackup.c:2648
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "このプラットフォームでシンボリックリンクはサポートされていません"
+
+#: pg_receivewal.c:77
+#, c-format
+msgid ""
+"%s receives PostgreSQL streaming write-ahead logs.\n"
+"\n"
+msgstr ""
+"%sはPostgreSQLの先行書き込みログストリームを受信します。\n"
+"\n"
+
+#: pg_receivewal.c:81 pg_recvlogical.c:81
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"オプション:\n"
+
+#: pg_receivewal.c:82
+#, c-format
+msgid " -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr " -D, --directory=DIR 受信した先行書き込みログの格納ディレクトリ\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:82
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr " -E, --endpos=LSN 指定したLSNの受信後に終了\n"
+
+#: pg_receivewal.c:84 pg_recvlogical.c:86
+#, c-format
+msgid " --if-not-exists do not error if slot already exists when creating a slot\n"
+msgstr "   --if-not-exists スロットの作成時に既に存在していてもエラーとしない\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:88
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop 接続断の際にループしない\n"
+
+#: pg_receivewal.c:86
+#, c-format
+msgid " --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " --no-sync ディスクへの安全な書き込みの待機を行わない\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:93
+#, c-format
+msgid ""
+" -s, --status-interval=SECS\n"
+" time between status packets sent to server (default: %d)\n"
+msgstr ""
+" -s, --status-interval=SECS\n"
+" サーバーへ送出するステータスパケットの間隔\n"
+" (デフォルト: %d)\n"
+
+#: pg_receivewal.c:90
+#, c-format
+msgid " --synchronous flush write-ahead log immediately after writing\n"
+msgstr " --synchronous 先行書き込みログを書き込み後直ちにフラッシュ\n"
+
+#: pg_receivewal.c:93
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr " -Z, --compress=0-9 指定した圧縮レベルでログを圧縮\n"
+
+#: pg_receivewal.c:102
+#, c-format
+msgid ""
+"\n"
+"Optional actions:\n"
+msgstr ""
+"\n"
+"追加の動作:\n"
+
+#: pg_receivewal.c:103 pg_recvlogical.c:78
+#, c-format
+msgid " --create-slot create a new replication slot (for the slot's name see --slot)\n"
+msgstr ""
+" --create-slot 新しいレプリケーションスロットを作成する\n"
+" (スロット名については --slot を参照)\n"
+
+#: pg_receivewal.c:104 pg_recvlogical.c:79
+#, c-format
+msgid " --drop-slot drop the replication slot (for the slot's name see --slot)\n"
+msgstr ""
+" --drop-slot レプリケーションスロットを削除する\n"
+" (スロット名については --slot を参照)\n"
+
+#: pg_receivewal.c:117
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "%X/%X (タイムライン %u)でセグメントが完了"
+
+#: pg_receivewal.c:124
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "%X/%X (タイムライン %u)でログのストリーミングを停止しました"
+
+#: pg_receivewal.c:140
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "%3$X/%2$Xで タイムライン%1$uに切り替えました"
+
+#: pg_receivewal.c:150
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "割り込みシグナルを受信、終了します"
+
+#: pg_receivewal.c:186
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "ディレクトリ\"%s\"をクローズできませんでした: %m"
+
+#: pg_receivewal.c:272
+#, c-format
+msgid "segment file \"%s\" has incorrect size %lld, skipping"
+msgstr "セグメントファイル\"%s\"のサイズ %lld が不正です、スキップします"
+
+#: pg_receivewal.c:290
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "圧縮ファイル\"%s\"を開けませんでした: %m"
+
+#: pg_receivewal.c:296
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "圧縮ファイル\"%s\"でseekできませんでした: %m"
+
+#: pg_receivewal.c:304
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "圧縮ファイル\"%s\"を読めませんでした: %m"
+
+#: pg_receivewal.c:307
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "圧縮ファイル\"%1$s\"を読めませんでした: %3$zuバイトのうち%2$dバイトを読み込み済み"
+
+#: pg_receivewal.c:318
+#, c-format
+msgid "compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr "圧縮セグメントファイル\"%s\"の展開後サイズ%dが不正です、スキップします"
+
+#: pg_receivewal.c:422
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "%X/%X (タイムライン %u)からログのストリーミングを開始"
+
+#: pg_receivewal.c:537 pg_recvlogical.c:761
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "不正なポート番号: \"%s\""
+
+#: pg_receivewal.c:565 pg_recvlogical.c:787
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "終了位置\"%s\"をパースできませんでした"
+
+#: pg_receivewal.c:625
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "--create-slot は --drop-slot と同時には指定できません"
+
+#: pg_receivewal.c:643
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "--synchronous は --no-sync と同時には指定できません"
+
+#: pg_receivewal.c:723
+#, c-format
+msgid "replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr "スロット\"%s\"を使用するレプリケーション接続で、想定に反してデータベースが指定されています"
+
+#: pg_receivewal.c:734 pg_recvlogical.c:968
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "レプリケーションスロット\"%s\"を削除しています"
+
+#: pg_receivewal.c:745 pg_recvlogical.c:978
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "レプリケーションスロット\"%s\"を作成しています"
+
+#: pg_receivewal.c:771 pg_recvlogical.c:1003
+#, c-format
+msgid "disconnected"
+msgstr "切断しました"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:777 pg_recvlogical.c:1009
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "切断しました; %d秒待機して再試行します"
+
+#: pg_recvlogical.c:73
+#, c-format
+msgid ""
+"%s controls PostgreSQL logical decoding streams.\n"
+"\n"
+msgstr ""
+"%s はPostgreSQLの論理デコードストリームを制御します。\n"
+"\n"
+
+#: pg_recvlogical.c:77
+#, c-format
+msgid ""
+"\n"
+"Action to be performed:\n"
+msgstr ""
+"\n"
+"実行する動作:\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid " --start start streaming in a replication slot (for the slot's name see --slot)\n"
+msgstr ""
+" --start レプリケーションスロットでストリーミングを開始する\n"
+" (スロット名については --slot を参照)\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr " -f, --file=FILE このファイルにログを受け取る、 - で標準出力\n"
+
+#: pg_recvlogical.c:84
+#, c-format
+msgid ""
+" -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: %d)\n"
+msgstr ""
+" -F --fsync-interval=SECS\n"
+" 出力ファイルへのfsync時間間隔(デフォルト: %d)\n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid " -I, --startpos=LSN where in an existing slot should the streaming start\n"
+msgstr " -I, --startpos=LSN 既存スロット内のストリーミング開始位置\n"
+
+#: pg_recvlogical.c:89
+#, c-format
+msgid ""
+" -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr ""
+" -o, --option=NAME[=VALUE]\n"
+" 出力プラグインにオプションNAMEをオプション値VALUEと\n"
+" ともに渡す\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr " -P, --plugin=PLUGIN 出力プラグインPLUGINを使う(デフォルト: %s)\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=SLOTNAME 論理レプリケーションスロットの名前\n"
+
+#: pg_recvlogical.c:100
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=DBNAME 接続先データベース\n"
+
+#: pg_recvlogical.c:133
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "PrecPpg%X/%Xまでの書き込みと、%X/%X (スロット %s)までのフラッシュを確認しています"
+
+#: pg_recvlogical.c:157 receivelog.c:356
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "フィードバックパケットを送信できませんでした: %s"
+
+#: pg_recvlogical.c:228
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "%X/%X (スロット %s)からログのストリーミングを開始します"
+
+#: pg_recvlogical.c:270
+#, c-format
+msgid "streaming initiated"
+msgstr "ストリーミングを開始しました"
+
+#: pg_recvlogical.c:334
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "ログファイル\"%s\"をオープンできませんでした: %m"
+
+#: pg_recvlogical.c:360 receivelog.c:886
+#, c-format
+msgid "invalid socket: %s"
+msgstr "無効なソケット: %s"
+
+#: pg_recvlogical.c:413 receivelog.c:914
+#, c-format
+msgid "%s() failed: %m"
+msgstr "%s() が失敗しました: %m"
+
+#: pg_recvlogical.c:420 receivelog.c:964
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "WAL ストリームからデータを受信できませんでした: %s"
+
+#: pg_recvlogical.c:462 pg_recvlogical.c:513 receivelog.c:1008
+#: receivelog.c:1074
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "ストリーミングヘッダが小さ過ぎます: %d"
+
+#: pg_recvlogical.c:497 receivelog.c:846
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "ストリーミングヘッダを認識できませんでした: \"%c\""
+
+#: pg_recvlogical.c:551 pg_recvlogical.c:563
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "%u バイトをログファイル\"%s\"に書き込めませんでした: %m"
+
+#: pg_recvlogical.c:617 receivelog.c:642 receivelog.c:679
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "レプリケーションストリームが突然終了しました: %s"
+
+#: pg_recvlogical.c:741
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "不正なfsync間隔 \"%s\""
+
+#: pg_recvlogical.c:779
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "開始位置\"%s\"をパースできませんでした"
+
+#: pg_recvlogical.c:868
+#, c-format
+msgid "no slot specified"
+msgstr "スロットが指定されていません"
+
+#: pg_recvlogical.c:876
+#, c-format
+msgid "no target file specified"
+msgstr "ターゲットファイルが指定されていません"
+
+#: pg_recvlogical.c:884
+#, c-format
+msgid "no database specified"
+msgstr "データベースが指定されていません"
+
+#: pg_recvlogical.c:892
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "少なくとも一つのアクションを指定する必要があります"
+
+#: pg_recvlogical.c:900
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr "--create-slot や --start は --drop-slot と同時には指定できません"
+
+#: pg_recvlogical.c:908
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr "--create-slot や --drop-slot は --startpos と同時には指定できません"
+
+#: pg_recvlogical.c:916
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "--endpos は --start が指定されているときにのみ指定可能です"
+
+#: pg_recvlogical.c:950
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr "データベース指定のレプリケーション接続が確立できませんでした"
+
+#: pg_recvlogical.c:1049
+#, c-format
+msgid "end position %X/%X reached by keepalive"
+msgstr "キープアライブで終了位置 %X/%X に到達しました "
+
+#: pg_recvlogical.c:1052
+#, c-format
+msgid "end position %X/%X reached by WAL record at %X/%X"
+msgstr "%X/%X のWALレコードで終了位置 %X/%X に到達しました"
+
+#: receivelog.c:68
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "アーカイブステータスファイル\"%s\"を作成できませんでした: %s"
+
+#: receivelog.c:75
+#, c-format
+msgid "could not close archive status file \"%s\": %s"
+msgstr "アーカイブステータスファイル\"%s\"をクローズできませんでした: %s"
+
+#: receivelog.c:123
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "先行書き込みログファイル\"%s\"のサイズを取得できませんでした: %s"
+
+#: receivelog.c:134
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "既存の先行書き込みログファイル\"%s\"をオープンできませんでした: %s"
+
+#: receivelog.c:143
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr "既存の先行書き込みログファイル\"%s\"をfsyncできませんでした: %s"
+
+#: receivelog.c:158
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] "先行書き込みログファイル\"%s\"は%dバイトですが、0または%dであるはずです"
+
+#: receivelog.c:174
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "先行書き込みログファイル\"%s\"をオープンできませんでした: %s"
+
+#: receivelog.c:202
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "ファイル\"%s\"のシーク位置を取得できませんでした: %s"
+
+#: receivelog.c:216
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "\"%s%s\"の名前を変更しません、セグメントが完全ではありません"
+
+#: receivelog.c:228 receivelog.c:313 receivelog.c:688
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "ファイル\"%s\"をクローズできませんでした: %s"
+
+#: receivelog.c:285
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "サーバーがタイムライン%uに対する想定外の履歴ファイル名を通知してきました: %s"
+
+#: receivelog.c:293
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "タイムライン履歴ファイル\"%s\"を作成できませんでした: %s"
+
+#: receivelog.c:300
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "タイムライン履歴ファイル\"%s\"に書き込めませんでした: %s"
+
+#: receivelog.c:390
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions older than %s"
+msgstr "非互換のサーバーバージョン%s、クライアントは%sより古いサーバーバージョンからのストリーミングをサポートしていません"
+
+#: receivelog.c:399
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions newer than %s"
+msgstr "非互換のサーバーバージョン%s、クライアントは%sより新しいサーバーバージョンからのストリーミングをサポートしていません"
+
+#: receivelog.c:501 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid "could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "システムを識別できませんでした: 受信したのは%d行%d列、想定は%d行%d列以上"
+
+#: receivelog.c:508
+#, c-format
+msgid "system identifier does not match between base backup and streaming connection"
+msgstr "システム識別子がベースバックアップとストリーミング接続の間で一致しません"
+
+#: receivelog.c:514
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "開始タイムライン%uがサーバーに存在しません"
+
+#: receivelog.c:555
+#, c-format
+msgid "unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "TIMELINE_HISTORYコマンドへの想定外の応答: 受信したのは%d行%d列、想定は%d行%d列"
+
+#: receivelog.c:626
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "サーバーがタイムライン%2$uに続いて想定外のタイムライン%1$uを通知してきました"
+
+#: receivelog.c:632
+#, c-format
+msgid "server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"
+msgstr "サーバーはタイムライン%uのストリーミングを%X/%Xで停止しました、しかし次のタイムライン%uが%X/%Xから開始すると通知してきています"
+
+#: receivelog.c:672
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "レプリケーションストリームが停止ポイントより前で終了しました"
+
+#: receivelog.c:718
+#, c-format
+msgid "unexpected result set after end-of-timeline: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "タイムライン終了後に想定外の結果セット: 受信したのは%d行%d列、想定は%d行%d列"
+
+#: receivelog.c:727
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "次のタイムラインの開始ポイント\"%s\"をパースできませんでした"
+
+#: receivelog.c:776 receivelog.c:1028 walmethods.c:994
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "ファイル\"%s\"をfsyncできませんでした: %s"
+
+#: receivelog.c:1091
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "ファイルがオープンされていない状態で、オフセット%uに対する先行書き込みログレコードを受信しました"
+
+#: receivelog.c:1101
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "WALデータオフセット%08xを受信、想定は%08x"
+
+#: receivelog.c:1135
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "WALファイル\"%2$s\"に%1$uバイト書き込めませんでした: %3$s"
+
+#: receivelog.c:1160 receivelog.c:1200 receivelog.c:1230
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "コピー終端パケットを送信できませんでした: %s"
+
+#: streamutil.c:162
+msgid "Password: "
+msgstr "パスワード: "
+
+#: streamutil.c:186
+#, c-format
+msgid "could not connect to server"
+msgstr "サーバーに接続できませんでした"
+
+#: streamutil.c:231
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "search_pathを消去できませんでした: %s"
+
+#: streamutil.c:247
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "integer_datetimesのサーバー設定を取得できませんでした"
+
+#: streamutil.c:254
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "integer_datetimesコンパイル時フラグがサーバーと一致しません"
+
+#: streamutil.c:305
+#, c-format
+msgid "could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "WALセグメントサイズを取得できませんでした: 受信したのは%d行で%d列、想定は%d行で%d列以上"
+
+#: streamutil.c:315
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "WALセグメントサイズがパースできませんでした"
+
+#: streamutil.c:333
+#, c-format
+msgid "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"
+msgid_plural "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"
+msgstr[0] "WALセグメントのサイズ指定は1MBと1GBの間の2の累乗でなければなりません、しかし対向サーバーは%dバイトと報告してきました"
+
+#: streamutil.c:378
+#, c-format
+msgid "could not fetch group access flag: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "グループアクセスフラグを取得できませんでした: 受信したのは%d行で%d列、想定は%d行で%d列以上"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "グループアクセスフラグがパースできませんでした: %s"
+
+#: streamutil.c:544
+#, c-format
+msgid "could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "レプリケーションスロット\"%s\"を作成できませんでした: 受信したのは%d行%d列、想定は%d行%d列"
+
+#: streamutil.c:588
+#, c-format
+msgid "could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "レプリケーションスロット\"%s\"を削除できませんでした: 受信したのは%d行%d列、想定は%d行%d列"
+
+#: walmethods.c:521 walmethods.c:1057
+msgid "could not compress data"
+msgstr "データを圧縮できませんでした"
+
+#: walmethods.c:550
+msgid "could not reset compression stream"
+msgstr "圧縮ストリームをリセットできませんでした"
+
+#: walmethods.c:670
+msgid "could not initialize compression library"
+msgstr "圧縮ライブラリを初期化できませんでした"
+
+#: walmethods.c:681
+msgid "implementation error: tar files can't have more than one open file"
+msgstr "実装エラー:tar ファイルが複数のオープンされたファイルを保持できません"
+
+#: walmethods.c:695
+msgid "could not create tar header"
+msgstr "tar ヘッダを作成できませんでした"
+
+#: walmethods.c:711 walmethods.c:751 walmethods.c:965 walmethods.c:977
+msgid "could not change compression parameters"
+msgstr "圧縮用パラメーターを変更できませんでした"
+
+#: walmethods.c:850
+msgid "unlink not supported with compression"
+msgstr "圧縮モードにおける unlink はサポートしていません"
+
+#: walmethods.c:1081
+msgid "could not close compression stream"
+msgstr "圧縮ストリームをクローズできませんでした"
diff --git a/src/bin/pg_basebackup/po/ko.po b/src/bin/pg_basebackup/po/ko.po
new file mode 100644
index 0000000..bbd19de
--- /dev/null
+++ b/src/bin/pg_basebackup/po/ko.po
@@ -0,0 +1,1588 @@
+# LANGUAGE message translation file for pg_basebackup
+# Copyright (C) 2015 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Ioseph Kim <ioseph@uri.sarang.net>, 2015
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_basebackup (PostgreSQL) 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-10-05 01:15+0000\n"
+"PO-Revision-Date: 2020-10-06 11:02+0900\n"
+"Last-Translator: Ioseph Kim <ioseph@uri.sarang.net>\n"
+"Language-Team: Korean <kr@postgresql.org>\n"
+"Language: ko\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: ../../../src/common/logging.c:236
+#, c-format
+msgid "fatal: "
+msgstr "심각: "
+
+#: ../../../src/common/logging.c:243
+#, c-format
+msgid "error: "
+msgstr "오류: "
+
+#: ../../../src/common/logging.c:250
+#, c-format
+msgid "warning: "
+msgstr "경고: "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98 ../../common/fe_memutils.c:162
+#, c-format
+msgid "out of memory\n"
+msgstr "메모리 부족\n"
+
+#: ../../common/fe_memutils.c:92 ../../common/fe_memutils.c:154
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "null 포인터를 복제할 수 없음(내부 오류)\n"
+
+#: ../../common/file_utils.c:79 ../../common/file_utils.c:181
+#: pg_receivewal.c:266 pg_recvlogical.c:340
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "\"%s\" 파일의 상태값을 알 수 없음: %m"
+
+#: ../../common/file_utils.c:158 pg_receivewal.c:169
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "\"%s\" 디렉터리 열 수 없음: %m"
+
+#: ../../common/file_utils.c:192 pg_receivewal.c:337
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "\"%s\" 디렉터리를 읽을 수 없음: %m"
+
+#: ../../common/file_utils.c:224 ../../common/file_utils.c:283
+#: ../../common/file_utils.c:357 ../../fe_utils/recovery_gen.c:134
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "\"%s\" 파일을 열 수 없음: %m"
+
+#: ../../common/file_utils.c:295 ../../common/file_utils.c:365
+#: pg_recvlogical.c:193
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "\"%s\" 파일 fsync 실패: %m"
+
+#: ../../common/file_utils.c:375
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "\"%s\" 파일을 \"%s\" 파일로 이름을 바꿀 수 없음: %m"
+
+#: ../../fe_utils/recovery_gen.c:35 ../../fe_utils/recovery_gen.c:49
+#: ../../fe_utils/recovery_gen.c:77 ../../fe_utils/recovery_gen.c:100
+#: ../../fe_utils/recovery_gen.c:171 pg_basebackup.c:1248
+#, c-format
+msgid "out of memory"
+msgstr "메모리 부족"
+
+#: ../../fe_utils/recovery_gen.c:140 pg_basebackup.c:1021 pg_basebackup.c:1714
+#: pg_basebackup.c:1770
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "\"%s\" 파일 쓰기 실패: %m"
+
+#: ../../fe_utils/recovery_gen.c:152 pg_basebackup.c:1166 pg_basebackup.c:1671
+#: pg_basebackup.c:1747
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "\"%s\" 파일을 만들 수 없음: %m"
+
+#: pg_basebackup.c:224
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "\"%s\" 디렉터리를 지우는 중"
+
+#: pg_basebackup.c:226
+#, c-format
+msgid "failed to remove data directory"
+msgstr "데이터 디렉터리 삭제 실패"
+
+#: pg_basebackup.c:230
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "\"%s\" 데이터 디렉터리의 내용을 지우는 중"
+
+#: pg_basebackup.c:232
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "데이터 디렉터리의 내용을 지울 수 없음"
+
+#: pg_basebackup.c:237
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "\"%s\" WAL 디렉터리를 지우는 중"
+
+#: pg_basebackup.c:239
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "WAL 디렉터리 삭제 실패"
+
+#: pg_basebackup.c:243
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "\"%s\" WAL 디렉터리 내용을 지우는 중"
+
+#: pg_basebackup.c:245
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "WAL 디렉터리의 내용을 지울 수 없음"
+
+#: pg_basebackup.c:251
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "사용자 요청으로 \"%s\" 데이터 디렉터리를 지우지 않았음"
+
+#: pg_basebackup.c:254
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "사용자 요청으로 \"%s\" WAL 디렉터리를 지우지 않았음"
+
+#: pg_basebackup.c:258
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "아직 마무리 되지 않은 테이블스페이스 디렉터리 변경함"
+
+#: pg_basebackup.c:299
+#, c-format
+msgid "directory name too long"
+msgstr "디렉터리 이름이 너무 김"
+
+#: pg_basebackup.c:309
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "테이블스페이스 맵핑 하는 곳에서 \"=\" 문자가 중복 되어 있음"
+
+#: pg_basebackup.c:321
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr ""
+"\"%s\" 형식의 테이블스페이스 맵핑이 잘못 되었음, \"OLDDIR=NEWDIR\" 형식이어"
+"야 함"
+
+#: pg_basebackup.c:333
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr "테이블스페이스 맵핑용 옛 디렉터리가 절대 경로가 아님: %s"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr "테이블스페이스 맵핑용 새 디렉터리가 절대 경로가 아님: %s"
+
+#: pg_basebackup.c:379
+#, c-format
+msgid ""
+"%s takes a base backup of a running PostgreSQL server.\n"
+"\n"
+msgstr ""
+"%s 프로그램은 운영 중인 PostgreSQL 서버에 대해서 베이스 백업을 하는 도구입니"
+"다.\n"
+"\n"
+
+#: pg_basebackup.c:381 pg_receivewal.c:79 pg_recvlogical.c:75
+#, c-format
+msgid "Usage:\n"
+msgstr "사용법:\n"
+
+#: pg_basebackup.c:382 pg_receivewal.c:80 pg_recvlogical.c:76
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s [옵션]...\n"
+
+#: pg_basebackup.c:383
+#, c-format
+msgid ""
+"\n"
+"Options controlling the output:\n"
+msgstr ""
+"\n"
+"출력물을 제어야하는 옵션들:\n"
+
+#: pg_basebackup.c:384
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, --pgdata=디렉터리 베이스 백업 결과물이 저장될 디렉터리\n"
+
+#: pg_basebackup.c:385
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr " -F, --format=p|t 출력 형식 (plain (초기값), tar)\n"
+
+#: pg_basebackup.c:386
+#, c-format
+msgid ""
+" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr ""
+" -r, --max-rate=속도 최대 전송 속도\n"
+" (단위는 kB/s, 또는 숫자 뒤에 \"k\" 또는 \"M\" 단위 "
+"문자 지정 가능)\n"
+
+#: pg_basebackup.c:388
+#, c-format
+msgid ""
+" -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr ""
+" -R, --write-recovery-conf\n"
+" 복제를 위한 환경 설정 함\n"
+
+#: pg_basebackup.c:390
+#, c-format
+msgid ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr ""
+" -T, --tablespace-mapping=옛DIR=새DIR\n"
+" 테이블스페이스 디렉터리 새 맵핑\n"
+
+#: pg_basebackup.c:392
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr " --waldir=WALDIR 트랜잭션 로그 디렉터리 지정\n"
+
+#: pg_basebackup.c:393
+#, c-format
+msgid ""
+" -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr ""
+" -X, --wal-method=none|fetch|stream\n"
+" 필요한 WAL 파일을 백업하는 방법\n"
+
+#: pg_basebackup.c:395
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr " -z, --gzip tar 출력물을 압축\n"
+
+#: pg_basebackup.c:396
+#, c-format
+msgid ""
+" -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr " -Z, --compress=0-9 압축된 tar 파일의 압축 수위 지정\n"
+
+#: pg_basebackup.c:397
+#, c-format
+msgid ""
+"\n"
+"General options:\n"
+msgstr ""
+"\n"
+"일반 옵션들:\n"
+
+#: pg_basebackup.c:398
+#, c-format
+msgid ""
+" -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr ""
+" -c, --checkpoint=fast|spread\n"
+" 체크포인트 방법\n"
+
+#: pg_basebackup.c:400
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " -C, --create-slot 새 복제 슬롯을 만듬\n"
+
+#: pg_basebackup.c:401
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=라벨 백업 라벨 지정\n"
+
+#: pg_basebackup.c:402
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --no-clean 오류 발생 시 정리하지 않음\n"
+
+#: pg_basebackup.c:403
+#, c-format
+msgid ""
+" -N, --no-sync do not wait for changes to be written safely to "
+"disk\n"
+msgstr " -N, --no-sync 디스크 쓰기 뒤 sync 작업 생략\n"
+
+#: pg_basebackup.c:404
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress 진행 과정 보여줌\n"
+
+#: pg_basebackup.c:405 pg_receivewal.c:89
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=슬롯이름 지정한 복제 슬롯을 사용함\n"
+
+#: pg_basebackup.c:406 pg_receivewal.c:91 pg_recvlogical.c:96
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose 자세한 작업 메시지 보여줌\n"
+
+#: pg_basebackup.c:407 pg_receivewal.c:92 pg_recvlogical.c:97
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version 버전 정보 보여주고 마침\n"
+
+#: pg_basebackup.c:408
+#, c-format
+msgid ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" use algorithm for manifest checksums\n"
+msgstr ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" 사용할 manifest 체크섬 알고리즘\n"
+
+#: pg_basebackup.c:410
+#, c-format
+msgid ""
+" --manifest-force-encode\n"
+" hex encode all file names in manifest\n"
+msgstr ""
+" --manifest-force-encode\n"
+" manifest 내 모든 파일 이름을 16진수 인코딩함\n"
+
+#: pg_basebackup.c:412
+#, c-format
+msgid " --no-estimate-size do not estimate backup size in server side\n"
+msgstr " --no-estimate-size 서버측 백업 크기를 예상하지 않음\n"
+
+#: pg_basebackup.c:413
+#, c-format
+msgid " --no-manifest suppress generation of backup manifest\n"
+msgstr " --no-manifest 백업 매니페스트 만들지 않음\n"
+
+#: pg_basebackup.c:414
+#, c-format
+msgid ""
+" --no-slot prevent creation of temporary replication slot\n"
+msgstr " --no-slot 임시 복제 슬롯 만들지 않음\n"
+
+#: pg_basebackup.c:415
+#, c-format
+msgid ""
+" --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr ""
+" --no-verify-checksums\n"
+" 체크섬 검사 안함\n"
+
+#: pg_basebackup.c:417 pg_receivewal.c:94 pg_recvlogical.c:98
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help 이 도움말을 보여주고 마침\n"
+
+#: pg_basebackup.c:418 pg_receivewal.c:95 pg_recvlogical.c:99
+#, c-format
+msgid ""
+"\n"
+"Connection options:\n"
+msgstr ""
+"\n"
+"연결 옵션들:\n"
+
+#: pg_basebackup.c:419 pg_receivewal.c:96
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=접속문자열 서버 접속 문자열\n"
+
+#: pg_basebackup.c:420 pg_receivewal.c:97 pg_recvlogical.c:101
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr " -h, --host=호스트이름 접속할 데이터베이스 서버나 소켓 디렉터리\n"
+
+#: pg_basebackup.c:421 pg_receivewal.c:98 pg_recvlogical.c:102
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=포트 데이터베이스 서버 포트 번호\n"
+
+#: pg_basebackup.c:422
+#, c-format
+msgid ""
+" -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in "
+"seconds)\n"
+msgstr ""
+" -s, --status-interval=초\n"
+" 초 단위 매번 서버로 상태 패킷을 보냄\n"
+
+#: pg_basebackup.c:424 pg_receivewal.c:99 pg_recvlogical.c:103
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr " -U, --username=사용자 접속할 특정 데이터베이스 사용자\n"
+
+#: pg_basebackup.c:425 pg_receivewal.c:100 pg_recvlogical.c:104
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password 비밀번호 물어 보지 않음\n"
+
+#: pg_basebackup.c:426 pg_receivewal.c:101 pg_recvlogical.c:105
+#, c-format
+msgid ""
+" -W, --password force password prompt (should happen "
+"automatically)\n"
+msgstr ""
+" -W, --password 항상 비밀번호 프롬프트 보임 (자동으로 판단 함)\n"
+
+#: pg_basebackup.c:427 pg_receivewal.c:105 pg_recvlogical.c:106
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"문제점 보고 주소: <%s>\n"
+
+#: pg_basebackup.c:428 pg_receivewal.c:106 pg_recvlogical.c:107
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s 홈페이지: <%s>\n"
+
+#: pg_basebackup.c:471
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "준비된 파이프로부터 읽기 실패: %m"
+
+#: pg_basebackup.c:477 pg_basebackup.c:608 pg_basebackup.c:2133
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "트랜잭션 로그 위치 \"%s\" 분석 실패"
+
+#: pg_basebackup.c:573 pg_receivewal.c:441
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "WAL 파일 쓰기 마무리 실패: %m"
+
+#: pg_basebackup.c:620
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "백그라운드 프로세스를 위한 파이프 만들기 실패: %m"
+
+#: pg_basebackup.c:655
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "\"%s\" 임시 복제 슬롯을 만들 수 없음"
+
+#: pg_basebackup.c:658
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "\"%s\" 이름의 복제 슬롯을 만듦"
+
+#: pg_basebackup.c:678 pg_basebackup.c:731 pg_basebackup.c:1620
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "\"%s\" 디렉터리를 만들 수 없음: %m"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not create background process: %m"
+msgstr "백그라운드 프로세스 만들기 실패: %m"
+
+#: pg_basebackup.c:708
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "백그라운드 스래드 만들기 실패: %m"
+
+#: pg_basebackup.c:752
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "\"%s\" 디렉터리가 있지만 비어 있지 않음"
+
+#: pg_basebackup.c:759
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "\"%s\" 디렉터리를 액세스할 수 없습니다: %m"
+
+#: pg_basebackup.c:824
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s kB (100%%), %d/%d 테이블스페이스 %*s"
+
+#: pg_basebackup.c:836
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d 테이블스페이스 (%s%-*.*s)"
+
+#: pg_basebackup.c:852
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d 테이블스페이스"
+
+#: pg_basebackup.c:877
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "\"%s\" 전송 속도는 잘못된 값임"
+
+#: pg_basebackup.c:882
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "잘못된 전송 속도 \"%s\": %m"
+
+#: pg_basebackup.c:891
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "전송 속도는 0보다 커야 함"
+
+#: pg_basebackup.c:923
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "잘못된 --max-rate 단위: \"%s\""
+
+#: pg_basebackup.c:930
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "\"%s\" 전송 속도는 정수형 범위가 아님"
+
+#: pg_basebackup.c:940
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "\"%s\" 전송 속도는 범위 초과"
+
+#: pg_basebackup.c:961
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "COPY 데이터 스트림을 사용할 수 없음: %s"
+
+#: pg_basebackup.c:981 pg_recvlogical.c:435 pg_recvlogical.c:607
+#: receivelog.c:965
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "COPY 자료를 읽을 수 없음: %s"
+
+#: pg_basebackup.c:1007
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "\"%s\" 압축 파일 쓰기 실패: %s"
+
+#: pg_basebackup.c:1071
+#, c-format
+msgid "could not duplicate stdout: %m"
+msgstr "stdout을 중복할 수 없음: %m"
+
+#: pg_basebackup.c:1078
+#, c-format
+msgid "could not open output file: %m"
+msgstr "출력파일을 열 수 없음: %m"
+
+#: pg_basebackup.c:1085 pg_basebackup.c:1106 pg_basebackup.c:1135
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "잘못된 압축 수위 %d: %s"
+
+#: pg_basebackup.c:1155
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "\"%s\" 압축 파일 만들기 실패: %s"
+
+#: pg_basebackup.c:1267
+#, c-format
+msgid "could not close compressed file \"%s\": %s"
+msgstr "\"%s\" 압축 파일 닫기 실패: %s"
+
+#: pg_basebackup.c:1279 pg_recvlogical.c:632
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "\"%s\" 파일을 닫을 수 없음: %m"
+
+#: pg_basebackup.c:1541
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "마지막 파일을 끝내기 전에 COPY 스트림이 끝났음"
+
+#: pg_basebackup.c:1570
+#, c-format
+msgid "invalid tar block header size: %zu"
+msgstr "잘못된 tar 블럭 헤더 크기: %zu"
+
+#: pg_basebackup.c:1627
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "\"%s\" 디렉터리 액세스 권한을 지정할 수 없음: %m"
+
+#: pg_basebackup.c:1651
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "\"%s\" 파일을 \"%s\" 심볼릭 링크로 만들 수 없음: %m"
+
+#: pg_basebackup.c:1658
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "알 수 없는 링크 지시자 \"%c\""
+
+#: pg_basebackup.c:1677
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "파일 \"%s\" 의 접근권한을 지정할 수 없음: %m"
+
+#: pg_basebackup.c:1831
+#, c-format
+msgid "incompatible server version %s"
+msgstr "호환하지 않는 서버 버전 %s"
+
+#: pg_basebackup.c:1846
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr ""
+"힌트: 트랜잭션 로그 스트리밍을 사용하지 않으려면 -X none 또는 -X fetch 옵션"
+"을 사용하세요."
+
+#: pg_basebackup.c:1882
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr "베이스 백업을 초기화 중, 체크포인트 완료를 기다리는 중"
+
+#: pg_basebackup.c:1908 pg_recvlogical.c:262 receivelog.c:481 receivelog.c:530
+#: receivelog.c:569 streamutil.c:297 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "\"%s\" 복제 명령을 보낼 수 없음: %s"
+
+#: pg_basebackup.c:1919
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "베이스 백업을 초기화 할 수 없음: %s"
+
+#: pg_basebackup.c:1925
+#, c-format
+msgid ""
+"server returned unexpected response to BASE_BACKUP command; got %d rows and "
+"%d fields, expected %d rows and %d fields"
+msgstr ""
+"서버가 BASE_BACKUP 명령에 대해서 잘못된 응답을 했습니다; 응답값: %d 로우, %d "
+"필드, (기대값: %d 로우, %d 필드)"
+
+#: pg_basebackup.c:1933
+#, c-format
+msgid "checkpoint completed"
+msgstr "체크포인트 완료"
+
+#: pg_basebackup.c:1948
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "트랙잭션 로그 시작 위치: %s, 타임라인: %u"
+
+#: pg_basebackup.c:1957
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "백업 헤더를 구할 수 없음: %s"
+
+#: pg_basebackup.c:1963
+#, c-format
+msgid "no data returned from server"
+msgstr "서버가 아무런 자료도 주지 않았음"
+
+#: pg_basebackup.c:1995
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr ""
+"표준 출력으로는 하나의 테이블스페이스만 쓸 수 있음, 데이터베이스는 %d 개의 테"
+"이블 스페이스가 있음"
+
+#: pg_basebackup.c:2007
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "백그라운드 WAL 수신자 시작 중"
+
+#: pg_basebackup.c:2046
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr "서버에서 트랜잭션 로그 마지막 위치를 구할 수 없음: %s"
+
+#: pg_basebackup.c:2052
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "서버에서 트랜잭션 로그 마지막 위치가 수신 되지 않았음"
+
+#: pg_basebackup.c:2057
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "트랜잭션 로그 마지막 위치: %s"
+
+#: pg_basebackup.c:2068
+#, c-format
+msgid "checksum error occurred"
+msgstr "체크섬 오류 발생"
+
+#: pg_basebackup.c:2073
+#, c-format
+msgid "final receive failed: %s"
+msgstr "수신 작업 마무리 실패: %s"
+
+#: pg_basebackup.c:2097
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "스트리밍을 끝내기 위해서 백그라운드 프로세스를 기다리는 중 ..."
+
+#: pg_basebackup.c:2102
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "백그라운드 파이프로 명령을 보낼 수 없음: %m"
+
+#: pg_basebackup.c:2110
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "하위 프로세스를 기다릴 수 없음: %m"
+
+#: pg_basebackup.c:2115
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "%d 개의 하위 프로세스가 종료됨, 기대값 %d"
+
+#: pg_basebackup.c:2120 streamutil.c:92
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2145
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "하위 스레드를 기다릴 수 없음: %m"
+
+#: pg_basebackup.c:2151
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "하위 스레드 종료 상태가 정상적이지 않음: %m"
+
+#: pg_basebackup.c:2156
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "하위 스레드가 비정상 종료됨: 오류 코드 %u"
+
+#: pg_basebackup.c:2184
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "자료를 디스크에 동기화 하는 중 ... "
+
+#: pg_basebackup.c:2209
+#, c-format
+msgid "renaming backup_manifest.tmp to backup_manifest"
+msgstr "backup_manifest.tmp 파일을 backup_manifest로 바꾸는 중"
+
+#: pg_basebackup.c:2220
+#, c-format
+msgid "base backup completed"
+msgstr "베이스 백업 완료"
+
+#: pg_basebackup.c:2305
+#, c-format
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\""
+msgstr "\"%s\" 값은 잘못된 출력 형식, \"plain\" 또는 \"tar\" 만 사용 가능"
+
+#: pg_basebackup.c:2349
+#, c-format
+msgid ""
+"invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr ""
+"\"%s\" 값은 잘못된 wal-method 옵션값, \"fetch\", \"stream\" 또는 \"none\"만 "
+"사용 가능"
+
+#: pg_basebackup.c:2377 pg_receivewal.c:580
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "잘못된 압축 수위 \"%s\""
+
+#: pg_basebackup.c:2388
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr "잘못된 체크포인트 옵션값 \"%s\", \"fast\" 또는 \"spread\"만 사용 가능"
+
+#: pg_basebackup.c:2415 pg_receivewal.c:555 pg_recvlogical.c:820
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "잘못된 상태값 간격: \"%s\""
+
+#: pg_basebackup.c:2445 pg_basebackup.c:2458 pg_basebackup.c:2469
+#: pg_basebackup.c:2480 pg_basebackup.c:2488 pg_basebackup.c:2496
+#: pg_basebackup.c:2506 pg_basebackup.c:2519 pg_basebackup.c:2527
+#: pg_basebackup.c:2538 pg_basebackup.c:2548 pg_basebackup.c:2565
+#: pg_basebackup.c:2573 pg_basebackup.c:2581 pg_receivewal.c:605
+#: pg_receivewal.c:618 pg_receivewal.c:626 pg_receivewal.c:636
+#: pg_receivewal.c:644 pg_receivewal.c:655 pg_recvlogical.c:846
+#: pg_recvlogical.c:859 pg_recvlogical.c:870 pg_recvlogical.c:878
+#: pg_recvlogical.c:886 pg_recvlogical.c:894 pg_recvlogical.c:902
+#: pg_recvlogical.c:910 pg_recvlogical.c:918
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "자제한 사항은 \"%s --help\" 명령으로 살펴보십시오.\n"
+
+#: pg_basebackup.c:2456 pg_receivewal.c:616 pg_recvlogical.c:857
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "너무 많은 명령행 인자를 지정했습니다. (처음 \"%s\")"
+
+#: pg_basebackup.c:2468 pg_receivewal.c:654
+#, c-format
+msgid "no target directory specified"
+msgstr "대상 디렉터리를 지정하지 않음"
+
+#: pg_basebackup.c:2479
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "tar 형식만 압축을 사용할 수 있음"
+
+#: pg_basebackup.c:2487
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "tar 방식에서 stdout으로 트랜잭션 로그 스트리밍 불가"
+
+#: pg_basebackup.c:2495
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "복제 슬롯은 WAL 스트리밍 방식에서만 사용할 수 있음"
+
+#: pg_basebackup.c:2505
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "슬롯 이름을 지정한 경우 --no-slot 옵션을 사용할 수 없음"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2517 pg_receivewal.c:634
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "%s 옵션은 --slot 옵션을 함께 사용해야 함"
+
+#: pg_basebackup.c:2526
+#, c-format
+msgid "--create-slot and --no-slot are incompatible options"
+msgstr "--create-slot 옵션과 -no-slot 옵션은 함께 사용할 수 없음"
+
+#: pg_basebackup.c:2537
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "트랜잭션 로그 디렉터리 위치는 plain 모드에서만 사용할 수 있음"
+
+#: pg_basebackup.c:2547
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "트랜잭션 로그 디렉터리 위치는 절대 경로여야 함"
+
+#: pg_basebackup.c:2557 pg_receivewal.c:663
+#, c-format
+msgid "this build does not support compression"
+msgstr "이 버전은 압축 하는 기능을 포함 하지 않고 빌드 되었습니다."
+
+#: pg_basebackup.c:2564
+#, c-format
+msgid "--progress and --no-estimate-size are incompatible options"
+msgstr "--progress 옵션과 --no-estimate-size 옵션은 함께 사용할 수 없음"
+
+#: pg_basebackup.c:2572
+#, c-format
+msgid "--no-manifest and --manifest-checksums are incompatible options"
+msgstr "--no-manifest 옵션과 --manifest-checksums 옵션은 함께 사용할 수 없음"
+
+#: pg_basebackup.c:2580
+#, c-format
+msgid "--no-manifest and --manifest-force-encode are incompatible options"
+msgstr ""
+"--no-manifest 옵션과 --manifest-force-encode 옵션은 함께 사용할 수 없음"
+
+#: pg_basebackup.c:2639
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "\"%s\" 심벌릭 링크를 만들 수 없음: %m"
+
+#: pg_basebackup.c:2643
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "이 플랫폼에서는 심볼 링크가 지원되지 않음"
+
+#: pg_receivewal.c:77
+#, c-format
+msgid ""
+"%s receives PostgreSQL streaming write-ahead logs.\n"
+"\n"
+msgstr ""
+"%s 프로그램은 PostgreSQL 스트리밍 트랜잭션 로그를 수신하는 도구입니다.\n"
+"\n"
+
+#: pg_receivewal.c:81 pg_recvlogical.c:81
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"옵션들:\n"
+
+#: pg_receivewal.c:82
+#, c-format
+msgid ""
+" -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr ""
+" -D, --directory=DIR 지정한 디렉터리로 트랜잭션 로그 파일을 백업함\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:82
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr " -E, --endpos=LSN 지정한 LSN까지 받고 종료함\n"
+
+#: pg_receivewal.c:84 pg_recvlogical.c:86
+#, c-format
+msgid ""
+" --if-not-exists do not error if slot already exists when creating a "
+"slot\n"
+msgstr ""
+" --if-not-exists 슬롯을 새로 만들 때 이미 있어도 오류 내지 않음\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:88
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop 접속이 끊겼을 때 재연결 하지 않음\n"
+
+#: pg_receivewal.c:86
+#, c-format
+msgid ""
+" --no-sync do not wait for changes to be written safely to "
+"disk\n"
+msgstr " --no-sync 디스크 쓰기 뒤 sync 작업 생략\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:93
+#, c-format
+msgid ""
+" -s, --status-interval=SECS\n"
+" time between status packets sent to server "
+"(default: %d)\n"
+msgstr ""
+" -s, --status-interval=초\n"
+" 지정한 초 간격으로 서버로 상태 패킷을 보냄 (초기값: "
+"%d)\n"
+
+#: pg_receivewal.c:90
+#, c-format
+msgid ""
+" --synchronous flush write-ahead log immediately after writing\n"
+msgstr " --synchronous 쓰기 작업 후 즉시 트랜잭션 로그를 플러시 함\n"
+
+#: pg_receivewal.c:93
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr " -Z, --compress=0-9 압축된 로그 파일의 압축 수위 지정\n"
+
+#: pg_receivewal.c:102
+#, c-format
+msgid ""
+"\n"
+"Optional actions:\n"
+msgstr ""
+"\n"
+"추가 기능:\n"
+
+#: pg_receivewal.c:103 pg_recvlogical.c:78
+#, c-format
+msgid ""
+" --create-slot create a new replication slot (for the slot's name "
+"see --slot)\n"
+msgstr ""
+" --create-slot 새 복제 슬롯을 만듬 (--slot 옵션에서 슬롯 이름 지"
+"정)\n"
+
+#: pg_receivewal.c:104 pg_recvlogical.c:79
+#, c-format
+msgid ""
+" --drop-slot drop the replication slot (for the slot's name see "
+"--slot)\n"
+msgstr ""
+" --drop-slot 복제 슬롯 삭제 (--slot 옵션에서 슬롯 이름 지정)\n"
+
+#: pg_receivewal.c:117
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "마무리된 세그먼트 위치: %X/%X (타임라인 %u)"
+
+#: pg_receivewal.c:124
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "로그 스트리밍 중지된 위치: %X/%X (타임라인 %u)"
+
+#: pg_receivewal.c:140
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "전환됨: 타임라인 %u, 위치 %X/%X"
+
+#: pg_receivewal.c:150
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "인터럽터 시그널을 받음, 종료함"
+
+#: pg_receivewal.c:186
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "\"%s\" 디렉터리를 닫을 수 없음: %m"
+
+#: pg_receivewal.c:272
+#, c-format
+msgid "segment file \"%s\" has incorrect size %d, skipping"
+msgstr "\"%s\" 조각 파일은 잘못된 크기임: %d, 무시함"
+
+#: pg_receivewal.c:290
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "\"%s\" 압축 파일 열기 실패: %m"
+
+#: pg_receivewal.c:296
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "\"%s\" 압축 파일 작업 위치 찾기 실패: %m"
+
+#: pg_receivewal.c:304
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "\"%s\" 압축 파일 읽기 실패: %m"
+
+#: pg_receivewal.c:307
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "\"%s\" 압축 파일을 읽을 수 없음: %d 읽음, 전체 %zu"
+
+#: pg_receivewal.c:318
+#, c-format
+msgid ""
+"compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr "\"%s\" 압축 파일은 압축 풀었을 때 잘못된 크기임: %d, 무시함"
+
+#: pg_receivewal.c:422
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "로그 스트리밍 시작 위치: %X/%X (타임라인 %u)"
+
+#: pg_receivewal.c:537 pg_recvlogical.c:762
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "잘못된 포트 번호: \"%s\""
+
+#: pg_receivewal.c:565 pg_recvlogical.c:788
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "시작 위치 구문이 잘못됨 \"%s\""
+
+#: pg_receivewal.c:625
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "--create-slot 옵션과 --drop-slot 옵션을 함께 사용할 수 없음"
+
+#: pg_receivewal.c:643
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "--synchronous 옵션과 --no-sync 옵션을 함께 사용할 수 없음"
+
+#: pg_receivewal.c:719
+#, c-format
+msgid ""
+"replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr "\"%s\" 슬롯을 이용한 복제 연결은 이 데이터베이스에서 사용할 수 없음"
+
+#: pg_receivewal.c:730 pg_recvlogical.c:966
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "\"%s\" 이름의 복제 슬롯을 삭제 중"
+
+#: pg_receivewal.c:741 pg_recvlogical.c:976
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "\"%s\" 이름의 복제 슬롯을 만드는 중"
+
+#: pg_receivewal.c:767 pg_recvlogical.c:1001
+#, c-format
+msgid "disconnected"
+msgstr "연결 끊김"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:773 pg_recvlogical.c:1007
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "연결 끊김; 다시 연결 하기 위해 %d 초를 기다리는 중"
+
+#: pg_recvlogical.c:73
+#, c-format
+msgid ""
+"%s controls PostgreSQL logical decoding streams.\n"
+"\n"
+msgstr ""
+"%s 프로그램은 논리 디코딩 스트림을 제어하는 도구입니다.\n"
+"\n"
+
+#: pg_recvlogical.c:77
+#, c-format
+msgid ""
+"\n"
+"Action to be performed:\n"
+msgstr ""
+"\n"
+"성능에 관계된 기능들:\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid ""
+" --start start streaming in a replication slot (for the "
+"slot's name see --slot)\n"
+msgstr ""
+" --start 복제 슬롯을 이용한 스트리밍 시작 (--slot 옵션에서 슬"
+"롯 이름 지정)\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr " -f, --file=파일 작업 로그를 해당 파일에 기록, 표준 출력은 -\n"
+
+#: pg_recvlogical.c:84
+#, c-format
+msgid ""
+" -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: "
+"%d)\n"
+msgstr ""
+" -F --fsync-interval=초\n"
+" 지정한 초 간격으로 파일 fsync 작업을 함 (초기값: "
+"%d)\n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid ""
+" -I, --startpos=LSN where in an existing slot should the streaming "
+"start\n"
+msgstr " -I, --startpos=LSN 스트리밍을 시작할 기존 슬롯 위치\n"
+
+#: pg_recvlogical.c:89
+#, c-format
+msgid ""
+" -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr ""
+" -o, --option=이름[=값]\n"
+" 출력 플러그인에서 사용할 옵션들의 옵션 이름과 그 "
+"값\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr " -P, --plugin=PLUGIN 사용할 출력 플러그인 (초기값: %s)\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=슬롯이름 논리 복제 슬롯 이름\n"
+
+#: pg_recvlogical.c:100
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=디비이름 접속할 데이터베이스\n"
+
+#: pg_recvlogical.c:133
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "쓰기 확인 위치: %X/%X, 플러시 위치 %X/%X (슬롯 %s)"
+
+#: pg_recvlogical.c:157 receivelog.c:343
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "피드백 패킷을 보낼 수 없음: %s"
+
+#: pg_recvlogical.c:230
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "로그 스트리밍 시작 함, 위치: %X/%X (슬롯 %s)"
+
+#: pg_recvlogical.c:271
+#, c-format
+msgid "streaming initiated"
+msgstr "스트리밍 초기화 됨"
+
+#: pg_recvlogical.c:335
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "\"%s\" 잠금파일을 열 수 없음: %m"
+
+#: pg_recvlogical.c:361 receivelog.c:873
+#, c-format
+msgid "invalid socket: %s"
+msgstr "잘못된 소켓: %s"
+
+#: pg_recvlogical.c:414 receivelog.c:901
+#, c-format
+msgid "select() failed: %m"
+msgstr "select() 실패: %m"
+
+#: pg_recvlogical.c:421 receivelog.c:951
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "WAL 스트림에서 자료 받기 실패: %s"
+
+#: pg_recvlogical.c:463 pg_recvlogical.c:514 receivelog.c:995 receivelog.c:1061
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "스트리밍 헤더 크기가 너무 작음: %d"
+
+#: pg_recvlogical.c:498 receivelog.c:833
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "알 수 없는 스트리밍 헤더: \"%c\""
+
+#: pg_recvlogical.c:552 pg_recvlogical.c:564
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "%u 바이트 쓰기 실패, 로그파일 \"%s\": %m"
+
+#: pg_recvlogical.c:618 receivelog.c:629 receivelog.c:666
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "복제 스트림의 예상치 못한 종료: %s"
+
+#: pg_recvlogical.c:742
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "\"%s\" 값은 잘못된 fsync 반복주기 임"
+
+#: pg_recvlogical.c:780
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "시작 위치 구문이 잘못됨 \"%s\""
+
+#: pg_recvlogical.c:869
+#, c-format
+msgid "no slot specified"
+msgstr "슬롯을 지정하지 않았음"
+
+#: pg_recvlogical.c:877
+#, c-format
+msgid "no target file specified"
+msgstr "대상 파일을 지정하지 않았음"
+
+#: pg_recvlogical.c:885
+#, c-format
+msgid "no database specified"
+msgstr "데이터베이스 지정하지 않았음"
+
+#: pg_recvlogical.c:893
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "적어도 하나 이상의 작업 방법을 지정해야 함"
+
+#: pg_recvlogical.c:901
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr ""
+"--create-slot 옵션 또는 --start 옵션은 --drop-slot 옵션과 함께 사용할 수 없음"
+
+#: pg_recvlogical.c:909
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr ""
+" --create-slot 옵션이나 --drop-slot 옵션은 --startpos 옵션과 함께 쓸 수 없음"
+
+#: pg_recvlogical.c:917
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "--endpos 옵션은 --start 옵션과 함께 사용해야 함"
+
+#: pg_recvlogical.c:948
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr "데이터베이스 의존적인 복제 연결을 할 수 없음"
+
+#: pg_recvlogical.c:1047
+#, c-format
+msgid "end position %X/%X reached by keepalive"
+msgstr "keepalive에 의해서 %X/%X 마지막 위치에 도달했음"
+
+#: pg_recvlogical.c:1050
+#, c-format
+msgid "end position %X/%X reached by WAL record at %X/%X"
+msgstr "%X/%X 마지막 위치가 WAL 레코드 %X/%X 위치에서 도달했음"
+
+#: receivelog.c:69
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "\"%s\" archive status 파일을 만들 수 없습니다: %s"
+
+#: receivelog.c:116
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "\"%s\" WAL 파일 크기를 알 수 없음: %s"
+
+#: receivelog.c:126
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "이미 있는 \"%s\" 트랜잭션 로그 파일을 열 수 없음: %s"
+
+#: receivelog.c:134
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr "이미 있는 \"%s\" WAL 파일 fsync 실패: %s"
+
+#: receivelog.c:148
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] ""
+"\"%s\" 트랜잭션 로그파일의 크기가 %d 바이트임, 0 또는 %d 바이트여야 함"
+
+#: receivelog.c:163
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "\"%s\" WAL 파일을 열 수 없음: %s"
+
+#: receivelog.c:189
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "\"%s\" 파일의 시작 위치를 결정할 수 없음: %s"
+
+#: receivelog.c:203
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "\"%s%s\" 이름 변경 실패, 세그먼트가 완료되지 않았음"
+
+#: receivelog.c:215 receivelog.c:300 receivelog.c:675
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "\"%s\" 파일을 닫을 수 없음: %s"
+
+#: receivelog.c:272
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "타임라인 %u 번을 위한 내역 파일 이름이 잘못 되었음: %s"
+
+#: receivelog.c:280
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "\"%s\" 타임라인 내역 파일을 만들 수 없음: %s"
+
+#: receivelog.c:287
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "\"%s\" 타임라인 내역 파일에 쓸 수 없음: %s"
+
+#: receivelog.c:377
+#, c-format
+msgid ""
+"incompatible server version %s; client does not support streaming from "
+"server versions older than %s"
+msgstr ""
+"%s 서버 버전은 호환되지 않음; 클라이언트는 %s 버전 보다 오래된 서버의 스트리"
+"밍은 지원하지 않음"
+
+#: receivelog.c:386
+#, c-format
+msgid ""
+"incompatible server version %s; client does not support streaming from "
+"server versions newer than %s"
+msgstr ""
+"%s 서버 버전은 호환되지 않음; 클라이언트는 %s 버전 보다 새로운 서버의 스트리"
+"밍은 지원하지 않음"
+
+#: receivelog.c:488 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid ""
+"could not identify system: got %d rows and %d fields, expected %d rows and "
+"%d or more fields"
+msgstr ""
+"시스템을 식별할 수 없음: 로우수 %d, 필드수 %d, 예상값: 로우수 %d, 필드수 %d "
+"이상"
+
+#: receivelog.c:495
+#, c-format
+msgid ""
+"system identifier does not match between base backup and streaming connection"
+msgstr "시스템 식별자가 베이스 백업과 스트리밍 연결에서 서로 다름"
+
+#: receivelog.c:501
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "%u 타임라인으로 시작하는 것을 서버에서 제공 하지 않음"
+
+#: receivelog.c:542
+#, c-format
+msgid ""
+"unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, "
+"expected %d rows and %d fields"
+msgstr ""
+"TIMELINE_HISTORY 명령 결과가 잘못됨: 받은 값: 로우수 %d, 필드수 %d, 예상값: "
+"로우수 %d, 필드수 %d"
+
+#: receivelog.c:613
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "서버가 잘못된 다음 타임라인 번호 %u 보고함, 이전 타임라인 번호 %u"
+
+#: receivelog.c:619
+#, c-format
+msgid ""
+"server stopped streaming timeline %u at %X/%X, but reported next timeline %u "
+"to begin at %X/%X"
+msgstr ""
+"서버의 중지 위치: 타임라인 %u, 위치 %X/%X, 하지만 보고 받은 위치: 타임라인 "
+"%u 위치 %X/%X"
+
+#: receivelog.c:659
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "복제 스트림이 중지 위치 전에 종료 되었음"
+
+#: receivelog.c:705
+#, c-format
+msgid ""
+"unexpected result set after end-of-timeline: got %d rows and %d fields, "
+"expected %d rows and %d fields"
+msgstr ""
+"타임라인 끝에 잘못된 결과가 발견 됨: 로우수 %d, 필드수 %d / 예상값: 로우수 "
+"%d, 필드수 %d"
+
+#: receivelog.c:714
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "다음 타임라인 시작 위치 분석 실패 \"%s\""
+
+#: receivelog.c:763 receivelog.c:1015
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "\"%s\" 파일 fsync 실패: %s"
+
+#: receivelog.c:1078
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "%u 위치의 수신된 트랜잭션 로그 레코드에 파일을 열 수 없음"
+
+#: receivelog.c:1088
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "잘못된 WAL 자료 위치 %08x, 기대값 %08x"
+
+#: receivelog.c:1122
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "%u 바이트를 \"%s\" WAL 파일에 쓸 수 없음: %s"
+
+#: receivelog.c:1147 receivelog.c:1187 receivelog.c:1218
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "copy-end 패킷을 보낼 수 없음: %s"
+
+#: streamutil.c:160
+msgid "Password: "
+msgstr "암호: "
+
+#: streamutil.c:185
+#, c-format
+msgid "could not connect to server"
+msgstr "서버 접속 실패"
+
+#: streamutil.c:202
+#, c-format
+msgid "could not connect to server: %s"
+msgstr "서버 접속 실패: %s"
+
+#: streamutil.c:231
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "search_path를 지울 수 없음: %s"
+
+#: streamutil.c:247
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "integer_datetimes 서버 설정을 알 수 없음"
+
+#: streamutil.c:254
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "integer_datetimes 컴파일 플래그가 서버와 일치하지 않음"
+
+#: streamutil.c:305
+#, c-format
+msgid ""
+"could not fetch WAL segment size: got %d rows and %d fields, expected %d "
+"rows and %d or more fields"
+msgstr ""
+"WAL 조각 크기 계산 실패: 로우수 %d, 필드수 %d, 예상값: 로우수 %d, 필드수 %d "
+"이상"
+
+#: streamutil.c:315
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "WAL 조각 크기 분석 못함"
+
+#: streamutil.c:333
+#, c-format
+msgid ""
+"WAL segment size must be a power of two between 1 MB and 1 GB, but the "
+"remote server reported a value of %d byte"
+msgid_plural ""
+"WAL segment size must be a power of two between 1 MB and 1 GB, but the "
+"remote server reported a value of %d bytes"
+msgstr[0] ""
+"WAL 조각 파일 크기는 1MB에서 1GB사이 2의 제곱 크기여야 하는데, "
+"원격 서버는 %d 바이트입니다."
+
+#: streamutil.c:378
+#, c-format
+msgid ""
+"could not fetch group access flag: got %d rows and %d fields, expected %d "
+"rows and %d or more fields"
+msgstr ""
+"그룹 접근 플래그를 가져올 수 없음: 로우수 %d, 필드수 %d, 예상값: 로우수 %d, "
+"필드수 %d 이상"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "그룹 접근 플래그를 분석 못함: %s"
+
+#: streamutil.c:544
+#, c-format
+msgid ""
+"could not create replication slot \"%s\": got %d rows and %d fields, "
+"expected %d rows and %d fields"
+msgstr ""
+"\"%s\" 복제 슬롯을 만들 수 없음: 로우수 %d, 필드수 %d, 기대값 로우수 %d, 필드"
+"수 %d"
+
+#: streamutil.c:588
+#, c-format
+msgid ""
+"could not drop replication slot \"%s\": got %d rows and %d fields, expected "
+"%d rows and %d fields"
+msgstr ""
+"\"%s\" 복제 슬롯을 삭제할 수 없음: 로우수 %d, 필드수 %d, 기대값 로우수 %d, 필"
+"드수 %d"
+
+#: walmethods.c:438 walmethods.c:927
+msgid "could not compress data"
+msgstr "자료를 압축할 수 없음"
+
+#: walmethods.c:470
+msgid "could not reset compression stream"
+msgstr "압축 스트림을 리셋할 수 없음"
+
+#: walmethods.c:568
+msgid "could not initialize compression library"
+msgstr "압축 라이브러리를 초기화할 수 없음"
+
+#: walmethods.c:580
+msgid "implementation error: tar files can't have more than one open file"
+msgstr "구현 오류: tar 파일은 하나 이상 열 수 없음"
+
+#: walmethods.c:594
+msgid "could not create tar header"
+msgstr "tar 해더를 만들 수 없음"
+
+#: walmethods.c:608 walmethods.c:648 walmethods.c:843 walmethods.c:854
+msgid "could not change compression parameters"
+msgstr "압축 매개 변수를 바꿀 수 없음"
+
+#: walmethods.c:730
+msgid "unlink not supported with compression"
+msgstr "압축 상태에서 파일 삭제는 지원하지 않음"
+
+#: walmethods.c:952
+msgid "could not close compression stream"
+msgstr "압축 스트림을 닫을 수 없음"
diff --git a/src/bin/pg_basebackup/po/ru.po b/src/bin/pg_basebackup/po/ru.po
new file mode 100644
index 0000000..ae92a97
--- /dev/null
+++ b/src/bin/pg_basebackup/po/ru.po
@@ -0,0 +1,1776 @@
+# Russian message translation file for pg_basebackup
+# Copyright (C) 2012-2016 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Alexander Lakhin <exclusion@gmail.com>, 2012-2017, 2018, 2019, 2020, 2021, 2022.
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_basebackup (PostgreSQL current)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-11-22 13:17+0300\n"
+"PO-Revision-Date: 2022-02-07 11:30+0300\n"
+"Last-Translator: Alexander Lakhin <exclusion@gmail.com>\n"
+"Language-Team: Russian <pgsql-ru-general@postgresql.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "важно: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "ошибка: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "предупреждение: "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98 ../../common/fe_memutils.c:162
+#, c-format
+msgid "out of memory\n"
+msgstr "нехватка памяти\n"
+
+#: ../../common/fe_memutils.c:92 ../../common/fe_memutils.c:154
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "попытка дублирования нулевого указателя (внутренняя ошибка)\n"
+
+#: ../../common/file_utils.c:87 ../../common/file_utils.c:451
+#: pg_receivewal.c:266 pg_recvlogical.c:339
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "не удалось получить информацию о файле \"%s\": %m"
+
+#: ../../common/file_utils.c:166 pg_receivewal.c:169
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "не удалось открыть каталог \"%s\": %m"
+
+#: ../../common/file_utils.c:200 pg_receivewal.c:337
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "не удалось прочитать каталог \"%s\": %m"
+
+#: ../../common/file_utils.c:232 ../../common/file_utils.c:291
+#: ../../common/file_utils.c:365 ../../fe_utils/recovery_gen.c:134
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "не удалось открыть файл \"%s\": %m"
+
+#: ../../common/file_utils.c:303 ../../common/file_utils.c:373
+#: pg_recvlogical.c:193
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "не удалось синхронизировать с ФС файл \"%s\": %m"
+
+#: ../../common/file_utils.c:383
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "не удалось переименовать файл \"%s\" в \"%s\": %m"
+
+#: ../../fe_utils/recovery_gen.c:35 ../../fe_utils/recovery_gen.c:49
+#: ../../fe_utils/recovery_gen.c:77 ../../fe_utils/recovery_gen.c:100
+#: ../../fe_utils/recovery_gen.c:171 pg_basebackup.c:1248
+#, c-format
+msgid "out of memory"
+msgstr "нехватка памяти"
+
+#: ../../fe_utils/recovery_gen.c:140 pg_basebackup.c:1021 pg_basebackup.c:1715
+#: pg_basebackup.c:1771
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "не удалось записать в файл \"%s\": %m"
+
+#: ../../fe_utils/recovery_gen.c:152 pg_basebackup.c:1166 pg_basebackup.c:1672
+#: pg_basebackup.c:1748
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "не удалось создать файл \"%s\": %m"
+
+#: pg_basebackup.c:224
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "удаление каталога данных \"%s\""
+
+#: pg_basebackup.c:226
+#, c-format
+msgid "failed to remove data directory"
+msgstr "ошибка при удалении каталога данных"
+
+#: pg_basebackup.c:230
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "удаление содержимого каталога данных \"%s\""
+
+#: pg_basebackup.c:232
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "ошибка при удалении содержимого каталога данных"
+
+#: pg_basebackup.c:237
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "удаление каталога WAL \"%s\""
+
+#: pg_basebackup.c:239
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "ошибка при удалении каталога WAL"
+
+#: pg_basebackup.c:243
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "удаление содержимого каталога WAL \"%s\""
+
+#: pg_basebackup.c:245
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "ошибка при удалении содержимого каталога WAL"
+
+#: pg_basebackup.c:251
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "каталог данных \"%s\" не был удалён по запросу пользователя"
+
+#: pg_basebackup.c:254
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "каталог WAL \"%s\" не был удалён по запросу пользователя"
+
+#: pg_basebackup.c:258
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "изменения в каталогах табличных пространств не будут отменены"
+
+#: pg_basebackup.c:299
+#, c-format
+msgid "directory name too long"
+msgstr "слишком длинное имя каталога"
+
+#: pg_basebackup.c:309
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "несколько знаков \"=\" в сопоставлении табличного пространства"
+
+#: pg_basebackup.c:321
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr ""
+"сопоставление табл. пространства записано неверно: \"%s\"; должно быть "
+"\"СТАРЫЙ_КАТАЛОГ=НОВЫЙ_КАТАЛОГ\""
+
+#: pg_basebackup.c:333
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr ""
+"старый каталог в сопоставлении табл. пространства задан не абсолютным путём: "
+"%s"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr ""
+"новый каталог в сопоставлении табл. пространства задан не абсолютным путём: "
+"%s"
+
+#: pg_basebackup.c:379
+#, c-format
+msgid ""
+"%s takes a base backup of a running PostgreSQL server.\n"
+"\n"
+msgstr ""
+"%s делает базовую резервную копию работающего сервера PostgreSQL.\n"
+"\n"
+
+#: pg_basebackup.c:381 pg_receivewal.c:79 pg_recvlogical.c:75
+#, c-format
+msgid "Usage:\n"
+msgstr "Использование:\n"
+
+#: pg_basebackup.c:382 pg_receivewal.c:80 pg_recvlogical.c:76
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s [ПАРАМЕТР]...\n"
+
+#: pg_basebackup.c:383
+#, c-format
+msgid ""
+"\n"
+"Options controlling the output:\n"
+msgstr ""
+"\n"
+"Параметры, управляющие выводом:\n"
+
+#: pg_basebackup.c:384
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, --pgdata=КАТАЛОГ сохранить базовую копию в указанный каталог\n"
+
+#: pg_basebackup.c:385
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr ""
+" -F, --format=p|t формат вывода (p (по умолчанию) - простой, t - "
+"tar)\n"
+
+#: pg_basebackup.c:386
+#, c-format
+msgid ""
+" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr ""
+" -r, --max-rate=СКОРОСТЬ макс. скорость передачи данных в целевой каталог\n"
+" (в КБ/с, либо добавьте суффикс \"k\" или \"M\")\n"
+
+#: pg_basebackup.c:388
+#, c-format
+msgid ""
+" -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr ""
+" -R, --write-recovery-conf\n"
+" записать конфигурацию для репликации\n"
+
+#: pg_basebackup.c:390
+#, c-format
+msgid ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr ""
+" -T, --tablespace-mapping=СТАРЫЙ_КАТАЛОГ=НОВЫЙ_КАТАЛОГ\n"
+" перенести табличное пространство из старого "
+"каталога\n"
+" в новый\n"
+
+#: pg_basebackup.c:392
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr ""
+" --waldir=КАТАЛОГ_WAL\n"
+" расположение каталога с журналом предзаписи\n"
+
+#: pg_basebackup.c:393
+#, c-format
+msgid ""
+" -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr ""
+" -X, --wal-method=none|fetch|stream\n"
+" включить в копию требуемые файлы WAL, используя\n"
+" заданный метод\n"
+
+#: pg_basebackup.c:395
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr " -z, --gzip сжать выходной tar\n"
+
+#: pg_basebackup.c:396
+#, c-format
+msgid ""
+" -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr " -Z, --compress=0-9 установить уровень сжатия выходного архива\n"
+
+#: pg_basebackup.c:397
+#, c-format
+msgid ""
+"\n"
+"General options:\n"
+msgstr ""
+"\n"
+"Общие параметры:\n"
+
+#: pg_basebackup.c:398
+#, c-format
+msgid ""
+" -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr ""
+" -c, --checkpoint=fast|spread\n"
+" режим быстрых или распределённых контрольных точек\n"
+
+#: pg_basebackup.c:400
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " -C, --create-slot создать слот репликации\n"
+
+#: pg_basebackup.c:401
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=МЕТКА установить метку резервной копии\n"
+
+#: pg_basebackup.c:402
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --no-clean не очищать после ошибок\n"
+
+#: pg_basebackup.c:403
+#, c-format
+msgid ""
+" -N, --no-sync do not wait for changes to be written safely to "
+"disk\n"
+msgstr ""
+" -N, --no-sync не ждать завершения сохранения данных на диске\n"
+
+#: pg_basebackup.c:404
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress показывать прогресс операции\n"
+
+#: pg_basebackup.c:405 pg_receivewal.c:89
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=ИМЯ_СЛОТА использовать заданный слот репликации\n"
+
+#: pg_basebackup.c:406 pg_receivewal.c:91 pg_recvlogical.c:96
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose выводить подробные сообщения\n"
+
+#: pg_basebackup.c:407 pg_receivewal.c:92 pg_recvlogical.c:97
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version показать версию и выйти\n"
+
+#: pg_basebackup.c:408
+#, c-format
+msgid ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" use algorithm for manifest checksums\n"
+msgstr ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" алгоритм подсчёта контрольных сумм в манифесте\n"
+
+# skip-rule: capital-letter-first
+# well-spelled: шестнадц
+#: pg_basebackup.c:410
+#, c-format
+msgid ""
+" --manifest-force-encode\n"
+" hex encode all file names in manifest\n"
+msgstr ""
+" --manifest-force-encode\n"
+" записывать все имена файлов в манифесте в шестнадц. "
+"виде\n"
+
+#: pg_basebackup.c:412
+#, c-format
+msgid " --no-estimate-size do not estimate backup size in server side\n"
+msgstr ""
+" --no-estimate-size не рассчитывать размер копии на стороне сервера\n"
+
+#: pg_basebackup.c:413
+#, c-format
+msgid " --no-manifest suppress generation of backup manifest\n"
+msgstr " --no-manifest отключить создание манифеста копии\n"
+
+#: pg_basebackup.c:414
+#, c-format
+msgid ""
+" --no-slot prevent creation of temporary replication slot\n"
+msgstr ""
+" --no-slot предотвратить создание временного слота репликации\n"
+
+#: pg_basebackup.c:415
+#, c-format
+msgid ""
+" --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr ""
+" --no-verify-checksums\n"
+" не проверять контрольные суммы\n"
+
+#: pg_basebackup.c:417 pg_receivewal.c:94 pg_recvlogical.c:98
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help показать эту справку и выйти\n"
+
+#: pg_basebackup.c:418 pg_receivewal.c:95 pg_recvlogical.c:99
+#, c-format
+msgid ""
+"\n"
+"Connection options:\n"
+msgstr ""
+"\n"
+"Параметры подключения:\n"
+
+#: pg_basebackup.c:419 pg_receivewal.c:96
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=СТРОКА строка подключения\n"
+
+#: pg_basebackup.c:420 pg_receivewal.c:97 pg_recvlogical.c:101
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr " -h, --host=ИМЯ имя сервера баз данных или каталог сокетов\n"
+
+#: pg_basebackup.c:421 pg_receivewal.c:98 pg_recvlogical.c:102
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=ПОРТ номер порта сервера БД\n"
+
+#: pg_basebackup.c:422
+#, c-format
+msgid ""
+" -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in "
+"seconds)\n"
+msgstr ""
+" -s, --status-interval=ИНТЕРВАЛ\n"
+" интервал между передаваемыми серверу\n"
+" пакетами состояния (в секундах)\n"
+
+#: pg_basebackup.c:424 pg_receivewal.c:99 pg_recvlogical.c:103
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr ""
+" -U, --username=NAME connect as specified database user\n"
+" -U, --username=ИМЯ имя пользователя баз данных\n"
+
+#: pg_basebackup.c:425 pg_receivewal.c:100 pg_recvlogical.c:104
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password не запрашивать пароль\n"
+
+#: pg_basebackup.c:426 pg_receivewal.c:101 pg_recvlogical.c:105
+#, c-format
+msgid ""
+" -W, --password force password prompt (should happen "
+"automatically)\n"
+msgstr ""
+" -W, --password запрашивать пароль всегда (обычно не требуется)\n"
+
+#: pg_basebackup.c:427 pg_receivewal.c:105 pg_recvlogical.c:106
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Об ошибках сообщайте по адресу <%s>.\n"
+
+#: pg_basebackup.c:428 pg_receivewal.c:106 pg_recvlogical.c:107
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Домашняя страница %s: <%s>\n"
+
+#: pg_basebackup.c:471
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "не удалось прочитать из готового канала: %m"
+
+#: pg_basebackup.c:477 pg_basebackup.c:608 pg_basebackup.c:2134
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "не удалось разобрать положение в журнале предзаписи \"%s\""
+
+#: pg_basebackup.c:573 pg_receivewal.c:441
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "не удалось завершить запись файлов WAL: %m"
+
+#: pg_basebackup.c:620
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "не удалось создать канал для фонового процесса: %m"
+
+#: pg_basebackup.c:655
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "создан временный слот репликации \"%s\""
+
+#: pg_basebackup.c:658
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "создан слот репликации \"%s\""
+
+#: pg_basebackup.c:678 pg_basebackup.c:731 pg_basebackup.c:1621
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "не удалось создать каталог \"%s\": %m"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not create background process: %m"
+msgstr "не удалось создать фоновый процесс: %m"
+
+#: pg_basebackup.c:708
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "не удалось создать фоновый поток выполнения: %m"
+
+#: pg_basebackup.c:752
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "каталог \"%s\" существует, но он не пуст"
+
+#: pg_basebackup.c:759
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "ошибка доступа к каталогу \"%s\": %m"
+
+#: pg_basebackup.c:824
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s КБ (100%%), табличное пространство %d/%d %*s"
+msgstr[1] "%*s/%s КБ (100%%), табличное пространство %d/%d %*s"
+msgstr[2] "%*s/%s КБ (100%%), табличное пространство %d/%d %*s"
+
+#: pg_basebackup.c:836
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s КБ (%d%%), табличное пространство %d/%d (%s%-*.*s)"
+msgstr[1] "%*s/%s КБ (%d%%), табличное пространство %d/%d (%s%-*.*s)"
+msgstr[2] "%*s/%s КБ (%d%%), табличное пространство %d/%d (%s%-*.*s)"
+
+#: pg_basebackup.c:852
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s КБ (%d%%), табличное пространство %d/%d"
+msgstr[1] "%*s/%s КБ (%d%%), табличное пространство %d/%d"
+msgstr[2] "%*s/%s КБ (%d%%), табличное пространство %d/%d"
+
+#: pg_basebackup.c:877
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "неверное значение (\"%s\") для скорости передачи данных"
+
+#: pg_basebackup.c:882
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "неверная скорость передачи данных \"%s\": %m"
+
+#: pg_basebackup.c:891
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "скорость передачи должна быть больше 0"
+
+#: pg_basebackup.c:923
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "неверная единица измерения в --max-rate: \"%s\""
+
+#: pg_basebackup.c:930
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "скорость передачи \"%s\" вне целочисленного диапазона"
+
+#: pg_basebackup.c:940
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "скорость передачи \"%s\" вне диапазона"
+
+#: pg_basebackup.c:961
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "не удалось получить поток данных COPY: %s"
+
+#: pg_basebackup.c:981 pg_recvlogical.c:434 pg_recvlogical.c:606
+#: receivelog.c:978
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "не удалось прочитать данные COPY: %s"
+
+#: pg_basebackup.c:1007
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "не удалось записать сжатый файл \"%s\": %s"
+
+#: pg_basebackup.c:1071
+#, c-format
+msgid "could not duplicate stdout: %m"
+msgstr "не удалось продублировать stdout: %m"
+
+#: pg_basebackup.c:1078
+#, c-format
+msgid "could not open output file: %m"
+msgstr "не удалось открыть выходной файл: %m"
+
+#: pg_basebackup.c:1085 pg_basebackup.c:1106 pg_basebackup.c:1135
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "не удалось установить уровень сжатия %d: %s"
+
+#: pg_basebackup.c:1155
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "не удалось создать сжатый файл \"%s\": %s"
+
+#: pg_basebackup.c:1268
+#, c-format
+msgid "could not close compressed file \"%s\": %m"
+msgstr "не удалось закрыть сжатый файл \"%s\": %m"
+
+#: pg_basebackup.c:1280 pg_recvlogical.c:631
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "не удалось закрыть файл \"%s\": %m"
+
+#: pg_basebackup.c:1542
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "поток COPY закончился до завершения последнего файла"
+
+#: pg_basebackup.c:1571
+#, c-format
+msgid "invalid tar block header size: %zu"
+msgstr "неверный размер заголовка блока tar: %zu"
+
+#: pg_basebackup.c:1628
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "не удалось установить права для каталога \"%s\": %m"
+
+#: pg_basebackup.c:1652
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "не удалось создать символическую ссылку \"%s\" в \"%s\": %m"
+
+#: pg_basebackup.c:1659
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "нераспознанный индикатор связи \"%c\""
+
+#: pg_basebackup.c:1678
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "не удалось установить права доступа для файла \"%s\": %m"
+
+#: pg_basebackup.c:1832
+#, c-format
+msgid "incompatible server version %s"
+msgstr "несовместимая версия сервера %s"
+
+#: pg_basebackup.c:1847
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr ""
+"ПОДСКАЗКА: укажите -X none или -X fetch для отключения трансляции журнала"
+
+#: pg_basebackup.c:1883
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr ""
+"начинается базовое резервное копирование, ожидается завершение контрольной "
+"точки"
+
+#: pg_basebackup.c:1909 pg_recvlogical.c:261 receivelog.c:494 receivelog.c:543
+#: receivelog.c:582 streamutil.c:297 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "не удалось передать команду репликации \"%s\": %s"
+
+#: pg_basebackup.c:1920
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "не удалось инициализировать базовое резервное копирование: %s"
+
+#: pg_basebackup.c:1926
+#, c-format
+msgid ""
+"server returned unexpected response to BASE_BACKUP command; got %d rows and "
+"%d fields, expected %d rows and %d fields"
+msgstr ""
+"сервер вернул неожиданный ответ на команду BASE_BACKUP; получено строк: %d, "
+"полей: %d, а ожидалось строк: %d, полей: %d"
+
+#: pg_basebackup.c:1934
+#, c-format
+msgid "checkpoint completed"
+msgstr "контрольная точка завершена"
+
+#: pg_basebackup.c:1949
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "стартовая точка в журнале предзаписи: %s на линии времени %u"
+
+#: pg_basebackup.c:1958
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "не удалось получить заголовок резервной копии: %s"
+
+#: pg_basebackup.c:1964
+#, c-format
+msgid "no data returned from server"
+msgstr "сервер не вернул данные"
+
+#: pg_basebackup.c:1996
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr ""
+"в stdout можно вывести только одно табличное пространство, всего в СУБД их %d"
+
+#: pg_basebackup.c:2008
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "запуск фонового процесса считывания WAL"
+
+#: pg_basebackup.c:2047
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr ""
+"не удалось получить от сервера конечную позицию в журнале предзаписи: %s"
+
+#: pg_basebackup.c:2053
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "сервер не передал конечную позицию в журнале предзаписи"
+
+#: pg_basebackup.c:2058
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "конечная точка в журнале предзаписи: %s"
+
+#: pg_basebackup.c:2069
+#, c-format
+msgid "checksum error occurred"
+msgstr "выявлена ошибка контрольной суммы"
+
+#: pg_basebackup.c:2074
+#, c-format
+msgid "final receive failed: %s"
+msgstr "ошибка в конце передачи: %s"
+
+#: pg_basebackup.c:2098
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "ожидание завершения потоковой передачи фоновым процессом..."
+
+#: pg_basebackup.c:2103
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "не удалось отправить команду в канал фонового процесса: %m"
+
+#: pg_basebackup.c:2111
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "сбой при ожидании дочернего процесса: %m"
+
+#: pg_basebackup.c:2116
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "завершился дочерний процесс %d вместо ожидаемого %d"
+
+#: pg_basebackup.c:2121 streamutil.c:92 streamutil.c:203
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2146
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "сбой при ожидании дочернего потока: %m"
+
+#: pg_basebackup.c:2152
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "не удалось получить состояние завершения дочернего потока: %m"
+
+#: pg_basebackup.c:2157
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "дочерний поток завершился с ошибкой %u"
+
+#: pg_basebackup.c:2185
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "сохранение данных на диске..."
+
+#: pg_basebackup.c:2210
+#, c-format
+msgid "renaming backup_manifest.tmp to backup_manifest"
+msgstr "переименование backup_manifest.tmp в backup_manifest"
+
+#: pg_basebackup.c:2221
+#, c-format
+msgid "base backup completed"
+msgstr "базовое резервное копирование завершено"
+
+#: pg_basebackup.c:2306
+#, c-format
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\""
+msgstr "неверный формат вывода \"%s\", должен быть \"plain\" или \"tar\""
+
+#: pg_basebackup.c:2350
+#, c-format
+msgid ""
+"invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr ""
+"неверный аргумент для wal-method — \"%s\", допускается только \"fetch\", "
+"\"stream\" или \"none\""
+
+#: pg_basebackup.c:2378 pg_receivewal.c:580
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "неверный уровень сжатия \"%s\""
+
+#: pg_basebackup.c:2389
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr ""
+"неверный аргумент режима контрольных точек \"%s\"; должен быть \"fast\" или "
+"\"spread\""
+
+#: pg_basebackup.c:2416 pg_receivewal.c:555 pg_recvlogical.c:819
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "неверный интервал сообщений о состоянии \"%s\""
+
+#: pg_basebackup.c:2446 pg_basebackup.c:2459 pg_basebackup.c:2470
+#: pg_basebackup.c:2481 pg_basebackup.c:2489 pg_basebackup.c:2497
+#: pg_basebackup.c:2507 pg_basebackup.c:2520 pg_basebackup.c:2529
+#: pg_basebackup.c:2540 pg_basebackup.c:2550 pg_basebackup.c:2568
+#: pg_basebackup.c:2577 pg_basebackup.c:2586 pg_receivewal.c:605
+#: pg_receivewal.c:618 pg_receivewal.c:626 pg_receivewal.c:636
+#: pg_receivewal.c:644 pg_receivewal.c:655 pg_recvlogical.c:845
+#: pg_recvlogical.c:858 pg_recvlogical.c:869 pg_recvlogical.c:877
+#: pg_recvlogical.c:885 pg_recvlogical.c:893 pg_recvlogical.c:901
+#: pg_recvlogical.c:909 pg_recvlogical.c:917
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Для дополнительной информации попробуйте \"%s --help\".\n"
+
+#: pg_basebackup.c:2457 pg_receivewal.c:616 pg_recvlogical.c:856
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "слишком много аргументов командной строки (первый: \"%s\")"
+
+#: pg_basebackup.c:2469 pg_receivewal.c:654
+#, c-format
+msgid "no target directory specified"
+msgstr "целевой каталог не указан"
+
+#: pg_basebackup.c:2480
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "сжиматься могут только резервные копии в архиве tar"
+
+#: pg_basebackup.c:2488
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "транслировать журналы предзаписи в режиме tar в поток stdout нельзя"
+
+#: pg_basebackup.c:2496
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "слоты репликации можно использовать только при потоковой передаче WAL"
+
+#: pg_basebackup.c:2506
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "--no-slot нельзя использовать с именем слота"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2518 pg_receivewal.c:634
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "для %s необходимо задать слот с помощью параметра --slot"
+
+#: pg_basebackup.c:2527 pg_basebackup.c:2566 pg_basebackup.c:2575
+#: pg_basebackup.c:2584
+#, c-format
+msgid "%s and %s are incompatible options"
+msgstr "параметры %s и %s несовместимы"
+
+#: pg_basebackup.c:2539
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "расположение каталога WAL можно указать только в режиме plain"
+
+#: pg_basebackup.c:2549
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "расположение каталога WAL должно определяться абсолютным путём"
+
+#: pg_basebackup.c:2559 pg_receivewal.c:663
+#, c-format
+msgid "this build does not support compression"
+msgstr "эта сборка программы не поддерживает сжатие"
+
+#: pg_basebackup.c:2644
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "не удалось создать символическую ссылку \"%s\": %m"
+
+#: pg_basebackup.c:2648
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "символические ссылки не поддерживаются в этой ОС"
+
+#: pg_receivewal.c:77
+#, c-format
+msgid ""
+"%s receives PostgreSQL streaming write-ahead logs.\n"
+"\n"
+msgstr ""
+"%s получает транслируемые журналы предзаписи PostgreSQL.\n"
+"\n"
+
+#: pg_receivewal.c:81 pg_recvlogical.c:81
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Параметры:\n"
+
+#: pg_receivewal.c:82
+#, c-format
+msgid ""
+" -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr ""
+" -D, --directory=ПУТЬ сохранять файлы журнала предзаписи в данный "
+"каталог\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:82
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr ""
+" -E, --endpos=LSN определяет позицию, после которой нужно "
+"остановиться\n"
+
+#: pg_receivewal.c:84 pg_recvlogical.c:86
+#, c-format
+msgid ""
+" --if-not-exists do not error if slot already exists when creating a "
+"slot\n"
+msgstr ""
+" --if-not-exists не выдавать ошибку при попытке создать уже "
+"существующий слот\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:88
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop прерывать работу при потере соединения\n"
+
+#: pg_receivewal.c:86
+#, c-format
+msgid ""
+" --no-sync do not wait for changes to be written safely to "
+"disk\n"
+msgstr ""
+" --no-sync не ждать надёжного сохранения изменений на диске\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:93
+#, c-format
+msgid ""
+" -s, --status-interval=SECS\n"
+" time between status packets sent to server "
+"(default: %d)\n"
+msgstr ""
+" -s, --status-interval=СЕК\n"
+" интервал между отправкой статусных пакетов серверу "
+"(по умолчанию: %d)\n"
+
+#: pg_receivewal.c:90
+#, c-format
+msgid ""
+" --synchronous flush write-ahead log immediately after writing\n"
+msgstr ""
+" --synchronous сбрасывать журнал предзаписи сразу после записи\n"
+
+#: pg_receivewal.c:93
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr " -Z, --compress=0-9 установить уровень сжатия журналов\n"
+
+#: pg_receivewal.c:102
+#, c-format
+msgid ""
+"\n"
+"Optional actions:\n"
+msgstr ""
+"\n"
+"Дополнительные действия:\n"
+
+#: pg_receivewal.c:103 pg_recvlogical.c:78
+#, c-format
+msgid ""
+" --create-slot create a new replication slot (for the slot's name "
+"see --slot)\n"
+msgstr ""
+" --create-slot создать новый слот репликации (имя слота задаёт "
+"параметр --slot)\n"
+
+#: pg_receivewal.c:104 pg_recvlogical.c:79
+#, c-format
+msgid ""
+" --drop-slot drop the replication slot (for the slot's name see "
+"--slot)\n"
+msgstr ""
+" --drop-slot удалить слот репликации (имя слота задаёт параметр "
+"--slot)\n"
+
+#: pg_receivewal.c:117
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "завершён сегмент %X/%X (линия времени %u)"
+
+#: pg_receivewal.c:124
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "завершена передача журнала с позиции %X/%X (линия времени %u)"
+
+#: pg_receivewal.c:140
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "переключение на линию времени %u (позиция %X/%X)"
+
+#: pg_receivewal.c:150
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "получен сигнал прерывания, работа завершается"
+
+#: pg_receivewal.c:186
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "не удалось закрыть каталог \"%s\": %m"
+
+#: pg_receivewal.c:272
+#, c-format
+msgid "segment file \"%s\" has incorrect size %lld, skipping"
+msgstr "файл сегмента \"%s\" имеет неправильный размер %lld, файл пропускается"
+
+#: pg_receivewal.c:290
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "не удалось открыть сжатый файл \"%s\": %m"
+
+#: pg_receivewal.c:296
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "ошибка позиционирования в сжатом файле \"%s\": %m"
+
+#: pg_receivewal.c:304
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "не удалось прочитать сжатый файл \"%s\": %m"
+
+#: pg_receivewal.c:307
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "не удалось прочитать сжатый файл \"%s\" (прочитано байт: %d из %zu)"
+
+#: pg_receivewal.c:318
+#, c-format
+msgid ""
+"compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr ""
+"файл сжатого сегмента \"%s\" имеет неправильный исходный размер %d, файл "
+"пропускается"
+
+#: pg_receivewal.c:422
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "начало передачи журнала с позиции %X/%X (линия времени %u)"
+
+#: pg_receivewal.c:537 pg_recvlogical.c:761
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "неверный номер порта \"%s\""
+
+#: pg_receivewal.c:565 pg_recvlogical.c:787
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "не удалось разобрать конечную позицию \"%s\""
+
+#: pg_receivewal.c:625
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "--create-slot нельзя применять вместе с --drop-slot"
+
+#: pg_receivewal.c:643
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "--synchronous нельзя применять вместе с --no-sync"
+
+#: pg_receivewal.c:723
+#, c-format
+msgid ""
+"replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr ""
+"подключение для репликации через слот \"%s\" оказалось привязано к базе "
+"данных"
+
+#: pg_receivewal.c:734 pg_recvlogical.c:968
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "удаление слота репликации \"%s\""
+
+#: pg_receivewal.c:745 pg_recvlogical.c:978
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "создание слота репликации \"%s\""
+
+#: pg_receivewal.c:771 pg_recvlogical.c:1003
+#, c-format
+msgid "disconnected"
+msgstr "отключение"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:777 pg_recvlogical.c:1009
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "отключение; через %d сек. последует повторное подключение"
+
+#: pg_recvlogical.c:73
+#, c-format
+msgid ""
+"%s controls PostgreSQL logical decoding streams.\n"
+"\n"
+msgstr ""
+"%s управляет потоками логического декодирования PostgreSQL.\n"
+"\n"
+
+#: pg_recvlogical.c:77
+#, c-format
+msgid ""
+"\n"
+"Action to be performed:\n"
+msgstr ""
+"\n"
+"Действие, которое будет выполнено:\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid ""
+" --start start streaming in a replication slot (for the "
+"slot's name see --slot)\n"
+msgstr ""
+" --start начать передачу в слоте репликации (имя слота "
+"задаёт параметр --slot)\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr ""
+" -f, --file=ФАЙЛ сохранять журнал в этот файл, - обозначает stdout\n"
+
+#: pg_recvlogical.c:84
+#, c-format
+msgid ""
+" -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: "
+"%d)\n"
+msgstr ""
+" -F --fsync-interval=СЕК\n"
+" периодичность сброса на диск выходного файла (по "
+"умолчанию: %d)\n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid ""
+" -I, --startpos=LSN where in an existing slot should the streaming "
+"start\n"
+msgstr ""
+" -I, --startpos=LSN определяет, с какой позиции в существующем слоте "
+"начнётся передача\n"
+
+#: pg_recvlogical.c:89
+#, c-format
+msgid ""
+" -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr ""
+" -o, --option=ИМЯ[=ЗНАЧЕНИЕ]\n"
+" передать параметр с заданным именем и "
+"необязательным\n"
+" значением модулю вывода\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr ""
+" -P, --plugin=МОДУЛЬ использовать заданный модуль вывода (по умолчанию: "
+"%s)\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=ИМЯ_СЛОТА имя слота логической репликации\n"
+
+#: pg_recvlogical.c:100
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=ИМЯ_БД целевая база данных\n"
+
+#: pg_recvlogical.c:133
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "подтверждается запись до %X/%X, синхронизация с ФС до %X/%X (слот %s)"
+
+#: pg_recvlogical.c:157 receivelog.c:356
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "не удалось отправить пакет ответа: %s"
+
+#: pg_recvlogical.c:228
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "начало передачи журнала с позиции %X/%X (слот %s)"
+
+#: pg_recvlogical.c:270
+#, c-format
+msgid "streaming initiated"
+msgstr "передача запущена"
+
+#: pg_recvlogical.c:334
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "не удалось открыть файл протокола \"%s\": %m"
+
+#: pg_recvlogical.c:360 receivelog.c:886
+#, c-format
+msgid "invalid socket: %s"
+msgstr "неверный сокет: %s"
+
+#: pg_recvlogical.c:413 receivelog.c:914
+#, c-format
+msgid "%s() failed: %m"
+msgstr "ошибка в %s(): %m"
+
+#: pg_recvlogical.c:420 receivelog.c:964
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "не удалось получить данные из потока WAL: %s"
+
+#: pg_recvlogical.c:462 pg_recvlogical.c:513 receivelog.c:1008
+#: receivelog.c:1074
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "заголовок потока слишком мал: %d"
+
+#: pg_recvlogical.c:497 receivelog.c:846
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "нераспознанный заголовок потока: \"%c\""
+
+#: pg_recvlogical.c:551 pg_recvlogical.c:563
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "не удалось записать %u Б в файл журнала \"%s\": %m"
+
+#: pg_recvlogical.c:617 receivelog.c:642 receivelog.c:679
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "неожиданный конец потока репликации: %s"
+
+#: pg_recvlogical.c:741
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "неверный интервал синхронизации с ФС \"%s\""
+
+#: pg_recvlogical.c:779
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "не удалось разобрать начальную позицию \"%s\""
+
+#: pg_recvlogical.c:868
+#, c-format
+msgid "no slot specified"
+msgstr "слот не указан"
+
+#: pg_recvlogical.c:876
+#, c-format
+msgid "no target file specified"
+msgstr "целевой файл не задан"
+
+#: pg_recvlogical.c:884
+#, c-format
+msgid "no database specified"
+msgstr "база данных не задана"
+
+#: pg_recvlogical.c:892
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "необходимо задать минимум одно действие"
+
+#: pg_recvlogical.c:900
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr "--create-slot или --start нельзя применять вместе с --drop-slot"
+
+#: pg_recvlogical.c:908
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr "--create-slot или --drop-slot нельзя применять вместе с --startpos"
+
+#: pg_recvlogical.c:916
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "--endpos можно задать только вместе с --start"
+
+#: pg_recvlogical.c:950
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr ""
+"не удалось установить подключение для репликации к определённой базе данных"
+
+#: pg_recvlogical.c:1049
+#, c-format
+msgid "end position %X/%X reached by keepalive"
+msgstr "конечная позиция %X/%X достигнута при обработке keepalive"
+
+#: pg_recvlogical.c:1052
+#, c-format
+msgid "end position %X/%X reached by WAL record at %X/%X"
+msgstr "конечная позиция %X/%X достигнута при обработке записи WAL %X/%X"
+
+#: receivelog.c:68
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "не удалось создать файл статуса архива \"%s\": %s"
+
+#: receivelog.c:75
+#, c-format
+msgid "could not close archive status file \"%s\": %s"
+msgstr "не удалось закрыть файл статуса архива \"%s\": %s"
+
+#: receivelog.c:123
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "не удалось получить размер файла журнала предзаписи \"%s\": %s"
+
+#: receivelog.c:134
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "не удалось открыть существующий файл журнала предзаписи \"%s\": %s"
+
+#: receivelog.c:143
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr ""
+"не удалось сбросить на диск существующий файл журнала предзаписи \"%s\": %s"
+
+#: receivelog.c:158
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] ""
+"файл журнала предзаписи \"%s\" имеет размер %d Б, а должен — 0 или %d"
+msgstr[1] ""
+"файл журнала предзаписи \"%s\" имеет размер %d Б, а должен — 0 или %d"
+msgstr[2] ""
+"файл журнала предзаписи \"%s\" имеет размер %d Б, а должен — 0 или %d"
+
+#: receivelog.c:174
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "не удалось открыть файл журнала предзаписи \"%s\": %s"
+
+#: receivelog.c:202
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "не удалось определить текущую позицию в файле \"%s\": %s"
+
+#: receivelog.c:216
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "файл \"%s%s\" не переименовывается, так как это не полный сегмент"
+
+#: receivelog.c:228 receivelog.c:313 receivelog.c:688
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "не удалось закрыть файл \"%s\": %s"
+
+#: receivelog.c:285
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "сервер сообщил неожиданное имя файла истории для линии времени %u: %s"
+
+#: receivelog.c:293
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "не удалось создать файл истории линии времени \"%s\": %s"
+
+#: receivelog.c:300
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "не удалось записать файл истории линии времени \"%s\": %s"
+
+#: receivelog.c:390
+#, c-format
+msgid ""
+"incompatible server version %s; client does not support streaming from "
+"server versions older than %s"
+msgstr ""
+"несовместимая версия сервера %s; клиент не поддерживает репликацию с "
+"серверов версии ниже %s"
+
+#: receivelog.c:399
+#, c-format
+msgid ""
+"incompatible server version %s; client does not support streaming from "
+"server versions newer than %s"
+msgstr ""
+"несовместимая версия сервера %s; клиент не поддерживает репликацию с "
+"серверов версии выше %s"
+
+#: receivelog.c:501 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid ""
+"could not identify system: got %d rows and %d fields, expected %d rows and "
+"%d or more fields"
+msgstr ""
+"не удалось идентифицировать систему; получено строк: %d, полей: %d "
+"(ожидалось: %d и %d (или более))"
+
+#: receivelog.c:508
+#, c-format
+msgid ""
+"system identifier does not match between base backup and streaming connection"
+msgstr ""
+"системный идентификатор базовой резервной копии отличается от идентификатора "
+"потоковой передачи"
+
+#: receivelog.c:514
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "на сервере нет начальной линии времени %u"
+
+#: receivelog.c:555
+#, c-format
+msgid ""
+"unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, "
+"expected %d rows and %d fields"
+msgstr ""
+"сервер вернул неожиданный ответ на команду TIMELINE_HISTORY; получено строк: "
+"%d, полей: %d, а ожидалось строк: %d, полей: %d"
+
+#: receivelog.c:626
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "сервер неожиданно сообщил линию времени %u после линии времени %u"
+
+#: receivelog.c:632
+#, c-format
+msgid ""
+"server stopped streaming timeline %u at %X/%X, but reported next timeline %u "
+"to begin at %X/%X"
+msgstr ""
+"сервер прекратил передачу линии времени %u в %X/%X, но сообщил, что "
+"следующая линии времени %u начнётся в %X/%X"
+
+#: receivelog.c:672
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "поток репликации закончился до точки остановки"
+
+#: receivelog.c:718
+#, c-format
+msgid ""
+"unexpected result set after end-of-timeline: got %d rows and %d fields, "
+"expected %d rows and %d fields"
+msgstr ""
+"сервер вернул неожиданный набор данных после конца линии времени; получено "
+"строк: %d, полей: %d, а ожидалось строк: %d, полей: %d"
+
+#: receivelog.c:727
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "не удалось разобрать начальную точку следующей линии времени \"%s\""
+
+#: receivelog.c:776 receivelog.c:1028 walmethods.c:994
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "не удалось синхронизировать с ФС файл \"%s\": %s"
+
+#: receivelog.c:1091
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "получена запись журнала предзаписи по смещению %u, но файл не открыт"
+
+#: receivelog.c:1101
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "получено смещение данных WAL %08x, но ожидалось %08x"
+
+#: receivelog.c:1135
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "не удалось записать %u Б в файл WAL \"%s\": %s"
+
+#: receivelog.c:1160 receivelog.c:1200 receivelog.c:1230
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "не удалось отправить пакет \"конец COPY\": %s"
+
+#: streamutil.c:162
+msgid "Password: "
+msgstr "Пароль: "
+
+#: streamutil.c:186
+#, c-format
+msgid "could not connect to server"
+msgstr "не удалось подключиться к серверу"
+
+#: streamutil.c:231
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "не удалось очистить search_path: %s"
+
+#: streamutil.c:247
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "не удалось получить настройку сервера integer_datetimes"
+
+#: streamutil.c:254
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "флаг компиляции integer_datetimes не соответствует настройке сервера"
+
+#: streamutil.c:305
+#, c-format
+msgid ""
+"could not fetch WAL segment size: got %d rows and %d fields, expected %d "
+"rows and %d or more fields"
+msgstr ""
+"не удалось извлечь размер сегмента WAL; получено строк: %d, полей: %d "
+"(ожидалось: %d и %d (или более))"
+
+#: streamutil.c:315
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "разобрать размер сегмента WAL не удалось"
+
+#: streamutil.c:333
+#, c-format
+msgid ""
+"WAL segment size must be a power of two between 1 MB and 1 GB, but the "
+"remote server reported a value of %d byte"
+msgid_plural ""
+"WAL segment size must be a power of two between 1 MB and 1 GB, but the "
+"remote server reported a value of %d bytes"
+msgstr[0] ""
+"размер сегмента WAL должен задаваться степенью 2 в интервале от 1 МБ до 1 "
+"ГБ, но удалённый сервер сообщил значение: %d"
+msgstr[1] ""
+"размер сегмента WAL должен задаваться степенью 2 в интервале от 1 МБ до 1 "
+"ГБ, но удалённый сервер сообщил значение: %d"
+msgstr[2] ""
+"размер сегмента WAL должен задаваться степенью 2 в интервале от 1 МБ до 1 "
+"ГБ, но удалённый сервер сообщил значение: %d"
+
+#: streamutil.c:378
+#, c-format
+msgid ""
+"could not fetch group access flag: got %d rows and %d fields, expected %d "
+"rows and %d or more fields"
+msgstr ""
+"не удалось извлечь флаг доступа группы; получено строк: %d, полей: %d "
+"(ожидалось: %d и %d (или более))"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "не удалось разобрать флаг доступа группы: %s"
+
+#: streamutil.c:544
+#, c-format
+msgid ""
+"could not create replication slot \"%s\": got %d rows and %d fields, "
+"expected %d rows and %d fields"
+msgstr ""
+"создать слот репликации \"%s\" не удалось; получено строк: %d, полей: %d "
+"(ожидалось: %d и %d)"
+
+#: streamutil.c:588
+#, c-format
+msgid ""
+"could not drop replication slot \"%s\": got %d rows and %d fields, expected "
+"%d rows and %d fields"
+msgstr ""
+"удалить слот репликации \"%s\" не получилось; получено строк: %d, полей: %d "
+"(ожидалось: %d и %d)"
+
+#: walmethods.c:521 walmethods.c:1057
+msgid "could not compress data"
+msgstr "не удалось сжать данные"
+
+#: walmethods.c:550
+msgid "could not reset compression stream"
+msgstr "не удалось сбросить поток сжатых данных"
+
+#: walmethods.c:670
+msgid "could not initialize compression library"
+msgstr "не удалось инициализировать библиотеку сжатия"
+
+#: walmethods.c:681
+msgid "implementation error: tar files can't have more than one open file"
+msgstr ""
+"ошибка реализации: в файлах tar не может быть больше одно открытого файла"
+
+#: walmethods.c:695
+msgid "could not create tar header"
+msgstr "не удалось создать заголовок tar"
+
+#: walmethods.c:711 walmethods.c:751 walmethods.c:965 walmethods.c:977
+msgid "could not change compression parameters"
+msgstr "не удалось изменить параметры сжатия"
+
+#: walmethods.c:850
+msgid "unlink not supported with compression"
+msgstr "со сжатием закрытие файла с удалением не поддерживается"
+
+#: walmethods.c:1081
+msgid "could not close compression stream"
+msgstr "не удалось закрыть поток сжатых данных"
+
+#~ msgid "--progress and --no-estimate-size are incompatible options"
+#~ msgstr "параметры --progress и --no-estimate-size несовместимы"
+
+#~ msgid "--no-manifest and --manifest-checksums are incompatible options"
+#~ msgstr "параметры --no-manifest и --manifest-checksums несовместимы"
+
+#~ msgid "--no-manifest and --manifest-force-encode are incompatible options"
+#~ msgstr "параметры --no-manifest и --manifest-force-encode несовместимы"
+
+#~ msgid "could not connect to server: %s"
+#~ msgstr "не удалось подключиться к серверу: %s"
+
+#~ msgid ""
+#~ "\n"
+#~ "Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Об ошибках сообщайте по адресу <pgsql-bugs@lists.postgresql.org>.\n"
+
+#~ msgid "%s: out of memory\n"
+#~ msgstr "%s: нехватка памяти\n"
+
+#~ msgid "%s: child process did not exit normally\n"
+#~ msgstr "%s: дочерний процесс завершён ненормально\n"
+
+#~ msgid "%s: child process exited with error %d\n"
+#~ msgstr "%s: дочерний процесс завершился с ошибкой %d\n"
+
+#~ msgid "%s: could not fsync log file \"%s\": %s\n"
+#~ msgstr "%s: не удалось синхронизировать с ФС файл журнала \"%s\": %s\n"
+
+#~ msgid "%s: removing transaction log directory \"%s\"\n"
+#~ msgstr "%s: удаление каталога журнала транзакций \"%s\"\n"
+
+#~ msgid "%s: failed to remove transaction log directory\n"
+#~ msgstr "%s: ошибка при удалении каталога журнала транзакций\n"
+
+#~ msgid "%s: removing contents of transaction log directory \"%s\"\n"
+#~ msgstr "%s: очистка каталога журнала транзакций \"%s\"\n"
+
+#~ msgid "%s: failed to remove contents of transaction log directory\n"
+#~ msgstr "%s: ошибка при очистке каталога журнала транзакций\n"
+
+#~ msgid "%s: transaction log directory \"%s\" not removed at user's request\n"
+#~ msgstr ""
+#~ "%s: каталог журнала транзакций \"%s\" не был удалён по запросу "
+#~ "пользователя\n"
+
+#~ msgid "%s: could not open transaction log file \"%s\": %s\n"
+#~ msgstr "%s: не удалось открыть файл журнала транзакций \"%s\": %s\n"
+
+#~ msgid ""
+#~ " -x, --xlog include required WAL files in backup (fetch "
+#~ "mode)\n"
+#~ msgstr ""
+#~ " -x, --xlog включить в копию требуемые файлы WAL (режим "
+#~ "fetch)\n"
+
+#~ msgid "%s: cannot specify both --xlog and --xlog-method\n"
+#~ msgstr "%s: указать и --xlog, и --xlog-method одновременно нельзя\n"
+
+#~ msgid "%s: WAL streaming can only be used in plain mode\n"
+#~ msgstr "%s: потоковая передача WAL поддерживается только в режиме plain\n"
+
+#~ msgid "%s: could not stat transaction log file \"%s\": %s\n"
+#~ msgstr "%s: не удалось проверить файл журнала транзакций \"%s\": %s\n"
+
+#~ msgid "%s: could not pad transaction log file \"%s\": %s\n"
+#~ msgstr "%s: не удалось дополнить файл журнала транзакций \"%s\": %s\n"
+
+#~ msgid "%s: could not rename file \"%s\": %s\n"
+#~ msgstr "%s: не удалось переименовать файл \"%s\": %s\n"
+
+#~ msgid "%s: could not open timeline history file \"%s\": %s\n"
+#~ msgstr "%s: не удалось открыть файл истории линии времени \"%s\": %s\n"
+
+#~ msgid "%s: could not parse file size\n"
+#~ msgstr "%s: не удалось разобрать размер файла\n"
+
+#~ msgid "%s: could not parse file mode\n"
+#~ msgstr "%s: не удалось разобрать режим файла\n"
+
+#~ msgid "%s: socket not open"
+#~ msgstr "%s: сокет не открыт"
+
+#~ msgid "%s: could not remove symbolic link \"%s\": %s\n"
+#~ msgstr "%s: ошибка при удалении символической ссылки \"%s\": %s\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Replication options:\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Параметры репликации:\n"
+
+#~ msgid "%s: initializing replication slot \"%s\"\n"
+#~ msgstr "%s: инициализируется слот репликации \"%s\"\n"
+
+#~ msgid ""
+#~ "%s: could not init logical replication: got %d rows and %d fields, "
+#~ "expected %d rows and %d fields\n"
+#~ msgstr ""
+#~ "%s: не удалось инициализировать логическую репликацию; получено строк: "
+#~ "%d, полей: %d (ожидалось: %d и %d)\n"
+
+#~ msgid "%s: no start point returned from server\n"
+#~ msgstr "%s: сервер не вернул стартовую точку\n"
+
+#~ msgid ""
+#~ "%s: timeline does not match between base backup and streaming connection\n"
+#~ msgstr ""
+#~ "%s: линия времени базовой резервной копии отличается от линии времени "
+#~ "потоковой передачи\n"
+
+#~ msgid "%s: keepalive message has incorrect size %d\n"
+#~ msgstr "%s: контрольное сообщение имеет некорректный размер: %d\n"
+
+#~ msgid "%s: could not close file %s: %s\n"
+#~ msgstr "%s: не удалось закрыть файл %s: %s\n"
+
+#~ msgid "%s: invalid format of xlog location: %s\n"
+#~ msgstr "%s: неверный формат позиции в xlog: %s\n"
+
+#~ msgid "%s: could not identify system: %s"
+#~ msgstr "%s: не удалось идентифицировать систему: %s"
+
+#~ msgid "%s: could not send base backup command: %s"
+#~ msgstr ""
+#~ "%s: не удалось отправить команду базового резервного копирования: %s"
+
+#~ msgid "%s: could not identify system: %s\n"
+#~ msgstr "%s: не удалось идентифицировать систему: %s\n"
+
+#~ msgid "%s: could not open WAL segment %s: %s\n"
+#~ msgstr "%s: не удалось открыть сегмент WAL %s: %s\n"
+
+#~ msgid "%s: could not stat WAL segment %s: %s\n"
+#~ msgstr "%s: не удалось получить информацию о сегменте WAL %s: %s\n"
+
+#~ msgid "%s: could not pad WAL segment %s: %s\n"
+#~ msgstr "%s: не удалось дополнить сегмент WAL %s: %s\n"
+
+#~ msgid "%s: could not get current position in file %s: %s\n"
+#~ msgstr "%s: не удалось получить текущую позицию в файле %s: %s\n"
diff --git a/src/bin/pg_basebackup/po/sv.po b/src/bin/pg_basebackup/po/sv.po
new file mode 100644
index 0000000..8a16dd5
--- /dev/null
+++ b/src/bin/pg_basebackup/po/sv.po
@@ -0,0 +1,1497 @@
+# SWEDISH message translation file for pg_basebackup
+# Copyright (C) 2017 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Dennis Björklund <db@zigo.dhs.org>, 2017, 2018, 2019, 2020, 2021, 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_basebackup (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-02-18 04:16+0000\n"
+"PO-Revision-Date: 2022-02-18 15:31+0100\n"
+"Last-Translator: Dennis Björklund <db@zigo.dhs.org>\n"
+"Language-Team: Swedish <pgsql-translators@postgresql.org>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "fatalt: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "fel: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "varning: "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98 ../../common/fe_memutils.c:162
+#, c-format
+msgid "out of memory\n"
+msgstr "slut på minne\n"
+
+#: ../../common/fe_memutils.c:92 ../../common/fe_memutils.c:154
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "kan inte duplicera null-pekare (internt fel)\n"
+
+#: ../../common/file_utils.c:87 ../../common/file_utils.c:451
+#: pg_receivewal.c:266 pg_recvlogical.c:339
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "kunde inte göra stat() på fil \"%s\": %m"
+
+#: ../../common/file_utils.c:166 pg_receivewal.c:169
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "kunde inte öppna katalog \"%s\": %m"
+
+#: ../../common/file_utils.c:200 pg_receivewal.c:337
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "kunde inte läsa katalog \"%s\": %m"
+
+#: ../../common/file_utils.c:232 ../../common/file_utils.c:291
+#: ../../common/file_utils.c:365 ../../fe_utils/recovery_gen.c:134
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "kunde inte öppna fil \"%s\": %m"
+
+#: ../../common/file_utils.c:303 ../../common/file_utils.c:373
+#: pg_recvlogical.c:193
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "kunde inte fsync:a fil \"%s\": %m"
+
+#: ../../common/file_utils.c:383
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "kunde inte döpa om fil \"%s\" till \"%s\": %m"
+
+#: ../../fe_utils/recovery_gen.c:35 ../../fe_utils/recovery_gen.c:49
+#: ../../fe_utils/recovery_gen.c:77 ../../fe_utils/recovery_gen.c:100
+#: ../../fe_utils/recovery_gen.c:171 pg_basebackup.c:1248
+#, c-format
+msgid "out of memory"
+msgstr "slut på minne"
+
+#: ../../fe_utils/recovery_gen.c:140 pg_basebackup.c:1021 pg_basebackup.c:1715
+#: pg_basebackup.c:1771
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "kunde inte skriva till fil \"%s\": %m"
+
+#: ../../fe_utils/recovery_gen.c:152 pg_basebackup.c:1166 pg_basebackup.c:1672
+#: pg_basebackup.c:1748
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "kunde inte skapa fil \"%s\": %m"
+
+#: pg_basebackup.c:224
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "tar bort datakatalog \"%s\""
+
+#: pg_basebackup.c:226
+#, c-format
+msgid "failed to remove data directory"
+msgstr "misslyckades med att ta bort datakatalog"
+
+#: pg_basebackup.c:230
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "tar bort innehållet i datakatalog \"%s\""
+
+#: pg_basebackup.c:232
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "misslyckades med att ta bort innehållet i datakatalogen"
+
+#: pg_basebackup.c:237
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "tar bort WAL-katalog \"%s\""
+
+#: pg_basebackup.c:239
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "misslyckades med att ta bort WAL-katalog"
+
+#: pg_basebackup.c:243
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "tar bort innehållet i WAL-katalog \"%s\""
+
+#: pg_basebackup.c:245
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "misslyckades med att ta bort innehållet i WAL-katalogen"
+
+#: pg_basebackup.c:251
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "datakatalog \"%s\" är ej borttagen på användares begäran"
+
+#: pg_basebackup.c:254
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "WAL-katalog \"%s\" är ej borttagen på användares begäran"
+
+#: pg_basebackup.c:258
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "ändringar av tablespace-kataloger kan inte backas"
+
+#: pg_basebackup.c:299
+#, c-format
+msgid "directory name too long"
+msgstr "katalognamn för långt"
+
+#: pg_basebackup.c:309
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "multipla \"=\"-tecken i tablespace-mappning"
+
+#: pg_basebackup.c:321
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr "ogiltigt tablespace-mappningsformat \"%s\", måste vara \"OLDDIR=NEWDIR\""
+
+#: pg_basebackup.c:333
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr "gammal katalog är inte en absolut sökväg i tablespace-mappning: %s"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr "ny katalog är inte en absolut sökväg i tablespace-mappning: %s"
+
+#: pg_basebackup.c:379
+#, c-format
+msgid ""
+"%s takes a base backup of a running PostgreSQL server.\n"
+"\n"
+msgstr ""
+"%s tar en basbackup av en körande PostgreSQL-server.\n"
+"\n"
+
+#: pg_basebackup.c:381 pg_receivewal.c:79 pg_recvlogical.c:75
+#, c-format
+msgid "Usage:\n"
+msgstr "Användning:\n"
+
+#: pg_basebackup.c:382 pg_receivewal.c:80 pg_recvlogical.c:76
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s [FLAGGA]...\n"
+
+#: pg_basebackup.c:383
+#, c-format
+msgid ""
+"\n"
+"Options controlling the output:\n"
+msgstr ""
+"\n"
+"Flaggor som styr utmatning:\n"
+
+#: pg_basebackup.c:384
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, --pgdata=KATALOG ta emot basbackup till katalog\n"
+
+#: pg_basebackup.c:385
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr " -F, --format=p|t utdataformat (plain (standard), tar)\n"
+
+#: pg_basebackup.c:386
+#, c-format
+msgid ""
+" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr ""
+" -r, --max-rate=RATE maximal överföringshastighet för att överföra datakatalog\n"
+" (i kB/s, eller använd suffix \"k\" resp. \"M\")\n"
+
+#: pg_basebackup.c:388
+#, c-format
+msgid ""
+" -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr ""
+" -R, --write-recovery-conf\n"
+" skriv konfiguration för replikering\n"
+
+#: pg_basebackup.c:390
+#, c-format
+msgid ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr ""
+" -T, --tablespace-mapping=GAMMALKAT=NYKAT\n"
+" flytta tablespace i GAMMALKAT till NYKAT\n"
+
+#: pg_basebackup.c:392
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr " --waldir=WALKAT plats för write-ahead-logg-katalog\n"
+
+#: pg_basebackup.c:393
+#, c-format
+msgid ""
+" -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr ""
+" -X, --wal-method=none|fetch|stream\n"
+" inkludera behövda WAL-filer med angiven metod\n"
+
+#: pg_basebackup.c:395
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr " -z, --gzip komprimera tar-utdata\n"
+
+#: pg_basebackup.c:396
+#, c-format
+msgid " -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr " -Z, --compress=0-9 komprimera tar-utdata med given komprimeringsnivå\n"
+
+#: pg_basebackup.c:397
+#, c-format
+msgid ""
+"\n"
+"General options:\n"
+msgstr ""
+"\n"
+"Allmänna flaggor:\n"
+
+#: pg_basebackup.c:398
+#, c-format
+msgid ""
+" -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr ""
+" -c, --checkpoint=fast|spread\n"
+" ställ in \"fast\" eller \"spread\" checkpoint-metod\n"
+
+#: pg_basebackup.c:400
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " --create-slot skapa en replikeringsslot\n"
+
+#: pg_basebackup.c:401
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=ETIKETT sätt backup-etikett\n"
+
+#: pg_basebackup.c:402
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --no-clean städa inte upp efter fel\n"
+
+#: pg_basebackup.c:403
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync vänta inte på att ändringar skall skrivas säkert till disk\n"
+
+#: pg_basebackup.c:404
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress visa förloppsinformation\n"
+
+#: pg_basebackup.c:405 pg_receivewal.c:89
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=SLOTNAMN replikerings-slot att använda\n"
+
+#: pg_basebackup.c:406 pg_receivewal.c:91 pg_recvlogical.c:96
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose mata ut utförliga meddelanden\n"
+
+#: pg_basebackup.c:407 pg_receivewal.c:92 pg_recvlogical.c:97
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version visa versionsinformation, avsluta sedan\n"
+
+#: pg_basebackup.c:408
+#, c-format
+msgid ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" use algorithm for manifest checksums\n"
+msgstr ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" använd algoritm för manifestchecksummor\n"
+
+#: pg_basebackup.c:410
+#, c-format
+msgid ""
+" --manifest-force-encode\n"
+" hex encode all file names in manifest\n"
+msgstr ""
+" --manifest-force-encode\n"
+" hex-koda alla filnamn i manifestet\n"
+
+#: pg_basebackup.c:412
+#, c-format
+msgid " --no-estimate-size do not estimate backup size in server side\n"
+msgstr " --no-estimate-size estimerar inte backupstorlek på serversidan\n"
+
+#: pg_basebackup.c:413
+#, c-format
+msgid " --no-manifest suppress generation of backup manifest\n"
+msgstr " --no-manifest förhindra att backupmanifest genereras\n"
+
+#: pg_basebackup.c:414
+#, c-format
+msgid " --no-slot prevent creation of temporary replication slot\n"
+msgstr " --no-slot förhindra skapande av temporär replikerings-slot\n"
+
+#: pg_basebackup.c:415
+#, c-format
+msgid ""
+" --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr ""
+" --no-verify-checksums\n"
+" verifiera inte checksummor\n"
+
+#: pg_basebackup.c:417 pg_receivewal.c:94 pg_recvlogical.c:98
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help visa den här hjälpen, avsluta sedan\n"
+
+#: pg_basebackup.c:418 pg_receivewal.c:95 pg_recvlogical.c:99
+#, c-format
+msgid ""
+"\n"
+"Connection options:\n"
+msgstr ""
+"\n"
+"Flaggor för anslutning:\n"
+
+#: pg_basebackup.c:419 pg_receivewal.c:96
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=CONNSTR anslutningssträng\n"
+
+#: pg_basebackup.c:420 pg_receivewal.c:97 pg_recvlogical.c:101
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr " -h, --host=HOSTNAMN databasserverns värdnamn eller socket-katalog\n"
+
+#: pg_basebackup.c:421 pg_receivewal.c:98 pg_recvlogical.c:102
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=PORT databasserverns postnummer\n"
+
+#: pg_basebackup.c:422
+#, c-format
+msgid ""
+" -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in seconds)\n"
+msgstr ""
+" -s, --status-interval=INTERVAL\n"
+" tid mellan att statuspaket skickas till servern (i sekunder)\n"
+
+#: pg_basebackup.c:424 pg_receivewal.c:99 pg_recvlogical.c:103
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr " -U, --username=NAMN ansluta som angiven databasanvändare\n"
+
+#: pg_basebackup.c:425 pg_receivewal.c:100 pg_recvlogical.c:104
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password fråga aldrig efter lösenord\n"
+
+#: pg_basebackup.c:426 pg_receivewal.c:101 pg_recvlogical.c:105
+#, c-format
+msgid " -W, --password force password prompt (should happen automatically)\n"
+msgstr " -W, --password tvinga fram lösenordsfråga (skall ske automatiskt)\n"
+
+#: pg_basebackup.c:427 pg_receivewal.c:105 pg_recvlogical.c:106
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Rapportera fel till <%s>.\n"
+
+#: pg_basebackup.c:428 pg_receivewal.c:106 pg_recvlogical.c:107
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "hemsida för %s: <%s>\n"
+
+#: pg_basebackup.c:471
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "kunde inte läsa från rör (pipe) som har data: %m"
+
+#: pg_basebackup.c:477 pg_basebackup.c:608 pg_basebackup.c:2134
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "kunde inte parsa write-ahead-logg-plats \"%s\""
+
+#: pg_basebackup.c:573 pg_receivewal.c:441
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "kunde inte slutföra skrivning av WAL-filer: %m"
+
+#: pg_basebackup.c:620
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "kunde inte skapa rör (pipe) för bakgrundsprocess: %m"
+
+#: pg_basebackup.c:655
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "skapade en temporär replikeringsslot \"%s\""
+
+#: pg_basebackup.c:658
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "skapade en replikeringsslot \"%s\""
+
+#: pg_basebackup.c:678 pg_basebackup.c:731 pg_basebackup.c:1621
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "kunde inte skapa katalog \"%s\": %m"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not create background process: %m"
+msgstr "kunde inte skapa bakgrundsprocess: %m"
+
+#: pg_basebackup.c:708
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "kunde inte skapa bakgrundstråd: %m"
+
+#: pg_basebackup.c:752
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "katalogen \"%s\" existerar men är inte tom"
+
+#: pg_basebackup.c:759
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "kunde inte komma åt katalog \"%s\": %m"
+
+#: pg_basebackup.c:824
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgstr[1] "%*s/%s kB (100%%), %d/%d tablespace %*s"
+
+#: pg_basebackup.c:836
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+
+#: pg_basebackup.c:852
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d tablespace"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d tablespace"
+
+#: pg_basebackup.c:877
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "överföringshastighet \"%s\" är inte ett giltigt värde"
+
+#: pg_basebackup.c:882
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "ogiltig överföringshastighet \"%s\": %m"
+
+#: pg_basebackup.c:891
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "överföringshastigheten måste vara större än noll"
+
+#: pg_basebackup.c:923
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "ogiltig enhet för --max-rate: \"%s\""
+
+#: pg_basebackup.c:930
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "överföringshastighet \"%s\" överskrider heltalsintervall"
+
+#: pg_basebackup.c:940
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "överföringshastighet \"%s\" är utanför sitt intervall"
+
+#: pg_basebackup.c:961
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "kunde inte hämta COPY-data-ström: %s"
+
+#: pg_basebackup.c:981 pg_recvlogical.c:434 pg_recvlogical.c:606
+#: receivelog.c:978
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "kunde inte läsa COPY-data: %s"
+
+#: pg_basebackup.c:1007
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "kunde inte skriva till komprimerad fil \"%s\": %s"
+
+#: pg_basebackup.c:1071
+#, c-format
+msgid "could not duplicate stdout: %m"
+msgstr "kunde inte duplicera stdout: %m"
+
+#: pg_basebackup.c:1078
+#, c-format
+msgid "could not open output file: %m"
+msgstr "kunde inte öppna utdatafilen: %m"
+
+#: pg_basebackup.c:1085 pg_basebackup.c:1106 pg_basebackup.c:1135
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "kunde inte sätta komprimeringsnivå %d: %s"
+
+#: pg_basebackup.c:1155
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "kunde inte skapa komprimerad fil \"%s\": %s"
+
+#: pg_basebackup.c:1268
+#, c-format
+msgid "could not close compressed file \"%s\": %m"
+msgstr "kunde inte stänga komprimerad fil \"%s\": %m"
+
+#: pg_basebackup.c:1280 pg_recvlogical.c:631
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "kunde inte stänga fil \"%s\": %m"
+
+#: pg_basebackup.c:1542
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "COPY-ström avslutade innan sista filen var klar"
+
+#: pg_basebackup.c:1571
+#, c-format
+msgid "invalid tar block header size: %zu"
+msgstr "ogiltig tar-block-header-storlek: %zu"
+
+#: pg_basebackup.c:1628
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "kunde inte sätta rättigheter på katalogen \"%s\": %m"
+
+#: pg_basebackup.c:1652
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "kunde inte skapa symbolisk länk från \"%s\" till \"%s\": %m"
+
+#: pg_basebackup.c:1659
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "okänd länkindikator \"%c\""
+
+#: pg_basebackup.c:1678
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "kunde inte sätta rättigheter på filen \"%s\": %m"
+
+#: pg_basebackup.c:1832
+#, c-format
+msgid "incompatible server version %s"
+msgstr "inkompatibel serverversion %s"
+
+#: pg_basebackup.c:1847
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr "TIPS: använd -X none eller -X fetch för att stänga av logg-strömning"
+
+#: pg_basebackup.c:1883
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr "initierar basbackup, väntar på att checkpoint skall gå klart"
+
+#: pg_basebackup.c:1909 pg_recvlogical.c:261 receivelog.c:494 receivelog.c:543
+#: receivelog.c:582 streamutil.c:297 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "kunde inte skicka replikeringskommando \"%s\": %s"
+
+#: pg_basebackup.c:1920
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "kunde inte initiera basbackup: %s"
+
+#: pg_basebackup.c:1926
+#, c-format
+msgid "server returned unexpected response to BASE_BACKUP command; got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "servern retunerade ett oväntat svar på BASE_BACKUP-kommandot; fick %d rader och %d fält, förväntade %d rader och %d fält"
+
+#: pg_basebackup.c:1934
+#, c-format
+msgid "checkpoint completed"
+msgstr "checkpoint klar"
+
+#: pg_basebackup.c:1949
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "write-ahead-loggens startposition: %s på tidslinje %u"
+
+#: pg_basebackup.c:1958
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "kunde inte hämta backup-header: %s"
+
+#: pg_basebackup.c:1964
+#, c-format
+msgid "no data returned from server"
+msgstr "ingen data returnerades från servern"
+
+#: pg_basebackup.c:1996
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr "kunde bara skriva en endaste tablespace till stdout, databasen har %d"
+
+#: pg_basebackup.c:2008
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "startar bakgrunds-WAL-mottagare"
+
+#: pg_basebackup.c:2047
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr "kunde inte hämta write-ahead-loggens slutposition från servern: %s"
+
+#: pg_basebackup.c:2053
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "ingen write-ahead-logg-slutposition returnerad från servern"
+
+#: pg_basebackup.c:2058
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "write-ahead-logg-slutposition: %s"
+
+#: pg_basebackup.c:2069
+#, c-format
+msgid "checksum error occurred"
+msgstr "felaktig kontrollsumma upptäcktes"
+
+#: pg_basebackup.c:2074
+#, c-format
+msgid "final receive failed: %s"
+msgstr "sista mottagning misslyckades: %s"
+
+#: pg_basebackup.c:2098
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "väntat på att bakgrundsprocess skall avsluta strömmande ..."
+
+#: pg_basebackup.c:2103
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "kunde inte skicka kommando till bakgrundsrör (pipe): %m"
+
+#: pg_basebackup.c:2111
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "kunde inte vänta på barnprocess: %m"
+
+#: pg_basebackup.c:2116
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "barn %d dog, förväntade %d"
+
+#: pg_basebackup.c:2121 streamutil.c:92 streamutil.c:203
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2146
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "kunde inte vänta på barntråd: %m"
+
+#: pg_basebackup.c:2152
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "kunde inte hämta barntrådens slutstatus: %m"
+
+#: pg_basebackup.c:2157
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "barntråd avslutade med fel %u"
+
+#: pg_basebackup.c:2185
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "synkar data till disk ..."
+
+#: pg_basebackup.c:2210
+#, c-format
+msgid "renaming backup_manifest.tmp to backup_manifest"
+msgstr "byter namn på backup_manifest.tmp till backup_manifest"
+
+#: pg_basebackup.c:2221
+#, c-format
+msgid "base backup completed"
+msgstr "basbackup klar"
+
+#: pg_basebackup.c:2306
+#, c-format
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\""
+msgstr "ogiltigt utdataformat \"%s\", måste vara \"plain\" eller \"tar\""
+
+#: pg_basebackup.c:2350
+#, c-format
+msgid "invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr "ogiltig wal-metod-flagga \"%s\", måste vara \"fetch\", \"stream\" eller \"none\""
+
+#: pg_basebackup.c:2378 pg_receivewal.c:580
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "ogiltig komprimeringsnivå \"%s\""
+
+#: pg_basebackup.c:2389
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr "ogiltigt checkpoint-argument \"%s\", måste vara \"fast\" eller \"spread\""
+
+#: pg_basebackup.c:2416 pg_receivewal.c:555 pg_recvlogical.c:819
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "ogiltigt status-intervall \"%s\""
+
+#: pg_basebackup.c:2446 pg_basebackup.c:2459 pg_basebackup.c:2470
+#: pg_basebackup.c:2481 pg_basebackup.c:2489 pg_basebackup.c:2497
+#: pg_basebackup.c:2507 pg_basebackup.c:2520 pg_basebackup.c:2529
+#: pg_basebackup.c:2540 pg_basebackup.c:2550 pg_basebackup.c:2568
+#: pg_basebackup.c:2577 pg_basebackup.c:2586 pg_receivewal.c:605
+#: pg_receivewal.c:618 pg_receivewal.c:626 pg_receivewal.c:636
+#: pg_receivewal.c:644 pg_receivewal.c:655 pg_recvlogical.c:845
+#: pg_recvlogical.c:858 pg_recvlogical.c:869 pg_recvlogical.c:877
+#: pg_recvlogical.c:885 pg_recvlogical.c:893 pg_recvlogical.c:901
+#: pg_recvlogical.c:909 pg_recvlogical.c:917
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Försök med \"%s --help\" för mer information.\n"
+
+#: pg_basebackup.c:2457 pg_receivewal.c:616 pg_recvlogical.c:856
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "för många kommandoradsargument (första är \"%s\")"
+
+#: pg_basebackup.c:2469 pg_receivewal.c:654
+#, c-format
+msgid "no target directory specified"
+msgstr "ingen målkatalog angiven"
+
+#: pg_basebackup.c:2480
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "bara backupper i tar-läge kan komprimeras"
+
+#: pg_basebackup.c:2488
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "kan inte strömma write-ahead-logg i tar-läge till stdout"
+
+#: pg_basebackup.c:2496
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "replikerings-slot kan bara användas med WAL-strömning"
+
+#: pg_basebackup.c:2506
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "--no-slot kan inte användas tillsammans med slot-namn"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2518 pg_receivewal.c:634
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "%s kräver att en slot anges med --slot"
+
+#: pg_basebackup.c:2527 pg_basebackup.c:2566 pg_basebackup.c:2575
+#: pg_basebackup.c:2584
+#, c-format
+msgid "%s and %s are incompatible options"
+msgstr "%s och %s är inkompatibla flaggor"
+
+#: pg_basebackup.c:2539
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "WAL-katalogplats kan bara anges i läget \"plain\""
+
+#: pg_basebackup.c:2549
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "WAL-katalogen måste vara en absolut sökväg"
+
+#: pg_basebackup.c:2559 pg_receivewal.c:663
+#, c-format
+msgid "this build does not support compression"
+msgstr "detta bygge stöder inte komprimering"
+
+#: pg_basebackup.c:2644
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "kan inte skapa symbolisk länk \"%s\": %m"
+
+#: pg_basebackup.c:2648
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "symboliska länkar stöds inte på denna plattform"
+
+#: pg_receivewal.c:77
+#, c-format
+msgid ""
+"%s receives PostgreSQL streaming write-ahead logs.\n"
+"\n"
+msgstr ""
+"%s tar emot PostgreSQL-strömning-write-ahead-logg.\n"
+"\n"
+
+#: pg_receivewal.c:81 pg_recvlogical.c:81
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Flaggor:\n"
+
+#: pg_receivewal.c:82
+#, c-format
+msgid " -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr " -D, --directory=KAT ta emot write-ahead-logg-filer till denna katalog\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:82
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr " -E, --endpos=LSN avsluta efter att ha taget emot den angivna LSN\n"
+
+#: pg_receivewal.c:84 pg_recvlogical.c:86
+#, c-format
+msgid " --if-not-exists do not error if slot already exists when creating a slot\n"
+msgstr " --if-not-exists inget fel om slot:en redan finns när vi skapar slot:en\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:88
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop loopa inte om anslutning tappas\n"
+
+#: pg_receivewal.c:86
+#, c-format
+msgid " --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " --no-sync vänta inte på att ändringar skall skrivas säkert till disk\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:93
+#, c-format
+msgid ""
+" -s, --status-interval=SECS\n"
+" time between status packets sent to server (default: %d)\n"
+msgstr ""
+" -s, --status-interval=SEKS\n"
+" tid mellan att statuspaket skickas till serverb (standard: %d)\n"
+
+#: pg_receivewal.c:90
+#, c-format
+msgid " --synchronous flush write-ahead log immediately after writing\n"
+msgstr " --synchronous flush:a write-ahead-logg direkt efter skrivning\n"
+
+#: pg_receivewal.c:93
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr " -Z, --compress=0-9 komprimera loggar med angiven komprimeringsnivå\n"
+
+#: pg_receivewal.c:102
+#, c-format
+msgid ""
+"\n"
+"Optional actions:\n"
+msgstr ""
+"\n"
+"Valfria handlingar:\n"
+
+#: pg_receivewal.c:103 pg_recvlogical.c:78
+#, c-format
+msgid " --create-slot create a new replication slot (for the slot's name see --slot)\n"
+msgstr " --create-slot skapa en ny replikeringsslot (angående slot:ens namn, se --slot)\n"
+
+#: pg_receivewal.c:104 pg_recvlogical.c:79
+#, c-format
+msgid " --drop-slot drop the replication slot (for the slot's name see --slot)\n"
+msgstr " --drop-slot släng replikeringsslot (angående slot:ens namn, se --slot)\n"
+
+#: pg_receivewal.c:117
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "slutförde segment vid %X/%X (tidslinje %u)"
+
+#: pg_receivewal.c:124
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "stoppade logg-strömning vid %X/%X (tidslinje %u)"
+
+#: pg_receivewal.c:140
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "bytte till tidslinje %u vid %X/%X"
+
+#: pg_receivewal.c:150
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "mottog avbrottsignal, avslutar"
+
+#: pg_receivewal.c:186
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "kunde inte stänga katalog \"%s\": %m"
+
+#: pg_receivewal.c:272
+#, c-format
+msgid "segment file \"%s\" has incorrect size %lld, skipping"
+msgstr "segmentfil \"%s\" har inkorrekt storlek %lld, hoppar över"
+
+#: pg_receivewal.c:290
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "kunde inte öppna komprimerad fil \"%s\": %m"
+
+#: pg_receivewal.c:296
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "kunde inte söka i komprimerad fil \"%s\": %m"
+
+#: pg_receivewal.c:304
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "kunde inte läsa komprimerad fil \"%s\": %m"
+
+#: pg_receivewal.c:307
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "kunde inte läsa komprimerad fil \"%s\": läste %d av %zu"
+
+#: pg_receivewal.c:318
+#, c-format
+msgid "compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr "komprimerad segmentfil \"%s\" har inkorrekt okomprimerad storlek %d, hoppar över"
+
+#: pg_receivewal.c:422
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "startar logg-strömning vid %X/%X (tidslinje %u)"
+
+#: pg_receivewal.c:537 pg_recvlogical.c:761
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "ogiltigt portnummer \"%s\""
+
+#: pg_receivewal.c:565 pg_recvlogical.c:787
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "kunde inte parsa slutposition \"%s\""
+
+#: pg_receivewal.c:625
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "kan inte använda --create-slot tillsammans med --drop-slot"
+
+#: pg_receivewal.c:643
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "kan inte använda --synchronous tillsammans med --no-sync"
+
+#: pg_receivewal.c:723
+#, c-format
+msgid "replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr "replikeringsanslutning som använder slot \"%s\" är oväntat databasspecifik"
+
+#: pg_receivewal.c:734 pg_recvlogical.c:968
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "slänger replikeringsslot \"%s\""
+
+#: pg_receivewal.c:745 pg_recvlogical.c:978
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "skapar replikeringsslot \"%s\""
+
+#: pg_receivewal.c:771 pg_recvlogical.c:1003
+#, c-format
+msgid "disconnected"
+msgstr "nerkopplad"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:777 pg_recvlogical.c:1009
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "nerkopplad; väntar %d sekunder för att försöka igen"
+
+#: pg_recvlogical.c:73
+#, c-format
+msgid ""
+"%s controls PostgreSQL logical decoding streams.\n"
+"\n"
+msgstr ""
+"%s styr PostgreSQL:s logiskt avkodade strömmar.\n"
+"\n"
+
+#: pg_recvlogical.c:77
+#, c-format
+msgid ""
+"\n"
+"Action to be performed:\n"
+msgstr ""
+"\n"
+"Handling att utföra:\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid " --start start streaming in a replication slot (for the slot's name see --slot)\n"
+msgstr " --start starta strömning i en replikeringsslot (angående slot:ens namn, se --slot)\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr " -f, --file=FIL ta emot logg till denna fil, - för stdout\n"
+
+#: pg_recvlogical.c:84
+#, c-format
+msgid ""
+" -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: %d)\n"
+msgstr ""
+" -F --fsync-interval=SEK\n"
+" tid mellan fsync av utdatafil (standard: %d)\n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid " -I, --startpos=LSN where in an existing slot should the streaming start\n"
+msgstr " -I, --startpos=LSN var i en existerande slot skall strömningen starta\n"
+
+#: pg_recvlogical.c:89
+#, c-format
+msgid ""
+" -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr ""
+" -o, --option=NAMN[=VÄRDE]\n"
+" skicka vidare flaggan NAMN med ev. värde VÄRDE till\n"
+" utmatnings-plugin:en\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr " -P, --plugin=PLUGIN använd utmatnings-plugin:en PLUGIN (standard: %s)\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=SLOTNAMN namn på den logiska replikerings-slotten\n"
+
+#: pg_recvlogical.c:100
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=DBNAMN databas att ansluta till\n"
+
+#: pg_recvlogical.c:133
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "bekräftar skrivning fram till %X/%X, flush till %X/%X (slot %s)"
+
+#: pg_recvlogical.c:157 receivelog.c:356
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "kunde inte skicka feedback-paket: %s"
+
+#: pg_recvlogical.c:228
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "startar logg-strömning vid %X/%X (slot %s)"
+
+#: pg_recvlogical.c:270
+#, c-format
+msgid "streaming initiated"
+msgstr "strömning initierad"
+
+#: pg_recvlogical.c:334
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "kunde inte öppna loggfil \"%s\": %m"
+
+#: pg_recvlogical.c:360 receivelog.c:886
+#, c-format
+msgid "invalid socket: %s"
+msgstr "ogiltigt uttag: %s"
+
+#: pg_recvlogical.c:413 receivelog.c:914
+#, c-format
+msgid "%s() failed: %m"
+msgstr "%s() misslyckades: %m"
+
+#: pg_recvlogical.c:420 receivelog.c:964
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "kunde inte ta emot data från WAL-ström: %s"
+
+#: pg_recvlogical.c:462 pg_recvlogical.c:513 receivelog.c:1008
+#: receivelog.c:1074
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "strömningsheader för liten: %d"
+
+#: pg_recvlogical.c:497 receivelog.c:846
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "okänd strömningsheader: \"%c\""
+
+#: pg_recvlogical.c:551 pg_recvlogical.c:563
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "kunde inte skriva %u byte till loggfil \"%s\": %m"
+
+#: pg_recvlogical.c:617 receivelog.c:642 receivelog.c:679
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "oväntad terminering av replikeringsström: %s"
+
+#: pg_recvlogical.c:741
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "ogiltigt fsync-intervall \"%s\""
+
+#: pg_recvlogical.c:779
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "kunde inte parsa startposition \"%s\""
+
+#: pg_recvlogical.c:868
+#, c-format
+msgid "no slot specified"
+msgstr "ingen slot angiven"
+
+#: pg_recvlogical.c:876
+#, c-format
+msgid "no target file specified"
+msgstr "ingen målfil angiven"
+
+#: pg_recvlogical.c:884
+#, c-format
+msgid "no database specified"
+msgstr "ingen databas angiven"
+
+#: pg_recvlogical.c:892
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "minst en handling måste anges"
+
+#: pg_recvlogical.c:900
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr "kan inte använda --create-slot eller --start tillsammans med --drop-slot"
+
+#: pg_recvlogical.c:908
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr "kan inte använda --create-slot eller --drop-slot tillsammans med --startpos"
+
+#: pg_recvlogical.c:916
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "--endpos får bara anges tillsammans med --start"
+
+#: pg_recvlogical.c:950
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr "kunde inte upprätta databasspecifik replikeringsanslutning"
+
+#: pg_recvlogical.c:1049
+#, c-format
+msgid "end position %X/%X reached by keepalive"
+msgstr "slutposition %X/%X nådd av keepalive"
+
+#: pg_recvlogical.c:1052
+#, c-format
+msgid "end position %X/%X reached by WAL record at %X/%X"
+msgstr "slutposition %X/%X nådd av WAL-post vid %X/%X"
+
+#: receivelog.c:68
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "kunde inte skapa arkiveringsstatusfil \"%s\": %s"
+
+#: receivelog.c:75
+#, c-format
+msgid "could not close archive status file \"%s\": %s"
+msgstr "kunde inte stänga arkiveringsstatusfil \"%s\": %s"
+
+#: receivelog.c:123
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "kunde inte hämta storleken på write-ahead-logg-fil \"%s\": %s"
+
+#: receivelog.c:134
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "kunde inte öppna existerande write-ahead-logg-fil \"%s\": %s"
+
+#: receivelog.c:143
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr "kunde inte fsync:a befintlig write-ahead-logg-fil \"%s\": %s"
+
+#: receivelog.c:158
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] "write-ahead-logg-fil \"%s\" har %d byte, skall vara 0 eller %d"
+msgstr[1] "write-ahead-logg-fil \"%s\" har %d byte, skall vara 0 eller %d"
+
+#: receivelog.c:174
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "kunde inte öppna write-ahead-logg-fil \"%s\": %s"
+
+#: receivelog.c:202
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "kunde inte fastställa sökposition i fil \"%s\": %s"
+
+#: receivelog.c:216
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "byter inte namn på \"%s%s\", segmentet är inte komplett"
+
+#: receivelog.c:228 receivelog.c:313 receivelog.c:688
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "kunde inte stänga fil \"%s\": %s"
+
+#: receivelog.c:285
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "servern rapporterade oväntat historikfilnamn för tidslinje %u: %s"
+
+#: receivelog.c:293
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "kunde inte skapa tidslinjehistorikfil \"%s\": %s"
+
+#: receivelog.c:300
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "kunde inte skriva tidslinjehistorikfil \"%s\": %s"
+
+#: receivelog.c:390
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions older than %s"
+msgstr "inkompatibel serverversion %s; klienten stöder inte stömning från serverversioner äldre än %s"
+
+#: receivelog.c:399
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions newer than %s"
+msgstr "inkompatibel serverversion %s; klienten stöder inte stömning från serverversioner nyare än %s"
+
+#: receivelog.c:501 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid "could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "kunde inte identifiera system: fick %d rader och %d fält, förväntade %d rader och %d eller fler fält"
+
+#: receivelog.c:508
+#, c-format
+msgid "system identifier does not match between base backup and streaming connection"
+msgstr "systemidentifieraren matchar inte mellan basbackup och strömningsanslutning"
+
+#: receivelog.c:514
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "starttidslinje %u finns inte tillgänglig i servern"
+
+#: receivelog.c:555
+#, c-format
+msgid "unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "oväntat svar på TIMELINE_HISTORY-kommando: fick %d rader och %d fält, förväntade %d rader och %d fält"
+
+#: receivelog.c:626
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "servern rapporterade oväntad nästa tidslinje %u, följer på tidslinje %u"
+
+#: receivelog.c:632
+#, c-format
+msgid "server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"
+msgstr "servern stoppade strömning av tidslinje %u vid %X/%X men rapporterade nästa tidslinje %u skulle börja vid %X/%X"
+
+#: receivelog.c:672
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "replikeringsström avslutades innan stoppunkt"
+
+#: receivelog.c:718
+#, c-format
+msgid "unexpected result set after end-of-timeline: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "oväntad resultatmängd efter slut-på-tidslinje: fick %d rader och %d fält, förväntade %d rader och %d fält"
+
+#: receivelog.c:727
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "kunde inte parsa nästa tidslinjens startpunkt \"%s\""
+
+#: receivelog.c:776 receivelog.c:1028 walmethods.c:994
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "kunde inte fsync:a fil \"%s\": %s"
+
+#: receivelog.c:1091
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "tog emot write-ahead-logg-post för offset %u utan att ha någon öppen fil"
+
+#: receivelog.c:1101
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "fick WAL-data-offset %08x, förväntade %08x"
+
+#: receivelog.c:1135
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "kunde inte skriva %u byte till WAL-fil \"%s\": %s"
+
+#: receivelog.c:1160 receivelog.c:1200 receivelog.c:1230
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "kunde inte skicka \"copy-end\"-paket: %s"
+
+#: streamutil.c:162
+msgid "Password: "
+msgstr "Lösenord: "
+
+#: streamutil.c:186
+#, c-format
+msgid "could not connect to server"
+msgstr "kunde inte ansluta till server"
+
+#: streamutil.c:231
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "kunde inte nollställa search_path: %s"
+
+#: streamutil.c:247
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "kunde inte lista ut serverns inställning för integer_datetimes"
+
+#: streamutil.c:254
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "kompileringsflaggan integer_datetimes matchar inte servern"
+
+#: streamutil.c:305
+#, c-format
+msgid "could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "kunde inte hämta WAL-segmentstorlek: fick %d rader och %d fält, förväntade %d rader och %d eller fler fält"
+
+#: streamutil.c:315
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "WAL-segment-storlek kunde inte parsas"
+
+#: streamutil.c:333
+#, c-format
+msgid "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"
+msgid_plural "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"
+msgstr[0] "WAL-segmentstorlek måste vara en tvåpotens mellan 1MB och 1GB men fjärrservern rapporterade värdet %d byte"
+msgstr[1] "WAL-segmentstorlek måste vara en tvåpotens mellan 1MB och 1GB men fjärrservern rapporterade värdet %d byte"
+
+#: streamutil.c:378
+#, c-format
+msgid "could not fetch group access flag: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "kunde inte hämta gruppaccessflagga: fick %d rader och %d fält, förväntade %d rader och %d eller fler fält"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "gruppaccessflagga kunde inte parsas: %s"
+
+#: streamutil.c:544
+#, c-format
+msgid "could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "kunde inte skapa replikeringsslot \"%s\": fick %d rader och %d fält, förväntade %d rader och %d fält"
+
+#: streamutil.c:588
+#, c-format
+msgid "could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "kunde inte slänga replikeringsslot \"%s\": fick %d rader och %d fält, förväntade %d rader och %d fält"
+
+#: walmethods.c:521 walmethods.c:1057
+msgid "could not compress data"
+msgstr "kunde inte komprimera data"
+
+#: walmethods.c:550
+msgid "could not reset compression stream"
+msgstr "kunde inte nollställa komprimeringsström"
+
+#: walmethods.c:670
+msgid "could not initialize compression library"
+msgstr "kunde inte initierar komprimeringsbibliotek"
+
+#: walmethods.c:681
+msgid "implementation error: tar files can't have more than one open file"
+msgstr "implementationsfel: tar-filer kan inte ha mer än en öppen fil"
+
+#: walmethods.c:695
+msgid "could not create tar header"
+msgstr "kunde inte skapa tar-header"
+
+#: walmethods.c:711 walmethods.c:751 walmethods.c:965 walmethods.c:977
+msgid "could not change compression parameters"
+msgstr "kunde inte ändra komprimeringsparametrar"
+
+#: walmethods.c:850
+msgid "unlink not supported with compression"
+msgstr "unlink stöds inte med komprimering"
+
+#: walmethods.c:1081
+msgid "could not close compression stream"
+msgstr "kunde inte stänga komprimeringsström"
+
+#~ msgid "--no-manifest and --manifest-checksums are incompatible options"
+#~ msgstr "--no-manifest och --manifest-checksums är inkompatibla flaggor"
+
+#~ msgid "--no-manifest and --manifest-force-encode are incompatible options"
+#~ msgstr "--no-manifest och --manifest-force-encode är inkompatibla flaggor"
+
+#~ msgid "--progress and --no-estimate-size are incompatible options"
+#~ msgstr "--progress och --no-estimate-size är inkompatibla flaggor"
+
+#~ msgid "backup manifests are not supported by server version %s"
+#~ msgstr "backupmanifest stöds inte av serverversion %s"
+
+#~ msgid "could not connect to server: %s"
+#~ msgstr "kunde inte ansluta till server: %s"
+
+#~ msgid "select() failed: %m"
+#~ msgstr "select() misslyckades: %m"
diff --git a/src/bin/pg_basebackup/po/tr.po b/src/bin/pg_basebackup/po/tr.po
new file mode 100644
index 0000000..92e0513
--- /dev/null
+++ b/src/bin/pg_basebackup/po/tr.po
@@ -0,0 +1,1535 @@
+# LANGUAGE message translation file for pg_basebackup
+# Copyright (C) 2011 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.2\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2019-04-26 13:46+0000\n"
+"PO-Revision-Date: 2019-05-28 13:56+0300\n"
+"Last-Translator: Abdullah G. GÜLNER <agulner@gmail.com>\n"
+"Language-Team: Turkish <ceviri@postgresql.org.tr>\n"
+"Language: tr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.8.7.1\n"
+
+#: ../../../src/fe_utils/logging.c:182
+#, c-format
+msgid "fatal: "
+msgstr "ölümcül (fatal): "
+
+#: ../../../src/fe_utils/logging.c:189
+#, c-format
+msgid "error: "
+msgstr "hata: "
+
+#: ../../../src/fe_utils/logging.c:196
+#, c-format
+msgid "warning: "
+msgstr "uyarı: "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98
+#, c-format
+msgid "out of memory\n"
+msgstr "bellek yetersiz\n"
+
+#: ../../common/fe_memutils.c:92
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "null pointer duplicate edilemiyor (iç hata)\n"
+
+#: ../../common/file_utils.c:81 ../../common/file_utils.c:183
+#: pg_receivewal.c:267 pg_recvlogical.c:342
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "\"%s\" dosyası durumlanamadı: %m"
+
+#: ../../common/file_utils.c:160 pg_receivewal.c:170
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "\"%s\" dizini açılamıyor: %m"
+
+#: ../../common/file_utils.c:194 pg_receivewal.c:338
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "\"%s\" dizini okunamıyor: %m"
+
+#: ../../common/file_utils.c:226 ../../common/file_utils.c:285
+#: ../../common/file_utils.c:359 pg_basebackup.c:1761
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "\"%s\" dosyası açılamıyor: %m"
+
+#: ../../common/file_utils.c:297 ../../common/file_utils.c:367
+#: pg_recvlogical.c:195
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "\"%s\" dosyası fsync hatası: %m"
+
+#: ../../common/file_utils.c:377
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "\"%s\" -- \"%s\" ad değiştirme hatası: %m"
+
+#: pg_basebackup.c:171
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "\"%s\" veri dizini siliniyor"
+
+#: pg_basebackup.c:173
+#, c-format
+msgid "failed to remove data directory"
+msgstr "veri dizini silme başarısız"
+
+#: pg_basebackup.c:177
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "\"%s\" veri dizininin içindekiler siliniyor"
+
+#: pg_basebackup.c:179
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "veri dizininin içindekileri silme işlemi başarısız"
+
+#: pg_basebackup.c:184
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "\"%s\" WAL dizini siliniyor"
+
+#: pg_basebackup.c:186
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "WAL dizini silme başarısız"
+
+#: pg_basebackup.c:190
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "\"%s\" WAL dizininin içindekiler siliniyor"
+
+#: pg_basebackup.c:192
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "WAL dizininin içindekileri silme işlemi başarısız"
+
+#: pg_basebackup.c:198
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "\"%s\" veri dizini kullanıcının isteği üzerine silinmedi"
+
+#: pg_basebackup.c:201
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "\"%s\" WAL dizini kullanıcının isteği üzerine silinmedi"
+
+#: pg_basebackup.c:205
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "tablespace dzinlerine yapılacak değişiklikler geri alınamayacak"
+
+#: pg_basebackup.c:246
+#, c-format
+msgid "directory name too long"
+msgstr "dizin adı çok uzun"
+
+#: pg_basebackup.c:256
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "tablespace eşleştirmesinde birden fazla \"=\" işareti"
+
+#: pg_basebackup.c:268
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr "geçersiz tablespace eşleştirme biçimi \"%s\", \"ESKIDIZIN=YENIDIZIN\" olmalı"
+
+#: pg_basebackup.c:280
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr "tablespace eşleştirmesinde eski dizin mutlak bir yol değil: %s"
+
+#: pg_basebackup.c:287
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr "tablespace eşleştirmesinde yeni dizin mutlak bir yol değil: %s"
+
+#: pg_basebackup.c:326
+#, c-format
+msgid ""
+"%s takes a base backup of a running PostgreSQL server.\n"
+"\n"
+msgstr ""
+"%s çalışan bir PostgreSQL sunucusunun temel yedeğini (base backup) alır. \n"
+"\n"
+
+#: pg_basebackup.c:328 pg_receivewal.c:81 pg_recvlogical.c:78
+#, c-format
+msgid "Usage:\n"
+msgstr "Kullanımı:\n"
+
+#: pg_basebackup.c:329 pg_receivewal.c:82 pg_recvlogical.c:79
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s [SEÇENEK]...\n"
+
+#: pg_basebackup.c:330
+#, c-format
+msgid ""
+"\n"
+"Options controlling the output:\n"
+msgstr ""
+"\n"
+"Çıktıyı kontrol eden seçenekler: \n"
+
+#: pg_basebackup.c:331
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, --pgdata=DİZİN temel yedeğin alınacağı dizin\n"
+
+#: pg_basebackup.c:332
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr " -F, --format=p|t çıktı formatı (düz metin(varsayılan), tar)\n"
+
+#: pg_basebackup.c:333
+#, c-format
+msgid ""
+" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr ""
+" -r, --max-rate=HIZ very dizinini aktarma için azami transfer hızı\n"
+" ( kB/s olarak , veya \"k\" ya da \"M\" sonekini kullanın)\n"
+
+#: pg_basebackup.c:335
+#, c-format
+msgid ""
+" -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr ""
+" -R, --write-recovery-conf\n"
+" replikasyon için yapılandırmayı yaz\n"
+
+#: pg_basebackup.c:337
+#, c-format
+msgid ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" eski dizindeki tablespace yerini NEWDIR yeni dizin olarak değiştir \n"
+
+#: pg_basebackup.c:339
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr " --waldir=WALDIR write-ahead log dizini\n"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid ""
+" -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr ""
+" -X, --wal-method=none|fetch|stream\n"
+" gerekli WAL dosyalarını belirtilen yöntemle dahil et\n"
+
+#: pg_basebackup.c:342
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr ""
+" -z, --gzip tar çıktısını sıkıştır\n"
+"\n"
+
+#: pg_basebackup.c:343
+#, c-format
+msgid " -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr " -Z, --compress=0-9 tar çıktısını belirtilen sıkıştırma seviyesinde sıkıştır\n"
+
+#: pg_basebackup.c:344
+#, c-format
+msgid ""
+"\n"
+"General options:\n"
+msgstr ""
+"\n"
+"Genel seçenekler:\n"
+
+#: pg_basebackup.c:345
+#, c-format
+msgid ""
+" -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr ""
+" -c, --checkpoint=fast|spread\n"
+" checkpoint işlemini fast ya da spread olarak ayarla\n"
+
+#: pg_basebackup.c:347
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " -C, --create-slot replikasyon slotu oluştur\n"
+
+#: pg_basebackup.c:348
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=ETİKET yedek etiketini ayarla\n"
+
+#: pg_basebackup.c:349
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --no-clean hatalardan sonar temizlik yapma\n"
+
+#: pg_basebackup.c:350
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync değişikliklerin diske yazılmasını bekleme\n"
+
+#: pg_basebackup.c:351
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress ilerleme bilgisini göster\n"
+
+#: pg_basebackup.c:352 pg_receivewal.c:91
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=SLOTADI kullanılacak replikasyon slotu\n"
+
+#: pg_basebackup.c:353 pg_receivewal.c:93 pg_recvlogical.c:99
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose detaylı (verbose) mesajlar göster\n"
+
+#: pg_basebackup.c:354 pg_receivewal.c:94 pg_recvlogical.c:100
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version sürüm bilgisini göster, sonra çık\n"
+
+#: pg_basebackup.c:355
+#, c-format
+msgid " --no-slot prevent creation of temporary replication slot\n"
+msgstr " --no-slot geçici replikasyon slotlarının oluşturulmasını engelle\n"
+
+#: pg_basebackup.c:356
+#, c-format
+msgid ""
+" --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr ""
+" --no-verify-checksums\n"
+" sağlamaları (checksum) doğrulama\n"
+
+#: pg_basebackup.c:358 pg_receivewal.c:96 pg_recvlogical.c:101
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help bu yardımı göster, sonra çık\n"
+
+#: pg_basebackup.c:359 pg_receivewal.c:97 pg_recvlogical.c:102
+#, c-format
+msgid ""
+"\n"
+"Connection options:\n"
+msgstr ""
+"\n"
+"Bağlantı Seçenekleri:\n"
+
+#: pg_basebackup.c:360 pg_receivewal.c:98
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=CONNSTR bağlantı dizesi\n"
+
+#: pg_basebackup.c:361 pg_receivewal.c:99 pg_recvlogical.c:104
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr " -h, --host=HOSTNAME veritabanı sunucusu adresi ya da soket dizini\n"
+
+#: pg_basebackup.c:362 pg_receivewal.c:100 pg_recvlogical.c:105
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=PORT veritabanı sunucusunun port numarası\n"
+
+#: pg_basebackup.c:363
+#, c-format
+msgid ""
+" -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in seconds)\n"
+msgstr ""
+" -s, --status-interval=SURE\n"
+" sunucuya yollanan durum paketleri arasındaki süre (saniye)\n"
+
+#: pg_basebackup.c:365 pg_receivewal.c:101 pg_recvlogical.c:106
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr " -U, --username=KULLANICI_ADI bağlanılacak kullanıcı adı\n"
+
+#: pg_basebackup.c:366 pg_receivewal.c:102 pg_recvlogical.c:107
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password bağlanmak için parola sorma\n"
+
+#: pg_basebackup.c:367 pg_receivewal.c:103 pg_recvlogical.c:108
+#, c-format
+msgid " -W, --password force password prompt (should happen automatically)\n"
+msgstr " -W, --password şifre sor (otomatik olarak her zaman açık)\n"
+
+#: pg_basebackup.c:368 pg_receivewal.c:107 pg_recvlogical.c:109
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+msgstr ""
+"\n"
+"Hataları <pgsql-bugs@lists.postgresql.org> adresine bildirebilirsiniz.\n"
+
+#: pg_basebackup.c:411
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "ready pipe'tan okunamadı: %m"
+
+#: pg_basebackup.c:417 pg_basebackup.c:545 pg_basebackup.c:2099
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "\"%s\" write-ahead log konumu ayrıştırılamadı"
+
+#: pg_basebackup.c:510 pg_receivewal.c:442
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "WAL dosyalarının yazılması bitirilemedi: %m"
+
+#: pg_basebackup.c:557
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "artalan süreçleri için pipe oluşturulamadı: %m"
+
+#: pg_basebackup.c:592
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "geçici replikasyon slotu \"%s\" oluşturuldu"
+
+#: pg_basebackup.c:595
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "replikasyon slotu \"%s\" oluşturuldu"
+
+#: pg_basebackup.c:615 pg_basebackup.c:668 pg_basebackup.c:1503
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "\"%s\" dizini oluşturulamadı: %m"
+
+#: pg_basebackup.c:633
+#, c-format
+msgid "could not create background process: %m"
+msgstr "artalan süreci oluşturulamadı: %m"
+
+#: pg_basebackup.c:645
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "artalan iş parçacığı (thread) oluşturulamadı: %m"
+
+#: pg_basebackup.c:689
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "\"%s\" dizini mevcut, ama boş değil"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "\"%s\" dizine erişim hatası: %m"
+
+#: pg_basebackup.c:757
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s kB (100%%), %d/%d tablespace %*s"
+
+#: pg_basebackup.c:769
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+
+#: pg_basebackup.c:785
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d tablespace"
+
+#: pg_basebackup.c:809
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "\"%s\" aktarım hızı geçerli bir değer değil"
+
+#: pg_basebackup.c:814
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "geçersiz aktarım hızı \"%s\": %m"
+
+#: pg_basebackup.c:823
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "aktarım hızı sıfırdan büyük ya da eşit olmalı"
+
+#: pg_basebackup.c:855
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "geçersiz --max-rate (azami hız) birimi: \"%s\""
+
+#: pg_basebackup.c:862
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "\"%s\" aktarım hızı tamsayı aralığını aşıyor"
+
+#: pg_basebackup.c:872
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "\"%s\" aktarım hızı aralık dışındadır"
+
+#: pg_basebackup.c:894
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "\"%s\" sıkıştırılmış dosyasına yazılamadı: %s"
+
+#: pg_basebackup.c:904 pg_basebackup.c:1592 pg_basebackup.c:1767
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "\"%s\" dosyası yazma hatası: %m"
+
+#: pg_basebackup.c:969 pg_basebackup.c:989 pg_basebackup.c:1016
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "%d sıkıştırma seviyesi ayarlanamadı: %s"
+
+#: pg_basebackup.c:1036
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "\"%s\" sıkıştırılmış dosyası yaratılamadı: %s"
+
+#: pg_basebackup.c:1047 pg_basebackup.c:1553 pg_basebackup.c:1779
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "\"%s\" dosyası oluşturulamıyor: %m"
+
+#: pg_basebackup.c:1058 pg_basebackup.c:1412
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "COPY veri akımı (stream) alınamadı: %s"
+
+#: pg_basebackup.c:1143
+#, c-format
+msgid "could not close compressed file \"%s\": %s"
+msgstr "\"%s\" sıkıştırılmış dosyası kapatılamadı: %s"
+
+#: pg_basebackup.c:1155 pg_recvlogical.c:608
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "\"%s\" dosyası kapatılamıyor: %m"
+
+#: pg_basebackup.c:1166 pg_basebackup.c:1441 pg_recvlogical.c:437
+#: receivelog.c:968
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "COPY verisi okunamadı: %s"
+
+#: pg_basebackup.c:1455
+#, c-format
+msgid "invalid tar block header size: %d"
+msgstr "geçersiz tar blok başlık boyutu: %d"
+
+#: pg_basebackup.c:1510
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "dizin \"%s\" için erişim hakları ayarlanamadı: %m"
+
+#: pg_basebackup.c:1533
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "\"%s\" dosyasından \"%s\" dosyasına sembolik bağlantı oluşturulamadı: %m"
+
+#: pg_basebackup.c:1540
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "tanımlanamayan bağlantı göstergesi \"%c\""
+
+#: pg_basebackup.c:1559
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "\"%s\" dosyasının erişim hakları atanamıyor: %m"
+
+#: pg_basebackup.c:1616
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "COPY akımı (stream) son dosya tamamlanmadan sona erdi"
+
+#: pg_basebackup.c:1643 pg_basebackup.c:1663 pg_basebackup.c:1677
+#: pg_basebackup.c:1728
+#, c-format
+msgid "out of memory"
+msgstr "yetersiz bellek"
+
+#: pg_basebackup.c:1820
+#, c-format
+msgid "incompatible server version %s"
+msgstr "uyumsuz sunucu sürümü %s"
+
+#: pg_basebackup.c:1835
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr "İPUCU: log akışını (streaming) devre dışı bırakmak için -X none veya -X fetch kullanın"
+
+#: pg_basebackup.c:1860
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr "yedekleme (base backup) başlatılıyor, checkpoint işleminin tamamlanması bekleniyor"
+
+#: pg_basebackup.c:1884 pg_recvlogical.c:264 receivelog.c:484 receivelog.c:533
+#: receivelog.c:572 streamutil.c:299 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "\"%s\" replikasyon komutu gönderilemedi: %s"
+
+#: pg_basebackup.c:1895
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "yedek (base backup) başlatılamadı: %s"
+
+#: pg_basebackup.c:1901
+#, c-format
+msgid "server returned unexpected response to BASE_BACKUP command; got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "sunucu BASE_BACKUP komutuna beklenmedik cevap döndü; %d satır ve %d alan alındı, %d satır ve %d alan bekleniyordu"
+
+#: pg_basebackup.c:1909
+#, c-format
+msgid "checkpoint completed"
+msgstr "checkpoint tamamlandı"
+
+#: pg_basebackup.c:1924
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "write-ahead log başlama noktası: %2$u zaman çizelgesinde %1$s"
+
+#: pg_basebackup.c:1933
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "yedek başlığı alınamadı: %s"
+
+#: pg_basebackup.c:1939
+#, c-format
+msgid "no data returned from server"
+msgstr "sunucudan veri dönmedi"
+
+#: pg_basebackup.c:1970
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr "stdout'a sadece bir tablespace yazılabilir, veritabanında %d var"
+
+#: pg_basebackup.c:1982
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "artalan WAL alıcısı başlatılıyor"
+
+#: pg_basebackup.c:2012
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr "sunucudan write-ahead log bitiş pozisyonu alınamadı: %s"
+
+#: pg_basebackup.c:2018
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "sunucudan write-ahead log bitiş pozisyonu dönmedi"
+
+#: pg_basebackup.c:2023
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "write-ahead log bitiş noktası (end point): %s"
+
+#: pg_basebackup.c:2034
+#, c-format
+msgid "checksum error occurred"
+msgstr "sağlama (checksum) hatası oluştu"
+
+#: pg_basebackup.c:2039
+#, c-format
+msgid "final receive failed: %s"
+msgstr "son alma işlemi başarısız oldu: %s"
+
+#: pg_basebackup.c:2063
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "artalan sürecinin akımı (streaming) bitirmesi bekleniyor ..."
+
+#: pg_basebackup.c:2068
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "artalan pipe'ına komut gönderilemedi: %m"
+
+#: pg_basebackup.c:2076
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "alt süreç için beklenemedi: %m"
+
+#: pg_basebackup.c:2081
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "alt süreç %d sonlandı, beklenen %d"
+
+#: pg_basebackup.c:2086 streamutil.c:94
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2111
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "alt iş parçacığı (thread) için beklenemedi: %m"
+
+#: pg_basebackup.c:2117
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "alt iş parçacığı (thread) bitiş durumu alınamadı %m"
+
+#: pg_basebackup.c:2122
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "alt iş parçacığı (thread) %u hata kodu ile sonlandı"
+
+#: pg_basebackup.c:2150
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "veri diske yazılıyor (syncing) ... "
+
+#: pg_basebackup.c:2163
+#, c-format
+msgid "base backup completed"
+msgstr "temel (base) yedek tamamlandı"
+
+#: pg_basebackup.c:2244
+#, c-format
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\"\n"
+msgstr "geçersiz çıktı biçimi \"%s\", \"plain\" ya da \"tar\" olmalı\n"
+
+#: pg_basebackup.c:2288
+#, c-format
+msgid "invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr "geçersiz wal-yöntemi seçeneği \"%s\", \"fetch\", \"stream\" ya da \"none\" olmalı"
+
+#: pg_basebackup.c:2316
+#, c-format
+msgid "invalid compression level \"%s\"\n"
+msgstr "geçersiz sıkıştırma seviyesi \"%s\"\n"
+
+#: pg_basebackup.c:2327
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr "geçersiz checkpoint argümanı \"%s\", \"fast\" ya da \"spread\" olmalı"
+
+#: pg_basebackup.c:2354 pg_receivewal.c:556 pg_recvlogical.c:796
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "geçersiz durum aralığı \"%s\""
+
+#: pg_basebackup.c:2372 pg_basebackup.c:2385 pg_basebackup.c:2396
+#: pg_basebackup.c:2407 pg_basebackup.c:2415 pg_basebackup.c:2423
+#: pg_basebackup.c:2433 pg_basebackup.c:2446 pg_basebackup.c:2454
+#: pg_basebackup.c:2465 pg_basebackup.c:2475 pg_receivewal.c:606
+#: pg_receivewal.c:619 pg_receivewal.c:627 pg_receivewal.c:637
+#: pg_receivewal.c:645 pg_receivewal.c:656 pg_recvlogical.c:822
+#: pg_recvlogical.c:835 pg_recvlogical.c:846 pg_recvlogical.c:854
+#: pg_recvlogical.c:862 pg_recvlogical.c:870 pg_recvlogical.c:878
+#: pg_recvlogical.c:886 pg_recvlogical.c:894
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Ayrıntılı bilgi için \"%s --help\" komutunu deneyebilirsiniz.\n"
+
+#: pg_basebackup.c:2383 pg_receivewal.c:617 pg_recvlogical.c:833
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "çok fazla komut satırı girdisi var (ilki \"%s\")"
+
+#: pg_basebackup.c:2395 pg_receivewal.c:655
+#, c-format
+msgid "no target directory specified"
+msgstr "hedef dizin belirtilmedi"
+
+#: pg_basebackup.c:2406
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "sadece tar mod yedekleri sıkıştırılabilir"
+
+#: pg_basebackup.c:2414
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "tar modunda write-ahead logları stdout'a stream edilemiyor"
+
+#: pg_basebackup.c:2422
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "replikasyon slotları sadece WAL streaming ile kullanılabilir"
+
+#: pg_basebackup.c:2432
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "--no-slot slot adıyla birlikte kullanılamaz"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2444 pg_receivewal.c:635
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "%s bir slotun --slot kullanılarak tanımlanmasını gerektirir"
+
+#: pg_basebackup.c:2453
+#, c-format
+msgid "--create-slot and --no-slot are incompatible options"
+msgstr "--create-slot ve --no-slot uyumsuz seçeneklerdir"
+
+#: pg_basebackup.c:2464
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "WAL dizini lokasyonu sadece plain modunda belitrilebilir"
+
+#: pg_basebackup.c:2474
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "WAL dizini mutlak bir yol olmalıdır"
+
+#: pg_basebackup.c:2484 pg_receivewal.c:664
+#, c-format
+msgid "this build does not support compression"
+msgstr "bu kurulum sıkıştırmayı desteklemiyor"
+
+#: pg_basebackup.c:2538
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "symbolic link \"%s\" oluşturma hatası: %m"
+
+#: pg_basebackup.c:2542
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "bu platformda sembolik bağlantı (symlink) desteklenmemektedir"
+
+#: pg_receivewal.c:79
+#, c-format
+msgid ""
+"%s receives PostgreSQL streaming write-ahead logs.\n"
+"\n"
+msgstr ""
+"%s stream eden PostgreSQL write-ahead loglarını alır.\n"
+"\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:84
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"Seçenekler:\n"
+
+#: pg_receivewal.c:84
+#, c-format
+msgid " -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr " -D, --directory=DIZIN write-ahead logları bu dizine al\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:85
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr ""
+" -E, --endpos=LSN belirtilen LSN alındıktan sonra çık\n"
+"\n"
+
+#: pg_receivewal.c:86 pg_recvlogical.c:89
+#, c-format
+msgid " --if-not-exists do not error if slot already exists when creating a slot\n"
+msgstr " --if-not-exists zaten mevcut olan bir slot oluşturulmaya çalışıldığında hata verme\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:91
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop bağlantı sunucusunda loop yapma\n"
+
+#: pg_receivewal.c:88
+#, c-format
+msgid " --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " --no-sync değişikliklerin diske yazılmasını bekleme\n"
+
+#: pg_receivewal.c:89 pg_recvlogical.c:96
+#, c-format
+msgid ""
+" -s, --status-interval=SECS\n"
+" time between status packets sent to server (default: %d)\n"
+msgstr ""
+" -s, --status-interval=SECS\n"
+" sunucuya yollanan durum paketleri arasındaki süre (varsayılan: %d)\n"
+
+#: pg_receivewal.c:92
+#, c-format
+msgid " --synchronous flush write-ahead log immediately after writing\n"
+msgstr " --synchronous write-ahead logu yazıldıktan hemen sonra temizle\n"
+
+#: pg_receivewal.c:95
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr " -Z, --compress=0-9 logları belirtilen sıkıştırma seviyesinde sıkıştır\n"
+
+#: pg_receivewal.c:104
+#, c-format
+msgid ""
+"\n"
+"Optional actions:\n"
+msgstr ""
+"\n"
+"Opsiyonel eylemler:\n"
+
+#: pg_receivewal.c:105 pg_recvlogical.c:81
+#, c-format
+msgid " --create-slot create a new replication slot (for the slot's name see --slot)\n"
+msgstr " --create-slot yeni bir replikasyon slotu oluştur(slotun adı için bkz. --slot)\n"
+
+#: pg_receivewal.c:106 pg_recvlogical.c:82
+#, c-format
+msgid " --drop-slot drop the replication slot (for the slot's name see --slot)\n"
+msgstr " --drop-slot replikasyon slotunu sil (slotun adı için bkz. --slot)\n"
+
+#: pg_receivewal.c:118
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "segment %X/%X de bitirildi (zaman çizelgesi %u)"
+
+#: pg_receivewal.c:125
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "log streaming %X/%X de durduruldu (zaman çizelgesi %u)"
+
+#: pg_receivewal.c:141
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "%2$X/%3$X konumunda%1$u zaman çizelgesine geçildi"
+
+#: pg_receivewal.c:151
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "kesme sinyali alındı, çıkılıyor"
+
+#: pg_receivewal.c:187
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "\"%s\" dizini kapatılamadı: %m"
+
+#: pg_receivewal.c:273
+#, c-format
+msgid "segment file \"%s\" has incorrect size %d, skipping"
+msgstr "\"%s\" segment dosyasının boyutu %d yanlış, atlanıyor"
+
+#: pg_receivewal.c:291
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "\"%s\" sıkıştırılmış dosyası açılamadı: %m"
+
+#: pg_receivewal.c:297
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "\"%s\" sıkıştırılmış dosyasında arama yapılamadı: %m"
+
+#: pg_receivewal.c:305
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "\"%s\" sıkıştırılmış dosyası okunamadı: %m"
+
+#: pg_receivewal.c:308
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "\"%1$s\" sıkıştırılmış dosyası okuma hatası: %3$zu nun %2$d si okundu"
+
+#: pg_receivewal.c:319
+#, c-format
+msgid "compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr "%s sıkıştırılmış segment dosyasının sıkıştırılmamış boyutu %d yanlış, atlanıyor"
+
+#: pg_receivewal.c:423
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "%X/%X de log streaming başlatılıyor (zaman çizelgesi %u)"
+
+#: pg_receivewal.c:538 pg_recvlogical.c:738
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "geçersiz port numarası \"%s\""
+
+#: pg_receivewal.c:566 pg_recvlogical.c:764
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "\"%s\" bitiş pozisyonu ayrıştırılamadı"
+
+#: pg_receivewal.c:581
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "geçersiz sıkıştırma seviyesi \"%s\""
+
+#: pg_receivewal.c:626
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "--create-slot ile --drop-slot beraber kullanılamaz"
+
+#: pg_receivewal.c:644
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "--synchronous ile --no-sync beraber kullanılamaz"
+
+#: pg_receivewal.c:720
+#, c-format
+msgid "replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr "\"%s\" slotunu kullanan replikasyon bağlantısı beklenmedik şekilde veritabanı spesifik"
+
+#: pg_receivewal.c:731 pg_recvlogical.c:942
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "\"%s\" replikasyon slotu siliniyor"
+
+#: pg_receivewal.c:742 pg_recvlogical.c:952
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "\"%s\" replikasyon slotu oluşturuluyor"
+
+#: pg_receivewal.c:768 pg_recvlogical.c:977
+#, c-format
+msgid "disconnected"
+msgstr "bağlantı kesildi"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:774 pg_recvlogical.c:983
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "bağlantı kesildi; tekrar denemek için %d saniye bekleniyor"
+
+#: pg_recvlogical.c:76
+#, c-format
+msgid ""
+"%s controls PostgreSQL logical decoding streams.\n"
+"\n"
+msgstr "%s PostgreSQL mantıksal kod çözme akımlarını (stream) kontrol eder\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid ""
+"\n"
+"Action to be performed:\n"
+msgstr ""
+"\n"
+"Gerçekleştirilecek eylem:\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " --start start streaming in a replication slot (for the slot's name see --slot)\n"
+msgstr " --start bir replikasyon slotunda streaming'i başlat (slotun ismi için bkz. --slot)\n"
+
+#: pg_recvlogical.c:86
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr ""
+" -f, --file=DOSYAADI logu bu dosyaya al, - stdout için\n"
+" \n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid ""
+" -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: %d)\n"
+msgstr ""
+" -F --fsync-interval=SANIYE\n"
+" çıktı dosyasına yapılan fsync işlemleri arasındaki, süre (varsayılan: %d)\n"
+
+#: pg_recvlogical.c:90
+#, c-format
+msgid " -I, --startpos=LSN where in an existing slot should the streaming start\n"
+msgstr " -I, --startpos=LSN mevcut bir slot'ta streaming işşleminin başlayacağı konum\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid ""
+" -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr ""
+" -o, --option=NAME[=VALUE]\n"
+" çıktı eklentisine NAME seçeneğini VALUE opsiyonel\n"
+" değeriyle geçir\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr " -P, --plugin=EKLENTI EKLENTI çıktı eklentisini kullan(varsayılan: %s)\n"
+
+#: pg_recvlogical.c:98
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=SLOTADI mantıksal replikasyon slot'unun adı\n"
+
+#: pg_recvlogical.c:103
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=VERITABANI_ADI bağlanılacak veritabanı adı\n"
+
+#: pg_recvlogical.c:135
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "%X/%X e kadar yazma, %X/%X'e kadar boşaltma (flush) için onaylama (slot %s)"
+
+#: pg_recvlogical.c:159 receivelog.c:346
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "geribesleme (feedback) paketi gönderilemedi: %s"
+
+#: pg_recvlogical.c:232
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "%X/%X de log streaming işlemi başlatılıyor (slot %s)"
+
+#: pg_recvlogical.c:273
+#, c-format
+msgid "streaming initiated"
+msgstr "streaming işlemi başlatıldı"
+
+#: pg_recvlogical.c:337
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "\"%s\" log dosyası açılamadı: %m"
+
+#: pg_recvlogical.c:363 receivelog.c:876
+#, c-format
+msgid "invalid socket: %s"
+msgstr "geçersiz soket: %s"
+
+#: pg_recvlogical.c:416 receivelog.c:904
+#, c-format
+msgid "select() failed: %m"
+msgstr "select() başarısız oldu: %m"
+
+#: pg_recvlogical.c:423 receivelog.c:954
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "Sunucudan WAL stream alınamadı: %s"
+
+#: pg_recvlogical.c:465 pg_recvlogical.c:516 receivelog.c:998 receivelog.c:1064
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "streaming üst bilgisi (header) çok küçük: %d"
+
+#: pg_recvlogical.c:500 receivelog.c:836
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "tanınmayan streaming üst bilgisi (header): \"%c\""
+
+#: pg_recvlogical.c:554 pg_recvlogical.c:566
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "%u bayt \"%s\" log dosyasına yazılamadı: %m"
+
+#: pg_recvlogical.c:594 receivelog.c:632 receivelog.c:669
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "replikasyon akımında (stream) beklenmeyen sonlanma: %s"
+
+#: pg_recvlogical.c:718
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "geçersiz fsync süresi \"%s\""
+
+#: pg_recvlogical.c:756
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "\"%s\" başlama pozisyonu ayrıştırılamadı"
+
+#: pg_recvlogical.c:845
+#, c-format
+msgid "no slot specified"
+msgstr "slot belirtilmedi"
+
+#: pg_recvlogical.c:853
+#, c-format
+msgid "no target file specified"
+msgstr "hedef dosya belirtilmedi"
+
+#: pg_recvlogical.c:861
+#, c-format
+msgid "no database specified"
+msgstr "veritabanı belirtilmedi"
+
+#: pg_recvlogical.c:869
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "en az bir eylem belirtilmesi gerekiyor"
+
+#: pg_recvlogical.c:877
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr "--create slot veya --start together --drop slot ile beraber kullanılamaz"
+
+#: pg_recvlogical.c:885
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr "--create slot veya --drop slot --startpos ile beraber kullanılamaz"
+
+#: pg_recvlogical.c:893
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "--endpos sadece --start ile birlikte belirtilebilir"
+
+#: pg_recvlogical.c:924
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr "veritabanına özel replikasyon bağlantısı kurulamadı"
+
+#: pg_recvlogical.c:1023
+#, c-format
+msgid "endpos %X/%X reached by keepalive"
+msgstr "keepalive tarafından endpos %X/%X'a ulaşıldı"
+
+#: pg_recvlogical.c:1026
+#, c-format
+msgid "endpos %X/%X reached by record at %X/%X"
+msgstr "%3$X/%4$X deki kayıt tarafından endpos %1$X/%2$X'e ulaşıldı"
+
+#: receivelog.c:72
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "\"%s\" arşiv durum dosyası oluşturulamadı: %s"
+
+#: receivelog.c:119
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "\"%s\" write-ahead log dosyasının boyutu alınamadı: %s"
+
+#: receivelog.c:129
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "\"%s\" mevcut write-ahead log dosyası açılamadı: %s"
+
+#: receivelog.c:137
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr "\"%s\" mevcut write-ahead log dosyası fsync edilemedi: %s"
+
+#: receivelog.c:151
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] "\"%s\" write-ahead log dosyası %d bayt, 0 veya %d olmalı"
+
+#: receivelog.c:166
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "\"%s\" write-ahead log dosyası açma hatası: %s"
+
+#: receivelog.c:192
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "\"%s\" dosyasınde arama pozisyonu belirlenemedi: %s"
+
+#: receivelog.c:206
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "\"%s%s\" isim değişikliği yapılmıyor, segment tamam değil"
+
+#: receivelog.c:218 receivelog.c:303 receivelog.c:678
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "\"%s\" dosyası kapatılamadı: %s"
+
+#: receivelog.c:275
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "sunucu %u zaman çizelgesi için beklenmeyen geçmiş dosyası adı bildirdi: %s"
+
+#: receivelog.c:283
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "\"%s\" zaman çizelgesi geçmiş dosyası yaratılamadı: %s"
+
+#: receivelog.c:290
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "\"%s\" zaman çizelgesi geçmiş dosyasına yazılamadı: %s"
+
+#: receivelog.c:380
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions older than %s"
+msgstr "uyumsuz sunucu sürümü %s; istemci %s den daha eski sunucu sürümlerinden streaming işlemini desteklemiyor"
+
+#: receivelog.c:389
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions newer than %s"
+msgstr "uyumsuz sunucu sürümü %s; istemci %s den daha yeni sunucu sürümlerinden streaming işlemini desteklemiyor"
+
+#: receivelog.c:491 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid "could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "sistem belirlenemedi: %d satır ve %d alan alındı, beklenen %d satır ve %d veya daha fazla alan"
+
+#: receivelog.c:498
+#, c-format
+msgid "system identifier does not match between base backup and streaming connection"
+msgstr "system tanımlayıcısı temel yedek ve streaming bağlantısı ile eşleşmiyor"
+
+#: receivelog.c:504
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "başlama zaman çizelgesi %u sunucuda mevcut değil"
+
+#: receivelog.c:545
+#, c-format
+msgid "unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "TIMELINE_HISTORY komutuna beklenmedik cevap; %d satır ve %d alan alındı, %d satır ve %d alan bekleniyordu"
+
+#: receivelog.c:616
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "sunucu %2$u zaman çizelgesini takiben beklenmedik sonraki zaman çizelgesi %1$u bildirdi"
+
+#: receivelog.c:622
+#, c-format
+msgid "server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"
+msgstr "sunucu %u streaming zaman çizelgesini %X/%X de durdurdu, fakat sonraki %u zaman çizelgesinin %X/%X de başlayacağını bildirdi"
+
+#: receivelog.c:662
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "replikasyon akımı durma nokatasından önce sonlandırıldı"
+
+#: receivelog.c:708
+#, c-format
+msgid "unexpected result set after end-of-timeline: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "zaman çizelgesi sonundan sonra beklenmedik sonuç kümesi: %d satır ve %d alan alındı, %d satır ve %d alan bekleniyordu"
+
+#: receivelog.c:717
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "bir sonraki zaman çizelgesinin (timeline) başlama noktası \"%s\" ayrıştırılamadı"
+
+#: receivelog.c:766 receivelog.c:1018
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "\"%s\" dosyası fsync hatası: %s"
+
+#: receivelog.c:1081
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "açık dosya yokken %u offset için write-ahead log kaydı alındı"
+
+#: receivelog.c:1091
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "%08x WAL data offset'i alındı , %08x bekleniyordu"
+
+#: receivelog.c:1125
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "%u bayt, \"%s\" WAL dosyasına yazılamadı: %s"
+
+#: receivelog.c:1150 receivelog.c:1190 receivelog.c:1221
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "copy-end paketi gönderilemedi: %s"
+
+#: streamutil.c:162
+msgid "Password: "
+msgstr "Şifre: "
+
+#: streamutil.c:187
+#, c-format
+msgid "could not connect to server"
+msgstr "sunucuya bağlanamadı"
+
+#: streamutil.c:204
+#, c-format
+msgid "could not connect to server: %s"
+msgstr "sunucuya bağlanamadı: %s"
+
+#: streamutil.c:233
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "search_path temizlenemedi: %s"
+
+#: streamutil.c:249
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "integer_datetimes için sunucu ayarı belirlenemedi"
+
+#: streamutil.c:256
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "integer_datetimes derleme seçeneği sunucu ile eşleşmiyor"
+
+#: streamutil.c:307
+#, c-format
+msgid "could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "WAL segment boyutu belirlenemedi: %d satır ve %d alan alındı, %d satır ve %d veya daha fazla alan bekleniyordu"
+
+#: streamutil.c:317
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "WAL segment boyutu ayrıştırılamadı"
+
+#: streamutil.c:332
+#, c-format
+msgid "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"
+msgid_plural "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"
+msgstr[0] "WAL segment boyutu 1 MB ve 1GB arasında 2 nin üssü bir değer olmalıdır, fakat uzak sunucu %d bayt bildirdi"
+
+#: streamutil.c:378
+#, c-format
+msgid "could not fetch group access flag: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "grup erişim ayarı belirlenemedi: %d satır ve %d alan alındı, %d satır ve %d veya daha fazla alan bekleniyordu"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "grup erişim ayarı ayrıştırılamadı: %s"
+
+#: streamutil.c:544
+#, c-format
+msgid "could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "\"%s\" replikasyon slot'u oluşturulamadı: %d satır ve %d alan alındı,%d satır ve %d alan bekleniyordu"
+
+#: streamutil.c:588
+#, c-format
+msgid "could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "\"%s\" replikasyon slot'u silinemedi: %d satır ve %d alan alındı, %d satır ve %d alan bekleniyordu"
+
+#: walmethods.c:439 walmethods.c:928
+msgid "could not compress data"
+msgstr "veri sıkıştırılamadı"
+
+#: walmethods.c:471
+msgid "could not reset compression stream"
+msgstr "sıkıştırma akımı sıfırlanamadı (reset)"
+
+#: walmethods.c:569
+msgid "could not initialize compression library"
+msgstr "sıkıştırma kütüphanesi ilklendirilemedi"
+
+#: walmethods.c:581
+msgid "implementation error: tar files can't have more than one open file"
+msgstr "uygulama hatası: tar dosyalarının birden fazla açık dosyası olamaz"
+
+#: walmethods.c:595
+msgid "could not create tar header"
+msgstr "tar başlığı (header) oluşturulamadı"
+
+#: walmethods.c:609 walmethods.c:649 walmethods.c:844 walmethods.c:855
+msgid "could not change compression parameters"
+msgstr "sıkıştırma parametreleri değiştirilemedi"
+
+#: walmethods.c:731
+msgid "unlink not supported with compression"
+msgstr "unlink, sıkıştırma seçeneği ile desteklenmiyor"
+
+#: walmethods.c:953
+msgid "could not close compression stream"
+msgstr "sıkıştırma akımı kapatılamadı"
+
+#~ msgid "%s: no start point returned from server\n"
+#~ msgstr "%s:sunucudan bir başlangıç noktası dönmedi\n"
+
+#~ msgid "%s: could not parse file mode\n"
+#~ msgstr "%s: dosya modu ayıklanamadı\n"
+
+#~ msgid "%s: could not parse file size\n"
+#~ msgstr "%s: dosya boyutu ayıklanamadı\n"
+
+#~ msgid " --version output version information, then exit\n"
+#~ msgstr " --version sürüm bilgisini gösterir ve çıkar\n"
+
+#~ msgid " --help show this help, then exit\n"
+#~ msgstr " --help bu yardımı gösterir ve çıkar\n"
+
+#~ msgid "%s: could not clear search_path: %s"
+#~ msgstr "%s: search_path temizlenemedi: %s"
+
+#~ msgid "%s: could not connect to server: %s"
+#~ msgstr "%s: sunucuya bağlanılamadı: %s"
+
+#~ msgid "%s: could not connect to server\n"
+#~ msgstr "%s: sunucuya bağlanılamadı\n"
+
+#~ msgid "%s: could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields\n"
+#~ msgstr "%s: sistem belirlenemedi: %d satır ve %d alan alındı, %d satır ve %d veya daha fazla alan bekleniyordu\n"
+
+#~ msgid "%s: could not open write-ahead log file \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" write-ahead log dosyası açılamadı: %s\n"
+
+#~ msgid "%s: could not create archive status file \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" arşiv durum dosyası oluşturulamadı: %s\n"
+
+#~ msgid "%s: could not receive data from WAL stream: %s"
+#~ msgstr "%s: WAL stream'den veri alınamadı: %s"
+
+#~ msgid "%s: select() failed: %s\n"
+#~ msgstr "%s: select() başarısız oldu: %s\n"
+
+#~ msgid "%s: could not open log file \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" kayıt dosyası açılamıyor: %s\n"
+
+#~ msgid "%s: could not fsync log file \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dosyası fsync edilemiyor: %s\n"
+
+#~ msgid "%s: invalid port number \"%s\"\n"
+#~ msgstr "%s: geçersiz port numarası: \"%s\"\n"
+
+#~ msgid "%s: could not close directory \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dizini kapatılamadı: %s\n"
+
+#~ msgid "%s: symlinks are not supported on this platform\n"
+#~ msgstr "%s: bu platformda sembolik bağlantı (symlink) desteklenmemektedir\n"
+
+#~ msgid "%s: could not create symbolic link \"%s\": %s\n"
+#~ msgstr "%s: symbolic link \"%s\" oluşturma hatası: %s\n"
+
+#~ msgid "%s: child process exited with error %d\n"
+#~ msgstr "%s: alt süreç %d hata kodu ile sonlandı\n"
+
+#~ msgid "%s: child process did not exit normally\n"
+#~ msgstr "%s: alt süreç normal olarak sonlanmadı\n"
+
+#~ msgid "%s: out of memory\n"
+#~ msgstr "%s: yetersiz bellek\n"
+
+#~ msgid "%s: could not set permissions on file \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dosyasının izinleri ayarlanamadı: %s\n"
+
+#~ msgid "%s: could not set permissions on directory \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dizininde izinler ayarlanamadı: %s\n"
+
+#~ msgid "%s: could not close file \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dosyası kapatılamadı: %s\n"
+
+#~ msgid "%s: could not create file \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dosyası yaratılamadı: %s\n"
+
+#~ msgid "%s: could not write to file \"%s\": %s\n"
+#~ msgstr "%s: \"%s\":dosyasına yazılamadı: %s\n"
+
+#~ msgid "%s: could not access directory \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dizine erişim hatası: %s\n"
+
+#~ msgid "%s: could not create directory \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dizini oluşturma başarısız: %s\n"
+
+#~ msgid "%s: could not rename file \"%s\" to \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dosyasının ismi \"%s\" olarak değiştirilemedi : %s\n"
+
+#~ msgid "%s: could not fsync file \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dosyası fsync işlemi başarısız: %s\n"
+
+#~ msgid "%s: could not open file \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dosyası açılamadı: %s\n"
+
+#~ msgid "%s: could not read directory \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dizini okuma başarısız: %s\n"
+
+#~ msgid "%s: could not open directory \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dizini açılamadı: %s\n"
+
+#~ msgid "%s: could not stat file \"%s\": %s\n"
+#~ msgstr "%s: \"%s\" dosyasının durumu görüntülenemedi (stat): %s\n"
diff --git a/src/bin/pg_basebackup/po/uk.po b/src/bin/pg_basebackup/po/uk.po
new file mode 100644
index 0000000..3856107
--- /dev/null
+++ b/src/bin/pg_basebackup/po/uk.po
@@ -0,0 +1,1439 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: postgresql\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2022-03-16 09:16+0000\n"
+"PO-Revision-Date: 2022-06-19 10:10\n"
+"Last-Translator: \n"
+"Language-Team: Ukrainian\n"
+"Language: uk_UA\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n"
+"X-Crowdin-Project: postgresql\n"
+"X-Crowdin-Project-ID: 324573\n"
+"X-Crowdin-Language: uk\n"
+"X-Crowdin-File: /REL_14_STABLE/pg_basebackup.pot\n"
+"X-Crowdin-File-ID: 776\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "збій: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "помилка: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "попередження: "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98 ../../common/fe_memutils.c:162
+#, c-format
+msgid "out of memory\n"
+msgstr "недостатньо пам'яті\n"
+
+#: ../../common/fe_memutils.c:92 ../../common/fe_memutils.c:154
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "неможливо дублювати нульовий покажчик (внутрішня помилка)\n"
+
+#: ../../common/file_utils.c:87 ../../common/file_utils.c:451
+#: pg_receivewal.c:266 pg_recvlogical.c:339
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "не вдалося отримати інформацію від файлу \"%s\": %m"
+
+#: ../../common/file_utils.c:166 pg_receivewal.c:169
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "не вдалося відкрити каталог \"%s\": %m"
+
+#: ../../common/file_utils.c:200 pg_receivewal.c:337
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "не вдалося прочитати каталог \"%s\": %m"
+
+#: ../../common/file_utils.c:232 ../../common/file_utils.c:291
+#: ../../common/file_utils.c:365 ../../fe_utils/recovery_gen.c:134
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "не можливо відкрити файл \"%s\": %m"
+
+#: ../../common/file_utils.c:303 ../../common/file_utils.c:373
+#: pg_recvlogical.c:193
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "не вдалося fsync файл \"%s\": %m"
+
+#: ../../common/file_utils.c:383
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "не вдалося перейменувати файл \"%s\" на \"%s\": %m"
+
+#: ../../fe_utils/recovery_gen.c:35 ../../fe_utils/recovery_gen.c:49
+#: ../../fe_utils/recovery_gen.c:77 ../../fe_utils/recovery_gen.c:100
+#: ../../fe_utils/recovery_gen.c:171 pg_basebackup.c:1248
+#, c-format
+msgid "out of memory"
+msgstr "недостатньо пам'яті"
+
+#: ../../fe_utils/recovery_gen.c:140 pg_basebackup.c:1021 pg_basebackup.c:1715
+#: pg_basebackup.c:1771
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "неможливо записати до файлу \"%s\": %m"
+
+#: ../../fe_utils/recovery_gen.c:152 pg_basebackup.c:1166 pg_basebackup.c:1672
+#: pg_basebackup.c:1748
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "неможливо створити файл \"%s\": %m"
+
+#: pg_basebackup.c:224
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "видалення даних з директорії \"%s\""
+
+#: pg_basebackup.c:226
+#, c-format
+msgid "failed to remove data directory"
+msgstr "не вдалося видалити дані директорії"
+
+#: pg_basebackup.c:230
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "видалення даних з директорії \"%s\""
+
+#: pg_basebackup.c:232
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "не вдалося видалити дані директорії"
+
+#: pg_basebackup.c:237
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "видалення WAL директорії \"%s\""
+
+#: pg_basebackup.c:239
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "не вдалося видалити директорію WAL"
+
+#: pg_basebackup.c:243
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "видалення даних з директорії WAL \"%s\""
+
+#: pg_basebackup.c:245
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "не вдалося видалити дані директорії WAL"
+
+#: pg_basebackup.c:251
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "директорія даних \"%s\" не видалена за запитом користувача"
+
+#: pg_basebackup.c:254
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "директорія WAL \"%s\" не видалена за запитом користувача"
+
+#: pg_basebackup.c:258
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "зміни в каталогах табличних просторів незворотні"
+
+#: pg_basebackup.c:299
+#, c-format
+msgid "directory name too long"
+msgstr "ім'я директорії задовге"
+
+#: pg_basebackup.c:309
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "кілька знаків \"=\" зіставленні табличних просторів"
+
+#: pg_basebackup.c:321
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr "неприпустимий табличний простір зіставлення формату \"%s\", має бути \"OLDDIR = NEWDIR\""
+
+#: pg_basebackup.c:333
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr "старий каталог не є абсолютним шляхом у зіставлення табличного простору: %s"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr "новий каталог не є абсолютним шляхом у зіставлення табличного простору: %s"
+
+#: pg_basebackup.c:379
+#, c-format
+msgid "%s takes a base backup of a running PostgreSQL server.\n\n"
+msgstr "%s робить базову резервну копію працюючого сервера PostgreSQL.\n\n"
+
+#: pg_basebackup.c:381 pg_receivewal.c:79 pg_recvlogical.c:75
+#, c-format
+msgid "Usage:\n"
+msgstr "Використання:\n"
+
+#: pg_basebackup.c:382 pg_receivewal.c:80 pg_recvlogical.c:76
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s: [OPTION]...\n"
+
+#: pg_basebackup.c:383
+#, c-format
+msgid "\n"
+"Options controlling the output:\n"
+msgstr "\n"
+"Параметри, що контролюють вивід:\n"
+
+#: pg_basebackup.c:384
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, -- pgdata=DIRECTORY директорія, в яку зберегти резервну копію бази\n"
+
+#: pg_basebackup.c:385
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr " -F, --format=p|т формат виводу (звичайний за замовчуванням, tar)\n"
+
+#: pg_basebackup.c:386
+#, c-format
+msgid " -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr " -r, --max-rate=RATE максимальна швидкість передавання даних до директорії\n"
+" (у кБ/с або з використанням суфіксів \"k\" або \"М\")\n"
+
+#: pg_basebackup.c:388
+#, c-format
+msgid " -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr " -R, --write-recovery-conf\n"
+" записати конфігурацію для реплікації\n"
+
+#: pg_basebackup.c:390
+#, c-format
+msgid " -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr " -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" перенестb табличний простір з OLDDIR до NEWDIR\n"
+
+#: pg_basebackup.c:392
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr "--waldir=WALDIR розташування журналу попереднього запису\n"
+
+#: pg_basebackup.c:393
+#, c-format
+msgid " -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr " -X, --wal-method=none|fetch|stream\n"
+" додати необхідні WAL файли за допомогою вказаного методу\n"
+
+#: pg_basebackup.c:395
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr " -z, --gzip стиснути вихідний tar\n"
+
+#: pg_basebackup.c:396
+#, c-format
+msgid " -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr " -Z, --compress=0-9 рівень стискання вихідного архіву \n"
+
+#: pg_basebackup.c:397
+#, c-format
+msgid "\n"
+"General options:\n"
+msgstr "\n"
+"Основні налаштування:\n"
+
+#: pg_basebackup.c:398
+#, c-format
+msgid " -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr " -c, --checkpoint=fast|spread\n"
+" режим швидких або розділених контрольних точок\n"
+
+#: pg_basebackup.c:400
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " -C, --create-slot створити слот для реплікації\n"
+
+#: pg_basebackup.c:401
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=LABEL встановити мітку резервної копії\n"
+
+#: pg_basebackup.c:402
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --no-clean не очищати після помилок\n"
+
+#: pg_basebackup.c:403
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync не чекати завершення збереження даних на диску\n"
+
+#: pg_basebackup.c:404
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress відображати інформацію про прогрес\n"
+
+#: pg_basebackup.c:405 pg_receivewal.c:89
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=ИМ'Я_СЛОТА використовувати вказаний слот реплікації\n"
+
+#: pg_basebackup.c:406 pg_receivewal.c:91 pg_recvlogical.c:96
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose виводити детальні повідомлення\n"
+
+#: pg_basebackup.c:407 pg_receivewal.c:92 pg_recvlogical.c:97
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version вивести інформацію про версію і вийти\n"
+
+#: pg_basebackup.c:408
+#, c-format
+msgid " --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" use algorithm for manifest checksums\n"
+msgstr " --manifest-checksums=SHA{224,256,384,512}|CRC32C|НЕ\n"
+" використовувати алгоритм для контрольних сум маніфесту\n"
+
+#: pg_basebackup.c:410
+#, c-format
+msgid " --manifest-force-encode\n"
+" hex encode all file names in manifest\n"
+msgstr " --manifest-force-encode\n"
+" кодувати у hex всі імена файлів у маніфесті\n"
+
+#: pg_basebackup.c:412
+#, c-format
+msgid " --no-estimate-size do not estimate backup size in server side\n"
+msgstr " --no-estimate-size не оцінювати розмір резервної копії на стороні сервера\n"
+
+#: pg_basebackup.c:413
+#, c-format
+msgid " --no-manifest suppress generation of backup manifest\n"
+msgstr " --no-manifest пропустити створення маніфесту резервного копіювання\n"
+
+#: pg_basebackup.c:414
+#, c-format
+msgid " --no-slot prevent creation of temporary replication slot\n"
+msgstr " --no-slot не створювати тимчасового слоту реплікації\n"
+
+#: pg_basebackup.c:415
+#, c-format
+msgid " --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr " --no-verify-checksums\n"
+" не перевіряти контрольні суми\n"
+
+#: pg_basebackup.c:417 pg_receivewal.c:94 pg_recvlogical.c:98
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help показати цю довідку потім вийти\n"
+
+#: pg_basebackup.c:418 pg_receivewal.c:95 pg_recvlogical.c:99
+#, c-format
+msgid "\n"
+"Connection options:\n"
+msgstr "\n"
+"Налаштування з'єднання:\n"
+
+#: pg_basebackup.c:419 pg_receivewal.c:96
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=CONNSTR рядок з'єднання\n"
+
+#: pg_basebackup.c:420 pg_receivewal.c:97 pg_recvlogical.c:101
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr " -h, --host=HOSTNAME хост сервера бази даних або каталог сокетів\n"
+
+#: pg_basebackup.c:421 pg_receivewal.c:98 pg_recvlogical.c:102
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=PORT порт сервера бази даних\n"
+
+#: pg_basebackup.c:422
+#, c-format
+msgid " -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in seconds)\n"
+msgstr " -s, --status-interval=INTERVAL часу між пакетами статусу до сервера (у секундах)\n"
+
+#: pg_basebackup.c:424 pg_receivewal.c:99 pg_recvlogical.c:103
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr " -U, --username=NAME підключатись як вказаний користувач бази даних\n"
+
+#: pg_basebackup.c:425 pg_receivewal.c:100 pg_recvlogical.c:104
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password ніколи не питати пароль\n"
+
+#: pg_basebackup.c:426 pg_receivewal.c:101 pg_recvlogical.c:105
+#, c-format
+msgid " -W, --password force password prompt (should happen automatically)\n"
+msgstr " -W, --password обов'язково питати пароль (повинно відбуватися автоматично)\n"
+
+#: pg_basebackup.c:427 pg_receivewal.c:105 pg_recvlogical.c:106
+#, c-format
+msgid "\n"
+"Report bugs to <%s>.\n"
+msgstr "\n"
+"Повідомляти про помилки на <%s>.\n"
+
+#: pg_basebackup.c:428 pg_receivewal.c:106 pg_recvlogical.c:107
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Домашня сторінка %s: <%s>\n"
+
+#: pg_basebackup.c:471
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "не можливо прочитати з готових каналів: %m"
+
+#: pg_basebackup.c:477 pg_basebackup.c:608 pg_basebackup.c:2134
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "не вдалося проаналізувати наперед журнал локації \"%s\""
+
+#: pg_basebackup.c:573 pg_receivewal.c:441
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "не можливо закінчити написання файлів WAL: %m"
+
+#: pg_basebackup.c:620
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "не можливо створити канал для фонового процесу: %m"
+
+#: pg_basebackup.c:655
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "створено слот тимчасових реплікацій \"%s\""
+
+#: pg_basebackup.c:658
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "створено слот реплікацій \"%s\""
+
+#: pg_basebackup.c:678 pg_basebackup.c:731 pg_basebackup.c:1621
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "не вдалося створити каталог \"%s\": %m"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not create background process: %m"
+msgstr "не можливо створити фоновий процес: %m"
+
+#: pg_basebackup.c:708
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "не можливо створити фоновий потік: %m"
+
+#: pg_basebackup.c:752
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "каталог \"%s\" існує, але він не порожній"
+
+#: pg_basebackup.c:759
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "немає доступу до каталогу \"%s\": %m"
+
+#: pg_basebackup.c:824
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s kB (100%%), %d/%d табличний простір %*s"
+msgstr[1] "%*s/%s kB (100%%), %d/%d табличних простори %*s"
+msgstr[2] "%*s/%s kB (100%%), %d/%d табличних просторів %*s"
+msgstr[3] "%*s/%s kB (100%%), %d/%d табличних просторів %*s"
+
+#: pg_basebackup.c:836
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d табличний простір (%s%-*.*s)"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d табличних простори (%s%-*.*s)"
+msgstr[2] "%*s/%s kB (%d%%), %d/%d табличних просторів (%s%-*.*s)"
+msgstr[3] "%*s/%s kB (%d%%), %d/%d табличних просторів (%s%-*.*s)"
+
+#: pg_basebackup.c:852
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d табличний простір"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d табличних простори"
+msgstr[2] "%*s/%s kB (%d%%), %d/%d табличних просторів"
+msgstr[3] "%*s/%s kB (%d%%), %d/%d табличних просторів"
+
+#: pg_basebackup.c:877
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "частота передач \"%s\" не є припустимим значенням"
+
+#: pg_basebackup.c:882
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "неприпустима частота передач \"%s\": %m"
+
+#: pg_basebackup.c:891
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "частота передач повинна бути більша за нуль"
+
+#: pg_basebackup.c:923
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "неприпустима одиниця виміру в --max-rate: \"%s\""
+
+#: pg_basebackup.c:930
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "швидкість передачі \"%s\" перевищує діапазон цілого числа"
+
+#: pg_basebackup.c:940
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "швидкість передавання \"%s\" поза діапазоном"
+
+#: pg_basebackup.c:961
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "не вдалося отримати потік даних COPY: %s"
+
+#: pg_basebackup.c:981 pg_recvlogical.c:434 pg_recvlogical.c:606
+#: receivelog.c:978
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "не вдалося прочитати дані COPY: %s"
+
+#: pg_basebackup.c:1007
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "не вдалося записати до стиснутого файлу \"%s\": %s"
+
+#: pg_basebackup.c:1071
+#, c-format
+msgid "could not duplicate stdout: %m"
+msgstr "не вдалося дублювати stdout: %m"
+
+#: pg_basebackup.c:1078
+#, c-format
+msgid "could not open output file: %m"
+msgstr "не вдалося відкрити вихідний файл: %m"
+
+#: pg_basebackup.c:1085 pg_basebackup.c:1106 pg_basebackup.c:1135
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "не вдалося встановити рівень стискання %d: %s"
+
+#: pg_basebackup.c:1155
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "не вдалося створити стиснутий файл \"%s\": %s"
+
+#: pg_basebackup.c:1268
+#, c-format
+msgid "could not close compressed file \"%s\": %m"
+msgstr "не вдалося закрити стиснутий файл \"%s\": %m"
+
+#: pg_basebackup.c:1280 pg_recvlogical.c:631
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "неможливо закрити файл \"%s\": %m"
+
+#: pg_basebackup.c:1542
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "потік COPY завершився до завершення останнього файлу"
+
+#: pg_basebackup.c:1571
+#, c-format
+msgid "invalid tar block header size: %zu"
+msgstr "неприпустимий розмір заголовка блоку tar: %zu"
+
+#: pg_basebackup.c:1628
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "не вдалося встановити права для каталогу \"%s\": %m"
+
+#: pg_basebackup.c:1652
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "не вдалося створити символічне послання з \"%s\" на \"%s\": %m"
+
+#: pg_basebackup.c:1659
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "нерозпізнаний індикатор зв'язку \"%c\""
+
+#: pg_basebackup.c:1678
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "не вдалося встановити права на файл \"%s\": %m"
+
+#: pg_basebackup.c:1832
+#, c-format
+msgid "incompatible server version %s"
+msgstr "несумісна версія серверу %s"
+
+#: pg_basebackup.c:1847
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr "ПІДКАЗКА: використайте -X none або -X fetch, щоб вимкнути потокову передачу журналу"
+
+#: pg_basebackup.c:1883
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr "початок базового резервного копіювання, очікується завершення контрольної точки"
+
+#: pg_basebackup.c:1909 pg_recvlogical.c:261 receivelog.c:494 receivelog.c:543
+#: receivelog.c:582 streamutil.c:297 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "не вдалося відправити реплікаційну команду \"%s\": %s"
+
+#: pg_basebackup.c:1920
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "не вдалося почати базове резервне копіювання: %s"
+
+#: pg_basebackup.c:1926
+#, c-format
+msgid "server returned unexpected response to BASE_BACKUP command; got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "сервер повернув неочікувану відповідь на команду BASE_BACKUP; отримано %d рядків і %d полів, очікувалось %d рядків і %d полів"
+
+#: pg_basebackup.c:1934
+#, c-format
+msgid "checkpoint completed"
+msgstr "контрольна точка завершена"
+
+#: pg_basebackup.c:1949
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "стартова точка у випереджувальному журналюванні: %s на часовій шкалі %u"
+
+#: pg_basebackup.c:1958
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "не вдалося отримати заголовок резервної копії: %s"
+
+#: pg_basebackup.c:1964
+#, c-format
+msgid "no data returned from server"
+msgstr "сервер не повернув дані"
+
+#: pg_basebackup.c:1996
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr "можна записати лише один табличний простір в stdout, всього їх в базі даних %d"
+
+#: pg_basebackup.c:2008
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "запуск фонового процесу зчитування WAL"
+
+#: pg_basebackup.c:2047
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr "не вдалося отримати кінцеву позицію у випереджувальному журналюванні з сервера: %s"
+
+#: pg_basebackup.c:2053
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "сервер не повернув кінцеву позицію у випереджувальному журналюванні"
+
+#: pg_basebackup.c:2058
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "кінцева точка у випереджувальному журналюванні: %s"
+
+#: pg_basebackup.c:2069
+#, c-format
+msgid "checksum error occurred"
+msgstr "сталася помилка контрольної суми"
+
+#: pg_basebackup.c:2074
+#, c-format
+msgid "final receive failed: %s"
+msgstr "помилка в кінці передачі: %s"
+
+#: pg_basebackup.c:2098
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "очікування завершення потокового передавання фоновим процесом ..."
+
+#: pg_basebackup.c:2103
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "не вдалося надіслати команду до канала фонового процесу: %m"
+
+#: pg_basebackup.c:2111
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "збій при очікуванні дочірнього процесу: %m"
+
+#: pg_basebackup.c:2116
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "завершився дочірній процес %d, очікувалося %d"
+
+#: pg_basebackup.c:2121 streamutil.c:92 streamutil.c:203
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2146
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "неможливо дочекатися дочірнього потоку: %m"
+
+#: pg_basebackup.c:2152
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "не можливо отримати статус завершення дочірнього потоку: %m"
+
+#: pg_basebackup.c:2157
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "дочірній потік завершився з помилкою %u"
+
+#: pg_basebackup.c:2185
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "синхронізація даних з диском ..."
+
+#: pg_basebackup.c:2210
+#, c-format
+msgid "renaming backup_manifest.tmp to backup_manifest"
+msgstr "перейменування backup_manifest.tmp в backup_manifest"
+
+#: pg_basebackup.c:2221
+#, c-format
+msgid "base backup completed"
+msgstr "базове резервне копіювання завершено"
+
+#: pg_basebackup.c:2306
+#, c-format
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\""
+msgstr "неприпустимий формат виводу \"%s\", повинен бути \"plain\" або \"tar\""
+
+#: pg_basebackup.c:2350
+#, c-format
+msgid "invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr "неприпустимий параметр wal-method \"%s\", повинен бути \"fetch\", \"stream\" або \"none\""
+
+#: pg_basebackup.c:2378 pg_receivewal.c:580
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "неприпустимий рівень стискання \"%s\""
+
+#: pg_basebackup.c:2389
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr "неприпустимий аргумент контрольної точки \"%s\", повинен бути \"fast\" або \"spread\""
+
+#: pg_basebackup.c:2416 pg_receivewal.c:555 pg_recvlogical.c:819
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "неприпустимий інтервал повідомлень про стан \"%s\""
+
+#: pg_basebackup.c:2446 pg_basebackup.c:2459 pg_basebackup.c:2470
+#: pg_basebackup.c:2481 pg_basebackup.c:2489 pg_basebackup.c:2497
+#: pg_basebackup.c:2507 pg_basebackup.c:2520 pg_basebackup.c:2529
+#: pg_basebackup.c:2540 pg_basebackup.c:2550 pg_basebackup.c:2568
+#: pg_basebackup.c:2577 pg_basebackup.c:2586 pg_receivewal.c:605
+#: pg_receivewal.c:618 pg_receivewal.c:626 pg_receivewal.c:636
+#: pg_receivewal.c:644 pg_receivewal.c:655 pg_recvlogical.c:845
+#: pg_recvlogical.c:858 pg_recvlogical.c:869 pg_recvlogical.c:877
+#: pg_recvlogical.c:885 pg_recvlogical.c:893 pg_recvlogical.c:901
+#: pg_recvlogical.c:909 pg_recvlogical.c:917
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Спробуйте \"%s --help\" для додаткової інформації.\n"
+
+#: pg_basebackup.c:2457 pg_receivewal.c:616 pg_recvlogical.c:856
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "забагато аргументів у командному рядку (перший \"%s\")"
+
+#: pg_basebackup.c:2469 pg_receivewal.c:654
+#, c-format
+msgid "no target directory specified"
+msgstr "цільовий каталог не вказано"
+
+#: pg_basebackup.c:2480
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "лише резервні копії в архіві tar можуть стискатись"
+
+#: pg_basebackup.c:2488
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "транслювати випереджувальні журналювання в режимі tar в потік stdout не можна"
+
+#: pg_basebackup.c:2496
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "слоти реплікації можуть використовуватись тільки з потоковим передаванням WAL"
+
+#: pg_basebackup.c:2506
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "--no-slot не можна використовувати з іменем слота"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2518 pg_receivewal.c:634
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "для %s потрібно вказати слот за допомогою --slot"
+
+#: pg_basebackup.c:2527 pg_basebackup.c:2566 pg_basebackup.c:2575
+#: pg_basebackup.c:2584
+#, c-format
+msgid "%s and %s are incompatible options"
+msgstr "параметри %s і %s несумісні"
+
+#: pg_basebackup.c:2539
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "розташування каталога WAL можна вказати лише в режимі plain"
+
+#: pg_basebackup.c:2549
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "розташування WAL каталогу має бути абсолютним шляхом"
+
+#: pg_basebackup.c:2559 pg_receivewal.c:663
+#, c-format
+msgid "this build does not support compression"
+msgstr "ця збірка не підтримує стискання"
+
+#: pg_basebackup.c:2644
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "не вдалося створити символічне послання \"%s\": %m"
+
+#: pg_basebackup.c:2648
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "символічні посилання не підтримуються цією платформою"
+
+#: pg_receivewal.c:77
+#, c-format
+msgid "%s receives PostgreSQL streaming write-ahead logs.\n\n"
+msgstr "%s отримує передачу випереджувальних журналів PostgreSQL.\n\n"
+
+#: pg_receivewal.c:81 pg_recvlogical.c:81
+#, c-format
+msgid "\n"
+"Options:\n"
+msgstr "\n"
+"Параметри:\n"
+
+#: pg_receivewal.c:82
+#, c-format
+msgid " -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr " -D, --directory=DIR зберігати файли випереджувального журналювання до цього каталогу\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:82
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr " -E, --endpos=LSN вийти після отримання вказаного LSN\n"
+
+#: pg_receivewal.c:84 pg_recvlogical.c:86
+#, c-format
+msgid " --if-not-exists do not error if slot already exists when creating a slot\n"
+msgstr " --if-not-exists не видавати помилку, при створенні слота, якщо слот вже існує\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:88
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop переривати роботу при втраті підключення\n"
+
+#: pg_receivewal.c:86
+#, c-format
+msgid " --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " --no-sync не чекати безпечного збереження змін на диск\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:93
+#, c-format
+msgid " -s, --status-interval=SECS\n"
+" time between status packets sent to server (default: %d)\n"
+msgstr " -s, --status-interval=SECS\n"
+" інтервал між відправкою статусних пакетів серверу (за замовчуванням: %d)\n"
+
+#: pg_receivewal.c:90
+#, c-format
+msgid " --synchronous flush write-ahead log immediately after writing\n"
+msgstr " --synchronous очистити випереджувальне журналювання відразу після запису\n"
+
+#: pg_receivewal.c:93
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr " -Z, --compress=0-9 стискати журнали заданим рівнем стискання\n"
+
+#: pg_receivewal.c:102
+#, c-format
+msgid "\n"
+"Optional actions:\n"
+msgstr "\n"
+"Додаткові дії:\n"
+
+#: pg_receivewal.c:103 pg_recvlogical.c:78
+#, c-format
+msgid " --create-slot create a new replication slot (for the slot's name see --slot)\n"
+msgstr " --create-slot створити новий слот реплікації (ім'я слота задає параметр --slot)\n"
+
+#: pg_receivewal.c:104 pg_recvlogical.c:79
+#, c-format
+msgid " --drop-slot drop the replication slot (for the slot's name see --slot)\n"
+msgstr " --drop-slot видалити слот реплікації (ім'я слота задає параметр --slot)\n"
+
+#: pg_receivewal.c:117
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "завершено сегмент в позиції %X/%X (часова шкала %u)"
+
+#: pg_receivewal.c:124
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "зупинено потокове передавання журналу в позиції %X/%X (часова шкала %u)"
+
+#: pg_receivewal.c:140
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "переключено на часову шкалу %u в позиції %X/%X"
+
+#: pg_receivewal.c:150
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "отримано сигнал переривання, завершення роботи"
+
+#: pg_receivewal.c:186
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "не вдалося закрити каталог \"%s\": %m"
+
+#: pg_receivewal.c:272
+#, c-format
+msgid "segment file \"%s\" has incorrect size %lld, skipping"
+msgstr "файл сегменту \"%s\" має неправильний розмір %lld, пропускається"
+
+#: pg_receivewal.c:290
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "не вдалося відкрити стиснутий файл \"%s\": %m"
+
+#: pg_receivewal.c:296
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "не вдалося знайти в стиснутому файлі \"%s\": %m"
+
+#: pg_receivewal.c:304
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "не вдалося прочитати стиснутий файл \"%s\": %m"
+
+#: pg_receivewal.c:307
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "не вдалося прочитати стиснутий файл \"%s\": прочитано %d з %zu"
+
+#: pg_receivewal.c:318
+#, c-format
+msgid "compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr "файл стиснутого сегменту \"%s\" має неправильний розмір без стискання %d, пропускається"
+
+#: pg_receivewal.c:422
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "початок потокового передавання журналу в позиції %X/%X (часова шкала %u)"
+
+#: pg_receivewal.c:537 pg_recvlogical.c:761
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "неприпустимий номер порту \"%s\""
+
+#: pg_receivewal.c:565 pg_recvlogical.c:787
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "не вдалося проаналізувати кінцеву позицію \"%s\""
+
+#: pg_receivewal.c:625
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "використовувати --create-slot разом з --drop-slot не можна"
+
+#: pg_receivewal.c:643
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "використовувати --synchronous разом з --no-sync не можна"
+
+#: pg_receivewal.c:723
+#, c-format
+msgid "replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr "підключення для реплікації з використанням слоту \"%s\" неочікувано виявилось прив'язаним до бази даних"
+
+#: pg_receivewal.c:734 pg_recvlogical.c:968
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "видалення слоту реплікації \"%s\""
+
+#: pg_receivewal.c:745 pg_recvlogical.c:978
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "створення слоту реплікації \"%s\""
+
+#: pg_receivewal.c:771 pg_recvlogical.c:1003
+#, c-format
+msgid "disconnected"
+msgstr "роз’єднано"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:777 pg_recvlogical.c:1009
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "роз’єднано; через %d секунд буде повторна спроба"
+
+#: pg_recvlogical.c:73
+#, c-format
+msgid "%s controls PostgreSQL logical decoding streams.\n\n"
+msgstr "%s керує потоковими передаваннями логічного декодування PostgreSQL.\n\n"
+
+#: pg_recvlogical.c:77
+#, c-format
+msgid "\n"
+"Action to be performed:\n"
+msgstr "\n"
+"Дія до виконання:\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid " --start start streaming in a replication slot (for the slot's name see --slot)\n"
+msgstr " --start почати потокове передавання в слоті реплікації (ім'я слоту задає параметр --slot)\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr " -f, --file=FILE зберігати журнал до цього файлу, - позначає stdout\n"
+
+#: pg_recvlogical.c:84
+#, c-format
+msgid " -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: %d)\n"
+msgstr " -F --fsync-interval=SECS\n"
+" час між fsyncs до файлу виводу (за замовчуванням: %d)\n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid " -I, --startpos=LSN where in an existing slot should the streaming start\n"
+msgstr " -I, --startpos=LSN де в існуючому слоті слід почати потокове передавання\n"
+
+#: pg_recvlogical.c:89
+#, c-format
+msgid " -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr " -o, --option=NAME[=VALUE]\n"
+" передати параметр NAME з додатковим значенням VALUE до\n"
+" плагіну виводу\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr " -P, --plugin=PLUGIN використовувати плагін виводу PLUGIN (за замовчуванням: %s)\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=SLOTNAME ім'я слоту логічної реплікації\n"
+
+#: pg_recvlogical.c:100
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=DBNAME бази даних для підключення\n"
+
+#: pg_recvlogical.c:133
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "підтвердження запису до %X/%X, очищення до %X/%X (слот %s)"
+
+#: pg_recvlogical.c:157 receivelog.c:356
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "не вдалося відправити пакет зворотнього зв'язку: %s"
+
+#: pg_recvlogical.c:228
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "початок потокового передавання журналу в позиції %X/%X (слот %s)"
+
+#: pg_recvlogical.c:270
+#, c-format
+msgid "streaming initiated"
+msgstr "потокове передавання ініційовано"
+
+#: pg_recvlogical.c:334
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "не вдалося відкрити файл журналу \"%s\": %m"
+
+#: pg_recvlogical.c:360 receivelog.c:886
+#, c-format
+msgid "invalid socket: %s"
+msgstr "неприпустимий сокет: %s"
+
+#: pg_recvlogical.c:413 receivelog.c:914
+#, c-format
+msgid "%s() failed: %m"
+msgstr "%s() помилка: %m"
+
+#: pg_recvlogical.c:420 receivelog.c:964
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "не вдалося отримати дані з WAL потоку: %s"
+
+#: pg_recvlogical.c:462 pg_recvlogical.c:513 receivelog.c:1008
+#: receivelog.c:1074
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "заголовок потокового передавання занадто малий: %d"
+
+#: pg_recvlogical.c:497 receivelog.c:846
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "нерозпізнаний заголовок потокового передавання: \"%c\""
+
+#: pg_recvlogical.c:551 pg_recvlogical.c:563
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "не вдалося записати %u байт до файлу журналу \"%s\": %m"
+
+#: pg_recvlogical.c:617 receivelog.c:642 receivelog.c:679
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "неочікуване завершення роботи потоку реплікації: %s"
+
+#: pg_recvlogical.c:741
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "неприпустимий інтервал fsync \"%s\""
+
+#: pg_recvlogical.c:779
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "не вдалося аналізувати початкову позицію \"%s\""
+
+#: pg_recvlogical.c:868
+#, c-format
+msgid "no slot specified"
+msgstr "слот не вказано"
+
+#: pg_recvlogical.c:876
+#, c-format
+msgid "no target file specified"
+msgstr "цільовий файл не вказано"
+
+#: pg_recvlogical.c:884
+#, c-format
+msgid "no database specified"
+msgstr "база даних не вказана"
+
+#: pg_recvlogical.c:892
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "необхідно вказати щонайменше одну дію"
+
+#: pg_recvlogical.c:900
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr "використовувати --create-slot або --start разом з --drop-slot не можна"
+
+#: pg_recvlogical.c:908
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr "використовувати --create-slot або --drop-slot разом з --startpos не можна"
+
+#: pg_recvlogical.c:916
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "--endpos можна вказати лише з --start"
+
+#: pg_recvlogical.c:950
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr "не вдалося встановити підключення для реплікації до вказаної бази даних"
+
+#: pg_recvlogical.c:1049
+#, c-format
+msgid "end position %X/%X reached by keepalive"
+msgstr "кінцева позиція %X/%X досягнута наживо"
+
+#: pg_recvlogical.c:1052
+#, c-format
+msgid "end position %X/%X reached by WAL record at %X/%X"
+msgstr "кінцева позиція %X/%X досягнута WAL записом %X/%X"
+
+#: receivelog.c:68
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "не вдалося створити файл статусу архіву \"%s\": %s"
+
+#: receivelog.c:75
+#, c-format
+msgid "could not close archive status file \"%s\": %s"
+msgstr "не вдалося закрити файл статусу архіву \"%s\": %s"
+
+#: receivelog.c:123
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "не вдалося отримати розмір файлу випереджувального журналювання \"%s\": %s"
+
+#: receivelog.c:134
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "не вдалося відкрити існуючий файл випереджувального журналювання \"%s\": %s"
+
+#: receivelog.c:143
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr "не вдалося fsync існуючий файл випереджувального журналювання \"%s\": %s"
+
+#: receivelog.c:158
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] "файл випереджувального журналювання \"%s\" має %d байт, а повинен мати 0 або %d"
+msgstr[1] "файл випереджувального журналювання \"%s\" має %d байти, а повинен мати 0 або %d"
+msgstr[2] "файл випереджувального журналювання \"%s\" має %d байтів, а повинен мати 0 або %d"
+msgstr[3] "файл випереджувального журналювання \"%s\" має %d байтів, а повинен мати 0 або %d"
+
+#: receivelog.c:174
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "не вдалося відкрити файл випереджувального журналювання \"%s\": %s"
+
+#: receivelog.c:202
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "не вдалося визначити позицію у файлі \"%s\": %s"
+
+#: receivelog.c:216
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "не перейменовується \"%s%s\", сегмент не завершено"
+
+#: receivelog.c:228 receivelog.c:313 receivelog.c:688
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "не вдалося закрити файл \"%s\": %s"
+
+#: receivelog.c:285
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "сервер повідомив неочікуване ім'я файлу історії часової шкали %u: %s"
+
+#: receivelog.c:293
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "не вдалося створити файл історії часової шкали \"%s\": %s"
+
+#: receivelog.c:300
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "не вдалося записати файл історії часової шкали \"%s\": %s"
+
+#: receivelog.c:390
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions older than %s"
+msgstr "несумісна версія серверу %s; клієнт не підтримує потокове передавання з версій серверу старіших, ніж %s"
+
+#: receivelog.c:399
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions newer than %s"
+msgstr "несумісна версія серверу %s; клієнт не підтримує потокове передавання з версій серверу новіших, ніж %s"
+
+#: receivelog.c:501 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid "could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "не вдалося ідентифікувати систему: отримано %d рядків і %d полів, очікувалось %d рядків і %d або більше полів"
+
+#: receivelog.c:508
+#, c-format
+msgid "system identifier does not match between base backup and streaming connection"
+msgstr "системний ідентифікатор базової резервної копії не відповідає ідентифікатору потокового передавання підключення"
+
+#: receivelog.c:514
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "початкова часова шкала %u не існує на сервері"
+
+#: receivelog.c:555
+#, c-format
+msgid "unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "неочікувана відповідь на команду TIMELINE_HISTORY: отримано %d рядків і %d полів, очікувалось %d рядків і %d полів"
+
+#: receivelog.c:626
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "сервер неочікувано повідомив наступну часову шкалу %u після часової шкали %u"
+
+#: receivelog.c:632
+#, c-format
+msgid "server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"
+msgstr "сервер зупинив потокове передавання часової шкали %u в позиції %X/%X, але повідомив, що наступна часова шкала %u почнеться в позиції %X/%X"
+
+#: receivelog.c:672
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "потік реплікації перервано до точки зупинки"
+
+#: receivelog.c:718
+#, c-format
+msgid "unexpected result set after end-of-timeline: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "неочікуваний набір результатів після кінця часової шкали: отримано %d рядків і %d полів, очікувалось %d рядків і %d полів"
+
+#: receivelog.c:727
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "не вдалося аналізувати початкову точку наступної часової шкали \"%s\""
+
+#: receivelog.c:776 receivelog.c:1028 walmethods.c:994
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "не вдалося fsync файл \"%s\": %s"
+
+#: receivelog.c:1091
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "отримано запис випереджувального журналювання для зсуву %u з закритим файлом"
+
+#: receivelog.c:1101
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "отримано дані зсуву WAL %08x, очікувалось %08x"
+
+#: receivelog.c:1135
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "не вдалося записати %u байт до файла WAL \"%s\": %s"
+
+#: receivelog.c:1160 receivelog.c:1200 receivelog.c:1230
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "не вдалося відправити пакет кінця копіювання \"copy-end\": %s"
+
+#: streamutil.c:162
+msgid "Password: "
+msgstr "Пароль: "
+
+#: streamutil.c:186
+#, c-format
+msgid "could not connect to server"
+msgstr "не вдалося підключитись до серверу"
+
+#: streamutil.c:231
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "не вдалося очистити search_path: %s"
+
+#: streamutil.c:247
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "не вдалося визначити настроювання серверу для integer_datetimes"
+
+#: streamutil.c:254
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "параметри компіляції integer_datetimes не відповідають серверу"
+
+#: streamutil.c:305
+#, c-format
+msgid "could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "не вдалося отримати розмір сегменту WAL: отримано %d рядків і %d полів, очікувалось %d рядків і %d або більше полів"
+
+#: streamutil.c:315
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "не вдалося аналізувати розмір сегмента WAL"
+
+#: streamutil.c:333
+#, c-format
+msgid "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"
+msgid_plural "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"
+msgstr[0] "Розмір сегменту WAL повинен бути двійкою, піднесеною до степеня в інтервалі між 1 МБ і 1 ГБ, але віддалений сервер повідомив значення %d байт"
+msgstr[1] "Розмір сегменту WAL повинен бути двійкою, піднесеною до степеня в інтервалі між 1 МБ і 1 ГБ, але віддалений сервер повідомив значення %d байти"
+msgstr[2] "Розмір сегменту WAL повинен бути двійкою, піднесеною до степеня в інтервалі між 1 МБ і 1 ГБ, але віддалений сервер повідомив значення %d байтів"
+msgstr[3] "Розмір сегменту WAL повинен бути двійкою, піднесеною до степеня в інтервалі між 1 МБ і 1 ГБ, але віддалений сервер повідомив значення %d байтів"
+
+#: streamutil.c:378
+#, c-format
+msgid "could not fetch group access flag: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "не вдалося вилучити позначку доступа групи: отримано %d рядків і %d полів, очікувалось %d рядків і %d або більше полів"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "не вдалося аналізувати позначку доступа групи: %s"
+
+#: streamutil.c:544
+#, c-format
+msgid "could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "не вдалося створити слот реплікації \"%s\": отримано %d рядків і %d полів, очікувалось %d рядків і %d полів"
+
+#: streamutil.c:588
+#, c-format
+msgid "could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "не вдалося видалити слот реплікації \"%s\": отримано %d рядків і %d полів, очікувалось %d рядків і %d полів"
+
+#: walmethods.c:521 walmethods.c:1057
+msgid "could not compress data"
+msgstr "не вдалося стиснути дані"
+
+#: walmethods.c:550
+msgid "could not reset compression stream"
+msgstr "не вдалося скинути потік стискання"
+
+#: walmethods.c:670
+msgid "could not initialize compression library"
+msgstr "не вдалося ініціалізувати бібліотеку стискання"
+
+#: walmethods.c:681
+msgid "implementation error: tar files can't have more than one open file"
+msgstr "помилка реалізації: файли tar не можуть мати більше одного відкритого файлу"
+
+#: walmethods.c:695
+msgid "could not create tar header"
+msgstr "не вдалося створити заголовок tar"
+
+#: walmethods.c:711 walmethods.c:751 walmethods.c:965 walmethods.c:977
+msgid "could not change compression parameters"
+msgstr "не вдалося змінити параметри стискання"
+
+#: walmethods.c:850
+msgid "unlink not supported with compression"
+msgstr "unink не підтримується зі стисканням"
+
+#: walmethods.c:1081
+msgid "could not close compression stream"
+msgstr "не вдалося закрити потік стискання"
+
diff --git a/src/bin/pg_basebackup/po/zh_CN.po b/src/bin/pg_basebackup/po/zh_CN.po
new file mode 100644
index 0000000..57c1ae7
--- /dev/null
+++ b/src/bin/pg_basebackup/po/zh_CN.po
@@ -0,0 +1,1463 @@
+# LANGUAGE message translation file for pg_basebackup
+# Copyright (C) 2019 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_basebackup (PostgreSQL) package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_basebackup (PostgreSQL) 14\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-08-14 05:46+0000\n"
+"PO-Revision-Date: 2021-08-14 18:00+0800\n"
+"Last-Translator: Jie Zhang <zhangjie2@fujitsu.com>\n"
+"Language-Team: Chinese (Simplified) <zhangjie2@fujitsu.com>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../../../src/common/logging.c:259
+#, c-format
+msgid "fatal: "
+msgstr "致命的: "
+
+#: ../../../src/common/logging.c:266
+#, c-format
+msgid "error: "
+msgstr "错误: "
+
+#: ../../../src/common/logging.c:273
+#, c-format
+msgid "warning: "
+msgstr "警告: "
+
+#: ../../common/fe_memutils.c:35 ../../common/fe_memutils.c:75
+#: ../../common/fe_memutils.c:98 ../../common/fe_memutils.c:162
+#, c-format
+msgid "out of memory\n"
+msgstr "内存不足\n"
+
+#: ../../common/fe_memutils.c:92 ../../common/fe_memutils.c:154
+#, c-format
+msgid "cannot duplicate null pointer (internal error)\n"
+msgstr "无法复制空指针 (内部错误)\n"
+
+#: ../../common/file_utils.c:87 ../../common/file_utils.c:451
+#: pg_receivewal.c:266 pg_recvlogical.c:340
+#, c-format
+msgid "could not stat file \"%s\": %m"
+msgstr "无法取文件 \"%s\" 的状态: %m"
+
+#: ../../common/file_utils.c:166 pg_receivewal.c:169
+#, c-format
+msgid "could not open directory \"%s\": %m"
+msgstr "无法打开目录 \"%s\": %m"
+
+#: ../../common/file_utils.c:200 pg_receivewal.c:337
+#, c-format
+msgid "could not read directory \"%s\": %m"
+msgstr "无法读取目录 \"%s\": %m"
+
+#: ../../common/file_utils.c:232 ../../common/file_utils.c:291
+#: ../../common/file_utils.c:365 ../../fe_utils/recovery_gen.c:134
+#, c-format
+msgid "could not open file \"%s\": %m"
+msgstr "无法打开文件 \"%s\": %m"
+
+#: ../../common/file_utils.c:303 ../../common/file_utils.c:373
+#: pg_recvlogical.c:193
+#, c-format
+msgid "could not fsync file \"%s\": %m"
+msgstr "无法 fsync 文件 \"%s\": %m"
+
+#: ../../common/file_utils.c:383
+#, c-format
+msgid "could not rename file \"%s\" to \"%s\": %m"
+msgstr "无法把文件 \"%s\" 重命名为 \"%s\": %m"
+
+#: ../../fe_utils/recovery_gen.c:35 ../../fe_utils/recovery_gen.c:49
+#: ../../fe_utils/recovery_gen.c:77 ../../fe_utils/recovery_gen.c:100
+#: ../../fe_utils/recovery_gen.c:171 pg_basebackup.c:1248
+#, c-format
+msgid "out of memory"
+msgstr "内存不足"
+
+#: ../../fe_utils/recovery_gen.c:140 pg_basebackup.c:1021 pg_basebackup.c:1714
+#: pg_basebackup.c:1770
+#, c-format
+msgid "could not write to file \"%s\": %m"
+msgstr "无法写入文件 \"%s\": %m"
+
+#: ../../fe_utils/recovery_gen.c:152 pg_basebackup.c:1166 pg_basebackup.c:1671
+#: pg_basebackup.c:1747
+#, c-format
+msgid "could not create file \"%s\": %m"
+msgstr "无法创建文件 \"%s\": %m"
+
+#: pg_basebackup.c:224
+#, c-format
+msgid "removing data directory \"%s\""
+msgstr "删除数据目录 \"%s\""
+
+#: pg_basebackup.c:226
+#, c-format
+msgid "failed to remove data directory"
+msgstr "删除数据目录失败"
+
+#: pg_basebackup.c:230
+#, c-format
+msgid "removing contents of data directory \"%s\""
+msgstr "删除数据目录 \"%s\" 的内容"
+
+#: pg_basebackup.c:232
+#, c-format
+msgid "failed to remove contents of data directory"
+msgstr "删除数据目录内容失败"
+
+#: pg_basebackup.c:237
+#, c-format
+msgid "removing WAL directory \"%s\""
+msgstr "正在删除WAL目录\"%s\""
+
+#: pg_basebackup.c:239
+#, c-format
+msgid "failed to remove WAL directory"
+msgstr "删除WAL目录失败"
+
+#: pg_basebackup.c:243
+#, c-format
+msgid "removing contents of WAL directory \"%s\""
+msgstr "正在删除WAL目录 \"%s\" 的内容"
+
+#: pg_basebackup.c:245
+#, c-format
+msgid "failed to remove contents of WAL directory"
+msgstr "删除WAL目录内容失败"
+
+#: pg_basebackup.c:251
+#, c-format
+msgid "data directory \"%s\" not removed at user's request"
+msgstr "在用户的要求下数据库目录 \"%s\" 不被删除"
+
+#: pg_basebackup.c:254
+#, c-format
+msgid "WAL directory \"%s\" not removed at user's request"
+msgstr "在用户的要求下WAL目录 \"%s\" 不被删除"
+
+#: pg_basebackup.c:258
+#, c-format
+msgid "changes to tablespace directories will not be undone"
+msgstr "对表空间目录的更改将不会撤消"
+
+#: pg_basebackup.c:299
+#, c-format
+msgid "directory name too long"
+msgstr "字典名太长"
+
+#: pg_basebackup.c:309
+#, c-format
+msgid "multiple \"=\" signs in tablespace mapping"
+msgstr "多个 \"=\" 号出现在表空间的映射中"
+
+#: pg_basebackup.c:321
+#, c-format
+msgid "invalid tablespace mapping format \"%s\", must be \"OLDDIR=NEWDIR\""
+msgstr "无效表空间映射表格式: \"%s\", 有效格式必须为: \"OLDDIR=NEWDIR\""
+
+#: pg_basebackup.c:333
+#, c-format
+msgid "old directory is not an absolute path in tablespace mapping: %s"
+msgstr "在表空间映射表:%s中的旧目录不是一个绝对路径"
+
+#: pg_basebackup.c:340
+#, c-format
+msgid "new directory is not an absolute path in tablespace mapping: %s"
+msgstr "在表空间映射表:%s中的新目录不是一个绝对路径"
+
+#: pg_basebackup.c:379
+#, c-format
+msgid ""
+"%s takes a base backup of a running PostgreSQL server.\n"
+"\n"
+msgstr ""
+"%s 在运行的PostgreSQL服务器上执行基础备份.\n"
+"\n"
+
+#: pg_basebackup.c:381 pg_receivewal.c:79 pg_recvlogical.c:75
+#, c-format
+msgid "Usage:\n"
+msgstr "使用方法:\n"
+
+#: pg_basebackup.c:382 pg_receivewal.c:80 pg_recvlogical.c:76
+#, c-format
+msgid " %s [OPTION]...\n"
+msgstr " %s [选项]...\n"
+
+#: pg_basebackup.c:383
+#, c-format
+msgid ""
+"\n"
+"Options controlling the output:\n"
+msgstr ""
+"\n"
+"控制输出的选项:\n"
+
+#: pg_basebackup.c:384
+#, c-format
+msgid " -D, --pgdata=DIRECTORY receive base backup into directory\n"
+msgstr " -D, --pgdata=DIRECTORY 接收基础备份到指定目录\n"
+
+#: pg_basebackup.c:385
+#, c-format
+msgid " -F, --format=p|t output format (plain (default), tar)\n"
+msgstr " -F, --format=p|t 输出格式 (纯文本 (缺省值), tar压缩格式)\n"
+
+#: pg_basebackup.c:386
+#, c-format
+msgid ""
+" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n"
+" (in kB/s, or use suffix \"k\" or \"M\")\n"
+msgstr ""
+" -r, --max-rate=RATE 传输数据目录的最大传输速率\n"
+" (单位 kB/s, 也可以使用后缀\"k\" 或 \"M\")\n"
+
+#: pg_basebackup.c:388
+#, c-format
+msgid ""
+" -R, --write-recovery-conf\n"
+" write configuration for replication\n"
+msgstr ""
+" -R, --write-recovery-conf\n"
+" 为复制写配置文件\n"
+
+#: pg_basebackup.c:390
+#, c-format
+msgid ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" relocate tablespace in OLDDIR to NEWDIR\n"
+msgstr ""
+" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
+" 将表空间由 OLDDIR 重定位到 NEWDIR\n"
+
+#: pg_basebackup.c:392
+#, c-format
+msgid " --waldir=WALDIR location for the write-ahead log directory\n"
+msgstr " --waldir=WALDIR 预写日志目录的位置\n"
+
+#: pg_basebackup.c:393
+#, c-format
+msgid ""
+" -X, --wal-method=none|fetch|stream\n"
+" include required WAL files with specified method\n"
+msgstr ""
+" -X, --wal-method=none|fetch|stream\n"
+" 按指定的模式包含必需的WAL日志文件\n"
+
+#: pg_basebackup.c:395
+#, c-format
+msgid " -z, --gzip compress tar output\n"
+msgstr " -z, --gzip 对tar文件进行压缩输出\n"
+
+#: pg_basebackup.c:396
+#, c-format
+msgid " -Z, --compress=0-9 compress tar output with given compression level\n"
+msgstr " -Z, --compress=0-9 按给定的压缩级别对tar文件进行压缩输出\n"
+
+#: pg_basebackup.c:397
+#, c-format
+msgid ""
+"\n"
+"General options:\n"
+msgstr ""
+"\n"
+"一般选项:\n"
+
+#: pg_basebackup.c:398
+#, c-format
+msgid ""
+" -c, --checkpoint=fast|spread\n"
+" set fast or spread checkpointing\n"
+msgstr ""
+" -c, --checkpoint=fast|spread\n"
+" 设置检查点方式(fast或者spread)\n"
+
+#: pg_basebackup.c:400
+#, c-format
+msgid " -C, --create-slot create replication slot\n"
+msgstr " -C, --create-slot 创建复制槽\n"
+
+#: pg_basebackup.c:401
+#, c-format
+msgid " -l, --label=LABEL set backup label\n"
+msgstr " -l, --label=LABEL 设置备份标签\n"
+
+#: pg_basebackup.c:402
+#, c-format
+msgid " -n, --no-clean do not clean up after errors\n"
+msgstr " -n, --no-clean 出错后不清理\n"
+
+#: pg_basebackup.c:403
+#, c-format
+msgid " -N, --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " -N, --no-sync 不用等待变化安全的写入磁盘\n"
+
+#: pg_basebackup.c:404
+#, c-format
+msgid " -P, --progress show progress information\n"
+msgstr " -P, --progress 显示进度信息\n"
+
+#: pg_basebackup.c:405 pg_receivewal.c:89
+#, c-format
+msgid " -S, --slot=SLOTNAME replication slot to use\n"
+msgstr " -S, --slot=SLOTNAME 用于复制的槽名\n"
+
+#: pg_basebackup.c:406 pg_receivewal.c:91 pg_recvlogical.c:96
+#, c-format
+msgid " -v, --verbose output verbose messages\n"
+msgstr " -v, --verbose 输出详细的消息\n"
+
+#: pg_basebackup.c:407 pg_receivewal.c:92 pg_recvlogical.c:97
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version 输出版本信息, 然后退出\n"
+
+#: pg_basebackup.c:408
+msgid ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" use algorithm for manifest checksums\n"
+msgstr ""
+" --manifest-checksums=SHA{224,256,384,512}|CRC32C|NONE\n"
+" 对清单校验和使用算法\n"
+
+#: pg_basebackup.c:410
+msgid ""
+" --manifest-force-encode\n"
+" hex encode all file names in manifest\n"
+msgstr ""
+" --manifest-force-encode\n"
+" 十六进制编码清单中的所有文件名\n"
+
+#: pg_basebackup.c:412
+#, c-format
+msgid " --no-estimate-size do not estimate backup size in server side\n"
+msgstr ""
+
+#: pg_basebackup.c:413
+msgid " --no-manifest suppress generation of backup manifest\n"
+msgstr " --no-manifest 禁止生成备份清单\n"
+
+#: pg_basebackup.c:414
+#, c-format
+msgid " --no-slot prevent creation of temporary replication slot\n"
+msgstr " --no-slot 防止创建临时复制槽\n"
+
+#: pg_basebackup.c:415
+#, c-format
+msgid ""
+" --no-verify-checksums\n"
+" do not verify checksums\n"
+msgstr ""
+" --no-verify-checksums\n"
+" 不验证校验和\n"
+
+#: pg_basebackup.c:417 pg_receivewal.c:94 pg_recvlogical.c:98
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help 显示此帮助, 然后退出\n"
+
+#: pg_basebackup.c:418 pg_receivewal.c:95 pg_recvlogical.c:99
+#, c-format
+msgid ""
+"\n"
+"Connection options:\n"
+msgstr ""
+"\n"
+"联接选项:\n"
+
+#: pg_basebackup.c:419 pg_receivewal.c:96
+#, c-format
+msgid " -d, --dbname=CONNSTR connection string\n"
+msgstr " -d, --dbname=CONNSTR 连接串\n"
+
+#: pg_basebackup.c:420 pg_receivewal.c:97 pg_recvlogical.c:101
+#, c-format
+msgid " -h, --host=HOSTNAME database server host or socket directory\n"
+msgstr " -h, --host=HOSTNAME 数据库服务器主机或者是socket目录\n"
+
+#: pg_basebackup.c:421 pg_receivewal.c:98 pg_recvlogical.c:102
+#, c-format
+msgid " -p, --port=PORT database server port number\n"
+msgstr " -p, --port=PORT 数据库服务器端口号\n"
+
+#: pg_basebackup.c:422
+#, c-format
+msgid ""
+" -s, --status-interval=INTERVAL\n"
+" time between status packets sent to server (in seconds)\n"
+msgstr ""
+" -s, --status-interval=INTERVAL\n"
+" 发往服务器的状态包的时间间隔 (以秒计)\n"
+
+#: pg_basebackup.c:424 pg_receivewal.c:99 pg_recvlogical.c:103
+#, c-format
+msgid " -U, --username=NAME connect as specified database user\n"
+msgstr " -U, --username=NAME 指定连接所需的数据库用户名\n"
+
+#: pg_basebackup.c:425 pg_receivewal.c:100 pg_recvlogical.c:104
+#, c-format
+msgid " -w, --no-password never prompt for password\n"
+msgstr " -w, --no-password 禁用输入密码的提示\n"
+
+#: pg_basebackup.c:426 pg_receivewal.c:101 pg_recvlogical.c:105
+#, c-format
+msgid " -W, --password force password prompt (should happen automatically)\n"
+msgstr " -W, --password 强制提示输入密码 (应该自动发生)\n"
+
+#: pg_basebackup.c:427 pg_receivewal.c:105 pg_recvlogical.c:106
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"臭虫报告至<%s>.\n"
+
+#: pg_basebackup.c:428 pg_receivewal.c:106 pg_recvlogical.c:107
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s 主页: <%s>\n"
+
+#: pg_basebackup.c:471
+#, c-format
+msgid "could not read from ready pipe: %m"
+msgstr "无法从准备就绪的管道: %m读"
+
+#: pg_basebackup.c:477 pg_basebackup.c:608 pg_basebackup.c:2133
+#: streamutil.c:450
+#, c-format
+msgid "could not parse write-ahead log location \"%s\""
+msgstr "无法解析来自 \"%s\"的预写日志"
+
+#: pg_basebackup.c:573 pg_receivewal.c:441
+#, c-format
+msgid "could not finish writing WAL files: %m"
+msgstr "无法完成写入WAL文件: %m"
+
+#: pg_basebackup.c:620
+#, c-format
+msgid "could not create pipe for background process: %m"
+msgstr "无法为后台进程: %m创建管道"
+
+#: pg_basebackup.c:655
+#, c-format
+msgid "created temporary replication slot \"%s\""
+msgstr "已创建临时复制槽\"%s\""
+
+#: pg_basebackup.c:658
+#, c-format
+msgid "created replication slot \"%s\""
+msgstr "已创建复制槽\"%s\""
+
+#: pg_basebackup.c:678 pg_basebackup.c:731 pg_basebackup.c:1620
+#, c-format
+msgid "could not create directory \"%s\": %m"
+msgstr "无法创建目录 \"%s\": %m"
+
+#: pg_basebackup.c:696
+#, c-format
+msgid "could not create background process: %m"
+msgstr "无法创建后台进程: %m"
+
+#: pg_basebackup.c:708
+#, c-format
+msgid "could not create background thread: %m"
+msgstr "无法创建后台线程: %m"
+
+#: pg_basebackup.c:752
+#, c-format
+msgid "directory \"%s\" exists but is not empty"
+msgstr "目录\"%s\"已存在,但不是空的"
+
+#: pg_basebackup.c:759
+#, c-format
+msgid "could not access directory \"%s\": %m"
+msgstr "无法访问目录 \"%s\": %m"
+
+#: pg_basebackup.c:824
+#, c-format
+msgid "%*s/%s kB (100%%), %d/%d tablespace %*s"
+msgid_plural "%*s/%s kB (100%%), %d/%d tablespaces %*s"
+msgstr[0] "%*s/%s kB (100%%), %d/%d 表空间 %*s"
+msgstr[1] "%*s/%s kB (100%%), %d/%d 多个表空间 %*s"
+
+#: pg_basebackup.c:836
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace (%s%-*.*s)"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces (%s%-*.*s)"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d 表空间 (%s%-*.*s)"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d 多个表空间 (%s%-*.*s)"
+
+#: pg_basebackup.c:852
+#, c-format
+msgid "%*s/%s kB (%d%%), %d/%d tablespace"
+msgid_plural "%*s/%s kB (%d%%), %d/%d tablespaces"
+msgstr[0] "%*s/%s kB (%d%%), %d/%d 表空间"
+msgstr[1] "%*s/%s kB (%d%%), %d/%d 多个表空间"
+
+#: pg_basebackup.c:877
+#, c-format
+msgid "transfer rate \"%s\" is not a valid value"
+msgstr "传输速率\"%s\"不是一个有效值"
+
+#: pg_basebackup.c:882
+#, c-format
+msgid "invalid transfer rate \"%s\": %m"
+msgstr "无效的传输速率\"%s\": %m"
+
+#: pg_basebackup.c:891
+#, c-format
+msgid "transfer rate must be greater than zero"
+msgstr "传输速率必须大于0"
+
+#: pg_basebackup.c:923
+#, c-format
+msgid "invalid --max-rate unit: \"%s\""
+msgstr "无效的 --max-rate 单位: \"%s\""
+
+#: pg_basebackup.c:930
+#, c-format
+msgid "transfer rate \"%s\" exceeds integer range"
+msgstr "传输速率 \"%s\" 超出了整数范围"
+
+#: pg_basebackup.c:940
+#, c-format
+msgid "transfer rate \"%s\" is out of range"
+msgstr "传输速率 \"%s\" 超出范围"
+
+#: pg_basebackup.c:961
+#, c-format
+msgid "could not get COPY data stream: %s"
+msgstr "无法得到复制数据流: %s"
+
+#: pg_basebackup.c:981 pg_recvlogical.c:435 pg_recvlogical.c:607
+#: receivelog.c:973
+#, c-format
+msgid "could not read COPY data: %s"
+msgstr "无法读取复制数据: %s"
+
+#: pg_basebackup.c:1007
+#, c-format
+msgid "could not write to compressed file \"%s\": %s"
+msgstr "无法往压缩文件里写\"%s\": %s"
+
+#: pg_basebackup.c:1071
+msgid "could not duplicate stdout: %m"
+msgstr "无法复制标准输出: %m"
+
+#: pg_basebackup.c:1078
+#, c-format
+msgid "could not open output file: %m"
+msgstr "无法打开输出文件: %m"
+
+#: pg_basebackup.c:1085 pg_basebackup.c:1106 pg_basebackup.c:1135
+#, c-format
+msgid "could not set compression level %d: %s"
+msgstr "无法设置压缩级别 %d: %s"
+
+#: pg_basebackup.c:1155
+#, c-format
+msgid "could not create compressed file \"%s\": %s"
+msgstr "无法创建压缩文件 \"%s\": %s"
+
+#: pg_basebackup.c:1267
+#, c-format
+msgid "could not close compressed file \"%s\": %s"
+msgstr "无法关闭压缩文件 \"%s\": %s"
+
+#: pg_basebackup.c:1279 pg_recvlogical.c:632
+#, c-format
+msgid "could not close file \"%s\": %m"
+msgstr "无法关闭文件 \"%s\": %m"
+
+#: pg_basebackup.c:1541
+#, c-format
+msgid "COPY stream ended before last file was finished"
+msgstr "复制流在最后一个文件结束前终止"
+
+#: pg_basebackup.c:1570
+msgid "invalid tar block header size: %zu"
+msgstr "无效的tar压缩块头大小: %zu"
+
+#: pg_basebackup.c:1627
+#, c-format
+msgid "could not set permissions on directory \"%s\": %m"
+msgstr "无法为目录 \"%s\" 的设置权限: %m"
+
+#: pg_basebackup.c:1651
+#, c-format
+msgid "could not create symbolic link from \"%s\" to \"%s\": %m"
+msgstr "无法创建从 \"%s\" 到 \"%s\"的符号链接: %m"
+
+#: pg_basebackup.c:1658
+#, c-format
+msgid "unrecognized link indicator \"%c\""
+msgstr "无法识别的链接标识符 \"%c\""
+
+#: pg_basebackup.c:1677
+#, c-format
+msgid "could not set permissions on file \"%s\": %m"
+msgstr "无法设置文件 \"%s\" 的权限: %m"
+
+#: pg_basebackup.c:1831
+#, c-format
+msgid "incompatible server version %s"
+msgstr "不兼容的服务器版本号 %s"
+
+#: pg_basebackup.c:1846
+#, c-format
+msgid "HINT: use -X none or -X fetch to disable log streaming"
+msgstr "提示:使用-X none或-X fetch禁用日志流"
+
+#: pg_basebackup.c:1882
+#, c-format
+msgid "initiating base backup, waiting for checkpoint to complete"
+msgstr "开始基础备份,等待检查点完成"
+
+#: pg_basebackup.c:1908 pg_recvlogical.c:262 receivelog.c:489 receivelog.c:538
+#: receivelog.c:577 streamutil.c:297 streamutil.c:370 streamutil.c:422
+#: streamutil.c:533 streamutil.c:578
+#, c-format
+msgid "could not send replication command \"%s\": %s"
+msgstr "无法发送复制命令 \"%s\": %s"
+
+#: pg_basebackup.c:1919
+#, c-format
+msgid "could not initiate base backup: %s"
+msgstr "无法发起基础备份: %s"
+
+#: pg_basebackup.c:1925
+#, c-format
+msgid "server returned unexpected response to BASE_BACKUP command; got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "服务器对BASE_BACKUP命令返回意外的响应; 得到 %d 行和 %d 列, 期望值为: %d 行和 %d 列"
+
+#: pg_basebackup.c:1933
+#, c-format
+msgid "checkpoint completed"
+msgstr "已完成检查点"
+
+#: pg_basebackup.c:1948
+#, c-format
+msgid "write-ahead log start point: %s on timeline %u"
+msgstr "预写日志起始于时间点: %s, 基于时间轴%u"
+
+#: pg_basebackup.c:1957
+#, c-format
+msgid "could not get backup header: %s"
+msgstr "无法得到备份头: %s"
+
+#: pg_basebackup.c:1963
+#, c-format
+msgid "no data returned from server"
+msgstr "服务器没有数据返回"
+
+#: pg_basebackup.c:1995
+#, c-format
+msgid "can only write single tablespace to stdout, database has %d"
+msgstr "只能把表空间写往标准输出, 数据库拥有标准输出: %d"
+
+#: pg_basebackup.c:2007
+#, c-format
+msgid "starting background WAL receiver"
+msgstr "启动后台 WAL 接收进程"
+
+#: pg_basebackup.c:2046
+#, c-format
+msgid "could not get write-ahead log end position from server: %s"
+msgstr "无法得到来自服务器的预写日志终止位置: %s"
+
+#: pg_basebackup.c:2052
+#, c-format
+msgid "no write-ahead log end position returned from server"
+msgstr "服务器端没有返回预写日志的终止位置"
+
+#: pg_basebackup.c:2057
+#, c-format
+msgid "write-ahead log end point: %s"
+msgstr "预写日志结束点: %s"
+
+#: pg_basebackup.c:2068
+#, c-format
+msgid "checksum error occurred"
+msgstr "发生校验和错误"
+
+#: pg_basebackup.c:2073
+#, c-format
+msgid "final receive failed: %s"
+msgstr "最终接收失败: %s"
+
+#: pg_basebackup.c:2097
+#, c-format
+msgid "waiting for background process to finish streaming ..."
+msgstr "等待后台进程结束流操作..."
+
+#: pg_basebackup.c:2102
+#, c-format
+msgid "could not send command to background pipe: %m"
+msgstr "无法发送命令到后台管道: %m"
+
+#: pg_basebackup.c:2110
+#, c-format
+msgid "could not wait for child process: %m"
+msgstr "无法等待子进程: %m"
+
+#: pg_basebackup.c:2115
+#, c-format
+msgid "child %d died, expected %d"
+msgstr "子进程 %d 已终止, 期望值为 %d"
+
+#: pg_basebackup.c:2120 streamutil.c:92 streamutil.c:203
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: pg_basebackup.c:2145
+#, c-format
+msgid "could not wait for child thread: %m"
+msgstr "无法等待子线程: %m"
+
+#: pg_basebackup.c:2151
+#, c-format
+msgid "could not get child thread exit status: %m"
+msgstr "无法得到子线程退出状态: %m"
+
+#: pg_basebackup.c:2156
+#, c-format
+msgid "child thread exited with error %u"
+msgstr "子线程退出, 错误码为: %u"
+
+#: pg_basebackup.c:2184
+#, c-format
+msgid "syncing data to disk ..."
+msgstr "同步数据到磁盘..."
+
+#: pg_basebackup.c:2209
+msgid "renaming backup_manifest.tmp to backup_manifest"
+msgstr "将backup_manifest.tmp重命名为backup_manifest"
+
+#: pg_basebackup.c:2220
+#, c-format
+msgid "base backup completed"
+msgstr "基础备份已完成"
+
+#: pg_basebackup.c:2305
+msgid "invalid output format \"%s\", must be \"plain\" or \"tar\""
+msgstr "无效输出格式: \"%s\", 有效值为: \"plain\" 或者 \"tar\""
+
+#: pg_basebackup.c:2349
+#, c-format
+msgid "invalid wal-method option \"%s\", must be \"fetch\", \"stream\", or \"none\""
+msgstr "无效的wal-method 选项: \"%s\", 必须是: \"fetch\" 或者 \"stream\" 或者 \"none\""
+
+#: pg_basebackup.c:2377 pg_receivewal.c:580
+#, c-format
+msgid "invalid compression level \"%s\""
+msgstr "无效的压缩级别值: \"%s\""
+
+#: pg_basebackup.c:2388
+#, c-format
+msgid "invalid checkpoint argument \"%s\", must be \"fast\" or \"spread\""
+msgstr "无效的检查点参数: \"%s\", 必须是: \"fast\" 或 \"spread\""
+
+#: pg_basebackup.c:2415 pg_receivewal.c:555 pg_recvlogical.c:820
+#, c-format
+msgid "invalid status interval \"%s\""
+msgstr "无效的状态间隔值: \"%s\""
+
+#: pg_basebackup.c:2445 pg_basebackup.c:2458 pg_basebackup.c:2469
+#: pg_basebackup.c:2480 pg_basebackup.c:2488 pg_basebackup.c:2496
+#: pg_basebackup.c:2506 pg_basebackup.c:2519 pg_basebackup.c:2528
+#: pg_basebackup.c:2539 pg_basebackup.c:2549 pg_basebackup.c:2567
+#: pg_basebackup.c:2576 pg_basebackup.c:2585 pg_receivewal.c:605
+#: pg_receivewal.c:618 pg_receivewal.c:626 pg_receivewal.c:636
+#: pg_receivewal.c:644 pg_receivewal.c:655 pg_recvlogical.c:846
+#: pg_recvlogical.c:859 pg_recvlogical.c:870 pg_recvlogical.c:878
+#: pg_recvlogical.c:886 pg_recvlogical.c:894 pg_recvlogical.c:902
+#: pg_recvlogical.c:910 pg_recvlogical.c:918
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "请用 \"%s --help\" 获取更多的信息.\n"
+
+#: pg_basebackup.c:2456 pg_receivewal.c:616 pg_recvlogical.c:857
+#, c-format
+msgid "too many command-line arguments (first is \"%s\")"
+msgstr "命令行参数太多 (第一个是 \"%s\")"
+
+#: pg_basebackup.c:2468 pg_receivewal.c:654
+#, c-format
+msgid "no target directory specified"
+msgstr "没有指定目标目录"
+
+#: pg_basebackup.c:2479
+#, c-format
+msgid "only tar mode backups can be compressed"
+msgstr "只有tar模式备份才能进行压缩"
+
+#: pg_basebackup.c:2487
+#, c-format
+msgid "cannot stream write-ahead logs in tar mode to stdout"
+msgstr "无法将tar模式下的预写日志流式传输到stdout"
+
+#: pg_basebackup.c:2495
+#, c-format
+msgid "replication slots can only be used with WAL streaming"
+msgstr "复制槽只能和WAL流复制一起使用"
+
+#: pg_basebackup.c:2505
+#, c-format
+msgid "--no-slot cannot be used with slot name"
+msgstr "--no-slot 不能与槽名称一起使用"
+
+#. translator: second %s is an option name
+#: pg_basebackup.c:2517 pg_receivewal.c:634
+#, c-format
+msgid "%s needs a slot to be specified using --slot"
+msgstr "%s需要使用--slot指定一个槽"
+
+#: pg_basebackup.c:2526 pg_basebackup.c:2565 pg_basebackup.c:2574
+#: pg_basebackup.c:2583
+msgid "%s and %s are incompatible options"
+msgstr "%s和%s是互不兼容的选项"
+
+#: pg_basebackup.c:2538
+#, c-format
+msgid "WAL directory location can only be specified in plain mode"
+msgstr "WAL目录的位置只能在简单模式里指定"
+
+#: pg_basebackup.c:2548
+#, c-format
+msgid "WAL directory location must be an absolute path"
+msgstr "WAL目录的位置必须为绝对路径"
+
+#: pg_basebackup.c:2558 pg_receivewal.c:663
+#, c-format
+msgid "this build does not support compression"
+msgstr "这个编译版本不支持压缩"
+
+#: pg_basebackup.c:2643
+#, c-format
+msgid "could not create symbolic link \"%s\": %m"
+msgstr "无法创建符号链接 \"%s\": %m"
+
+#: pg_basebackup.c:2647
+#, c-format
+msgid "symlinks are not supported on this platform"
+msgstr "在这个平台上不支持符号链接"
+
+#: pg_receivewal.c:77
+#, c-format
+msgid ""
+"%s receives PostgreSQL streaming write-ahead logs.\n"
+"\n"
+msgstr ""
+"%s 接收PostgreSQL的流预写日志.\n"
+"\n"
+
+#: pg_receivewal.c:81 pg_recvlogical.c:81
+#, c-format
+msgid ""
+"\n"
+"Options:\n"
+msgstr ""
+"\n"
+"选项:\n"
+
+#: pg_receivewal.c:82
+#, c-format
+msgid " -D, --directory=DIR receive write-ahead log files into this directory\n"
+msgstr " -D, --directory=DIR 接收预写日志到指定的目录\n"
+
+#: pg_receivewal.c:83 pg_recvlogical.c:82
+#, c-format
+msgid " -E, --endpos=LSN exit after receiving the specified LSN\n"
+msgstr " -E, --endpos=LSN 收到指定LSN后退出\n"
+
+#: pg_receivewal.c:84 pg_recvlogical.c:86
+#, c-format
+msgid " --if-not-exists do not error if slot already exists when creating a slot\n"
+msgstr " --if-not-exists 在创建一个槽时如果槽已经存在则不产生错误\n"
+
+#: pg_receivewal.c:85 pg_recvlogical.c:88
+#, c-format
+msgid " -n, --no-loop do not loop on connection lost\n"
+msgstr " -n, --no-loop 连接丢失时不进行循环处理\n"
+
+#: pg_receivewal.c:86
+#, c-format
+msgid " --no-sync do not wait for changes to be written safely to disk\n"
+msgstr " --no-sync 不用等待变化安全写入磁盘\n"
+
+#: pg_receivewal.c:87 pg_recvlogical.c:93
+#, c-format
+msgid ""
+" -s, --status-interval=SECS\n"
+" time between status packets sent to server (default: %d)\n"
+msgstr ""
+" -s, --status-interval=SECS\n"
+" 发往服务器的状态包的时间间隔 (默认为: %d)\n"
+
+#: pg_receivewal.c:90
+#, c-format
+msgid " --synchronous flush write-ahead log immediately after writing\n"
+msgstr " --synchronous 在写入后立即刷写预写日志\n"
+
+#: pg_receivewal.c:93
+#, c-format
+msgid " -Z, --compress=0-9 compress logs with given compression level\n"
+msgstr " -Z, --compress=0-9 按给定的压缩级别对日志文件进行压缩\n"
+
+#: pg_receivewal.c:102
+#, c-format
+msgid ""
+"\n"
+"Optional actions:\n"
+msgstr ""
+"\n"
+"可选动作:\n"
+
+#: pg_receivewal.c:103 pg_recvlogical.c:78
+#, c-format
+msgid " --create-slot create a new replication slot (for the slot's name see --slot)\n"
+msgstr " --create-slot 创建新的复制槽(槽名请参考选项 --slot)\n"
+
+#: pg_receivewal.c:104 pg_recvlogical.c:79
+#, c-format
+msgid " --drop-slot drop the replication slot (for the slot's name see --slot)\n"
+msgstr " --drop-slot 删除复制槽 (槽名请参考选项 --slot)\n"
+
+#: pg_receivewal.c:117
+#, c-format
+msgid "finished segment at %X/%X (timeline %u)"
+msgstr "在 %X/%X (时间线 %u)处完成段"
+
+#: pg_receivewal.c:124
+#, c-format
+msgid "stopped log streaming at %X/%X (timeline %u)"
+msgstr "在时间点: %X/%X (时间线%u)停止日志的流操作"
+
+#: pg_receivewal.c:140
+#, c-format
+msgid "switched to timeline %u at %X/%X"
+msgstr "切换到时间表 %u 在 %X/%X"
+
+#: pg_receivewal.c:150
+#, c-format
+msgid "received interrupt signal, exiting"
+msgstr "接收到终断信号, 正在退出"
+
+#: pg_receivewal.c:186
+#, c-format
+msgid "could not close directory \"%s\": %m"
+msgstr "无法关闭目录 \"%s\": %m"
+
+#: pg_receivewal.c:272
+msgid "segment file \"%s\" has incorrect size %lld, skipping"
+msgstr "段文件 \"%s\" 大小值: %lld不正确, 跳过"
+
+#: pg_receivewal.c:290
+#, c-format
+msgid "could not open compressed file \"%s\": %m"
+msgstr "无法打开压缩文件 \"%s\": %m"
+
+#: pg_receivewal.c:296
+#, c-format
+msgid "could not seek in compressed file \"%s\": %m"
+msgstr "无法在压缩文件\"%s\"进行查找: %m"
+
+#: pg_receivewal.c:304
+#, c-format
+msgid "could not read compressed file \"%s\": %m"
+msgstr "无法读取压缩文件\"%s\": %m"
+
+#: pg_receivewal.c:307
+#, c-format
+msgid "could not read compressed file \"%s\": read %d of %zu"
+msgstr "无法读取压缩的文件\"%1$s\":读取了%3$zu中的%2$d"
+
+#: pg_receivewal.c:318
+#, c-format
+msgid "compressed segment file \"%s\" has incorrect uncompressed size %d, skipping"
+msgstr "压缩的段文件\"%s\"未压缩大小值: %d不正确, 跳过"
+
+#: pg_receivewal.c:422
+#, c-format
+msgid "starting log streaming at %X/%X (timeline %u)"
+msgstr "在时间点: %X/%X (时间线%u)启动日志的流操作"
+
+#: pg_receivewal.c:537 pg_recvlogical.c:762
+#, c-format
+msgid "invalid port number \"%s\""
+msgstr "无效端口号: \"%s\""
+
+#: pg_receivewal.c:565 pg_recvlogical.c:788
+#, c-format
+msgid "could not parse end position \"%s\""
+msgstr "无法解析结束位置\"%s\""
+
+#: pg_receivewal.c:625
+#, c-format
+msgid "cannot use --create-slot together with --drop-slot"
+msgstr "不能把--create-slot和--drop-slot一起使用"
+
+#: pg_receivewal.c:643
+#, c-format
+msgid "cannot use --synchronous together with --no-sync"
+msgstr "不能把--synchronous和--no-sync一起使用"
+
+#: pg_receivewal.c:719
+#, c-format
+msgid "replication connection using slot \"%s\" is unexpectedly database specific"
+msgstr "使用槽\"%s\"的复制连接意外地不是指定的数据库"
+
+#: pg_receivewal.c:730 pg_recvlogical.c:966
+#, c-format
+msgid "dropping replication slot \"%s\""
+msgstr "删除复制槽\"%s\""
+
+#: pg_receivewal.c:741 pg_recvlogical.c:976
+#, c-format
+msgid "creating replication slot \"%s\""
+msgstr "创建复制槽 \"%s\""
+
+#: pg_receivewal.c:767 pg_recvlogical.c:1001
+#, c-format
+msgid "disconnected"
+msgstr "连接已断开"
+
+#. translator: check source for value for %d
+#: pg_receivewal.c:773 pg_recvlogical.c:1007
+#, c-format
+msgid "disconnected; waiting %d seconds to try again"
+msgstr "连接已断开, 将于%d 秒后尝试重连"
+
+#: pg_recvlogical.c:73
+#, c-format
+msgid ""
+"%s controls PostgreSQL logical decoding streams.\n"
+"\n"
+msgstr ""
+"%s 控制PostgreSQL逻辑解码流。\n"
+"\n"
+
+#: pg_recvlogical.c:77
+#, c-format
+msgid ""
+"\n"
+"Action to be performed:\n"
+msgstr ""
+"\n"
+"即将执行的动作:\n"
+
+#: pg_recvlogical.c:80
+#, c-format
+msgid " --start start streaming in a replication slot (for the slot's name see --slot)\n"
+msgstr " --start 复制槽中启动流复制(槽名请参考选项 --slot)\n"
+
+#: pg_recvlogical.c:83
+#, c-format
+msgid " -f, --file=FILE receive log into this file, - for stdout\n"
+msgstr " -f, --file=FILE 接收日志到这个文件, - 为标准输出\n"
+
+#: pg_recvlogical.c:84
+#, c-format
+msgid ""
+" -F --fsync-interval=SECS\n"
+" time between fsyncs to the output file (default: %d)\n"
+msgstr ""
+" -F --fsync-interval=SECS\n"
+" 写往输出文件的文件同步的时间间隔 (默认值为: %d)\n"
+
+#: pg_recvlogical.c:87
+#, c-format
+msgid " -I, --startpos=LSN where in an existing slot should the streaming start\n"
+msgstr " -I, --startpos=LSN 在当前槽中流复制启动的起始位置\n"
+
+#: pg_recvlogical.c:89
+#, c-format
+msgid ""
+" -o, --option=NAME[=VALUE]\n"
+" pass option NAME with optional value VALUE to the\n"
+" output plugin\n"
+msgstr ""
+" -o, --option=NAME[=VALUE]\n"
+" 选项NAME附带可选值VALUE给\n"
+" 输出插件\n"
+
+#: pg_recvlogical.c:92
+#, c-format
+msgid " -P, --plugin=PLUGIN use output plugin PLUGIN (default: %s)\n"
+msgstr " -P, --plugin=PLUGIN 使用输出插件PLUGIN (默认为: %s)\n"
+
+#: pg_recvlogical.c:95
+#, c-format
+msgid " -S, --slot=SLOTNAME name of the logical replication slot\n"
+msgstr " -S, --slot=SLOTNAME 逻辑复制槽的名字\n"
+
+#: pg_recvlogical.c:100
+#, c-format
+msgid " -d, --dbname=DBNAME database to connect to\n"
+msgstr " -d, --dbname=DBNAME 要连接的目标数据库\n"
+
+#: pg_recvlogical.c:133
+#, c-format
+msgid "confirming write up to %X/%X, flush to %X/%X (slot %s)"
+msgstr "确认上写至%X/%X, 并刷写回至 %X/%X (槽 %s)"
+
+#: pg_recvlogical.c:157 receivelog.c:351
+#, c-format
+msgid "could not send feedback packet: %s"
+msgstr "无法发送回馈包: %s"
+
+#: pg_recvlogical.c:230
+#, c-format
+msgid "starting log streaming at %X/%X (slot %s)"
+msgstr "在%X/%X (槽 %s)位置启动日志流"
+
+#: pg_recvlogical.c:271
+#, c-format
+msgid "streaming initiated"
+msgstr "流已初始化"
+
+#: pg_recvlogical.c:335
+#, c-format
+msgid "could not open log file \"%s\": %m"
+msgstr "无法打开事务日志文件 \"%s\": %m"
+
+#: pg_recvlogical.c:361 receivelog.c:881
+#, c-format
+msgid "invalid socket: %s"
+msgstr "无效套接字: %s"
+
+#: pg_recvlogical.c:414 receivelog.c:909
+msgid "%s() failed: %m"
+msgstr "%s()失败: %m"
+
+#: pg_recvlogical.c:421 receivelog.c:959
+#, c-format
+msgid "could not receive data from WAL stream: %s"
+msgstr "无法从WAL流中获得数据: %s"
+
+#: pg_recvlogical.c:463 pg_recvlogical.c:514 receivelog.c:1003
+#: receivelog.c:1069
+#, c-format
+msgid "streaming header too small: %d"
+msgstr "流头大小: %d 值太小"
+
+#: pg_recvlogical.c:498 receivelog.c:841
+#, c-format
+msgid "unrecognized streaming header: \"%c\""
+msgstr "无法识别的流头: \"%c\""
+
+#: pg_recvlogical.c:552 pg_recvlogical.c:564
+#, c-format
+msgid "could not write %u bytes to log file \"%s\": %m"
+msgstr "无法写入 %u 字节到日志文件 \"%s\": %m"
+
+#: pg_recvlogical.c:618 receivelog.c:637 receivelog.c:674
+#, c-format
+msgid "unexpected termination of replication stream: %s"
+msgstr "流复制异常终止: %s"
+
+#: pg_recvlogical.c:742
+#, c-format
+msgid "invalid fsync interval \"%s\""
+msgstr "无效的fsync同步时间间隔值: \"%s\""
+
+#: pg_recvlogical.c:780
+#, c-format
+msgid "could not parse start position \"%s\""
+msgstr "无法解析起始位置\"%s\""
+
+#: pg_recvlogical.c:869
+#, c-format
+msgid "no slot specified"
+msgstr "没有指定槽"
+
+#: pg_recvlogical.c:877
+#, c-format
+msgid "no target file specified"
+msgstr "没有指定目标文件"
+
+#: pg_recvlogical.c:885
+#, c-format
+msgid "no database specified"
+msgstr "没有指定数据库"
+
+#: pg_recvlogical.c:893
+#, c-format
+msgid "at least one action needs to be specified"
+msgstr "至少要指定一个操作"
+
+#: pg_recvlogical.c:901
+#, c-format
+msgid "cannot use --create-slot or --start together with --drop-slot"
+msgstr "不能使用 --create-slot 选项或 同时使用--start和--drop-slot两个选项"
+
+#: pg_recvlogical.c:909
+#, c-format
+msgid "cannot use --create-slot or --drop-slot together with --startpos"
+msgstr "不能使用 --create-slot 选项或 同时使用--drop-slot和--startpos两个选项"
+
+#: pg_recvlogical.c:917
+#, c-format
+msgid "--endpos may only be specified with --start"
+msgstr "只能用--start选项指定--endpos选项"
+
+#: pg_recvlogical.c:948
+#, c-format
+msgid "could not establish database-specific replication connection"
+msgstr "无法建立数据库相关的复制连接"
+
+#: pg_recvlogical.c:1047
+msgid "end position %X/%X reached by keepalive"
+msgstr "keepalive已到达结束位置%X/%X"
+
+#: pg_recvlogical.c:1050
+msgid "end position %X/%X reached by WAL record at %X/%X"
+msgstr "记录在%X/%X到达了结束位置%X/%X"
+
+#: receivelog.c:68
+#, c-format
+msgid "could not create archive status file \"%s\": %s"
+msgstr "无法创建归档状态文件 \"%s\": %s"
+
+#: receivelog.c:118
+#, c-format
+msgid "could not get size of write-ahead log file \"%s\": %s"
+msgstr "无法获得预写日志文件\"%s\"的大小: %s"
+
+#: receivelog.c:129
+#, c-format
+msgid "could not open existing write-ahead log file \"%s\": %s"
+msgstr "无法打开存在的预写日志文件\"%s\": %s"
+
+#: receivelog.c:138
+#, c-format
+msgid "could not fsync existing write-ahead log file \"%s\": %s"
+msgstr "无法同步存在的预写日志文件\"%s\": %s"
+
+#: receivelog.c:153
+#, c-format
+msgid "write-ahead log file \"%s\" has %d byte, should be 0 or %d"
+msgid_plural "write-ahead log file \"%s\" has %d bytes, should be 0 or %d"
+msgstr[0] "预写日志文件 \"%s\"有%d个字节,应该是0或者 %d"
+msgstr[1] "预写日志文件 \"%s\"有%d个字节,应该是0或者 %d"
+
+#: receivelog.c:169
+#, c-format
+msgid "could not open write-ahead log file \"%s\": %s"
+msgstr "无法打开预写日志文件 \"%s\": %s"
+
+#: receivelog.c:197
+#, c-format
+msgid "could not determine seek position in file \"%s\": %s"
+msgstr "无法确定文件 \"%s\"的当前位置: %s"
+
+#: receivelog.c:211
+#, c-format
+msgid "not renaming \"%s%s\", segment is not complete"
+msgstr "没有重命名 \"%s%s\", 段不完整"
+
+#: receivelog.c:223 receivelog.c:308 receivelog.c:683
+#, c-format
+msgid "could not close file \"%s\": %s"
+msgstr "无法关闭文件\"%s\": %s"
+
+#: receivelog.c:280
+#, c-format
+msgid "server reported unexpected history file name for timeline %u: %s"
+msgstr "服务器为时间表报告生成的意外历史文件名 %u:%s"
+
+#: receivelog.c:288
+#, c-format
+msgid "could not create timeline history file \"%s\": %s"
+msgstr "无法创建时间表历史文件 \"%s\": %s"
+
+#: receivelog.c:295
+#, c-format
+msgid "could not write timeline history file \"%s\": %s"
+msgstr "无法写时间表历史文件 \"%s\": %s"
+
+#: receivelog.c:385
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions older than %s"
+msgstr "不兼容的服务器版本号 %s; 当服务器版本低于%s时客户端不支持流复制"
+
+#: receivelog.c:394
+#, c-format
+msgid "incompatible server version %s; client does not support streaming from server versions newer than %s"
+msgstr "不兼容的服务器版本号 %s; 当服务器版本高于%s时客户端不支持流复制"
+
+#: receivelog.c:496 streamutil.c:430 streamutil.c:467
+#, c-format
+msgid "could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "无法识别系统: 得到 %d 行和 %d 列, 期望值为: %d 行和 %d 列"
+
+#: receivelog.c:503
+#, c-format
+msgid "system identifier does not match between base backup and streaming connection"
+msgstr "基础备份和流连接的系统标识符不匹配"
+
+#: receivelog.c:509
+#, c-format
+msgid "starting timeline %u is not present in the server"
+msgstr "服务器上没有起始时间表 %u"
+
+#: receivelog.c:550
+#, c-format
+msgid "unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "获得命令TIMELINE_HISTORY的意外响应: 得到 %d 行和 %d 列, 期望值为: %d 行和 %d 列"
+
+#: receivelog.c:621
+#, c-format
+msgid "server reported unexpected next timeline %u, following timeline %u"
+msgstr "服务器报出的下次意外时间表 %u, 紧跟时间表 %u之后"
+
+#: receivelog.c:627
+#, c-format
+msgid "server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X"
+msgstr "服务器在%2$X/%3$X时停止流操作时间表%1$u, 但是报出将在%5$X/%6$X时开始下一个时间表%4$u"
+
+#: receivelog.c:667
+#, c-format
+msgid "replication stream was terminated before stop point"
+msgstr "流复制在停止点之前异常终止"
+
+#: receivelog.c:713
+#, c-format
+msgid "unexpected result set after end-of-timeline: got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "终点时间表的意外结果集: 得到 %d 行和 %d 列, 期望值为: %d 行和 %d 列"
+
+#: receivelog.c:722
+#, c-format
+msgid "could not parse next timeline's starting point \"%s\""
+msgstr "无法解析下次时间表的起始点\"%s\""
+
+#: receivelog.c:771 receivelog.c:1023
+#, c-format
+msgid "could not fsync file \"%s\": %s"
+msgstr "无法 fsync 文件 \"%s\": %s"
+
+#: receivelog.c:1086
+#, c-format
+msgid "received write-ahead log record for offset %u with no file open"
+msgstr "偏移位置 %u 处接收到的预写日志记录没有打开文件"
+
+#: receivelog.c:1096
+#, c-format
+msgid "got WAL data offset %08x, expected %08x"
+msgstr "得到WAL数据偏移 %08x, 期望值为 %08x"
+
+#: receivelog.c:1130
+#, c-format
+msgid "could not write %u bytes to WAL file \"%s\": %s"
+msgstr "无法写入 %u 字节到 WAL 文件 \"%s\": %s"
+
+#: receivelog.c:1155 receivelog.c:1195 receivelog.c:1225
+#, c-format
+msgid "could not send copy-end packet: %s"
+msgstr "无法发送副本结束包: %s"
+
+#: streamutil.c:162
+msgid "Password: "
+msgstr "口令: "
+
+#: streamutil.c:186
+#, c-format
+msgid "could not connect to server"
+msgstr "无法连接到服务器"
+
+#: streamutil.c:231
+#, c-format
+msgid "could not clear search_path: %s"
+msgstr "无法清除search_path: %s"
+
+#: streamutil.c:247
+#, c-format
+msgid "could not determine server setting for integer_datetimes"
+msgstr "无法确定服务器上integer_datetimes的配置"
+
+#: streamutil.c:254
+#, c-format
+msgid "integer_datetimes compile flag does not match server"
+msgstr "integer_datetimes编译开关与服务器端不匹配"
+
+#: streamutil.c:305
+#, c-format
+msgid "could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "无法获取WAL段的大小:得到 %d 行和 %d 列, 期望值为: %d 行和 %d 列"
+
+#: streamutil.c:315
+#, c-format
+msgid "WAL segment size could not be parsed"
+msgstr "不能解析WAL段的大小"
+
+#: streamutil.c:333
+#, c-format
+msgid "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"
+msgid_plural "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"
+msgstr[0] "WAL段的大小必须是2的幂次方(在1MB和1GB之间),但是远程服务器报告的值是%d字节"
+msgstr[1] " WAL段的大小必须是2的幂次方(在1MB和1GB之间),但是远程服务器报告的值是%d字节"
+
+#: streamutil.c:378
+#, c-format
+msgid "could not fetch group access flag: got %d rows and %d fields, expected %d rows and %d or more fields"
+msgstr "无法获取组访问标志:得到 %d 行和 %d 列,期望值为: %d 行和 %d 列"
+
+#: streamutil.c:387
+#, c-format
+msgid "group access flag could not be parsed: %s"
+msgstr "不能解析组访问标志: %s"
+
+#: streamutil.c:544
+#, c-format
+msgid "could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "无法创建复制槽 \"%s\": 得到%d行%d列, 但期望值为%d行%d列"
+
+#: streamutil.c:588
+#, c-format
+msgid "could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields"
+msgstr "无法删除复制槽 \"%s\": 得到%d行%d列, 但期望值为%d行%d列"
+
+#: walmethods.c:467 walmethods.c:980
+msgid "could not compress data"
+msgstr "无法压缩数据"
+
+#: walmethods.c:499
+msgid "could not reset compression stream"
+msgstr "无法重置压缩流"
+
+#: walmethods.c:608
+msgid "could not initialize compression library"
+msgstr "无法初始化压缩库"
+
+#: walmethods.c:620
+msgid "implementation error: tar files can't have more than one open file"
+msgstr "实现错误:tar文件不能有多个打开的文件"
+
+#: walmethods.c:634
+msgid "could not create tar header"
+msgstr "无法创建tar头"
+
+#: walmethods.c:650 walmethods.c:692 walmethods.c:895 walmethods.c:907
+msgid "could not change compression parameters"
+msgstr "无法更改压缩参数"
+
+#: walmethods.c:782
+msgid "unlink not supported with compression"
+msgstr "压缩不支持取消链接"
+
+#: walmethods.c:1005
+msgid "could not close compression stream"
+msgstr "无法关闭压缩流"
+
diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c
new file mode 100644
index 0000000..682081b
--- /dev/null
+++ b/src/bin/pg_basebackup/receivelog.c
@@ -0,0 +1,1276 @@
+/*-------------------------------------------------------------------------
+ *
+ * receivelog.c - receive WAL files using the streaming
+ * replication protocol.
+ *
+ * Author: Magnus Hagander <magnus@hagander.net>
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_basebackup/receivelog.c
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <sys/stat.h>
+#include <unistd.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#include "access/xlog_internal.h"
+#include "common/file_utils.h"
+#include "common/logging.h"
+#include "libpq-fe.h"
+#include "receivelog.h"
+#include "streamutil.h"
+
+/* fd and filename for currently open WAL file */
+static Walfile *walfile = NULL;
+static char current_walfile_name[MAXPGPATH] = "";
+static bool reportFlushPosition = false;
+static XLogRecPtr lastFlushPosition = InvalidXLogRecPtr;
+
+static bool still_sending = true; /* feedback still needs to be sent? */
+
+static PGresult *HandleCopyStream(PGconn *conn, StreamCtl *stream,
+ XLogRecPtr *stoppos);
+static int CopyStreamPoll(PGconn *conn, long timeout_ms, pgsocket stop_socket);
+static int CopyStreamReceive(PGconn *conn, long timeout, pgsocket stop_socket,
+ char **buffer);
+static bool ProcessKeepaliveMsg(PGconn *conn, StreamCtl *stream, char *copybuf,
+ int len, XLogRecPtr blockpos, TimestampTz *last_status);
+static bool ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len,
+ XLogRecPtr *blockpos);
+static PGresult *HandleEndOfCopyStream(PGconn *conn, StreamCtl *stream, char *copybuf,
+ XLogRecPtr blockpos, XLogRecPtr *stoppos);
+static bool CheckCopyStreamStop(PGconn *conn, StreamCtl *stream, XLogRecPtr blockpos);
+static long CalculateCopyStreamSleeptime(TimestampTz now, int standby_message_timeout,
+ TimestampTz last_status);
+
+static bool ReadEndOfStreamingResult(PGresult *res, XLogRecPtr *startpos,
+ uint32 *timeline);
+
+static bool
+mark_file_as_archived(StreamCtl *stream, const char *fname)
+{
+ Walfile *f;
+ static char tmppath[MAXPGPATH];
+
+ snprintf(tmppath, sizeof(tmppath), "archive_status/%s.done",
+ fname);
+
+ f = stream->walmethod->open_for_write(tmppath, NULL, 0);
+ if (f == NULL)
+ {
+ pg_log_error("could not create archive status file \"%s\": %s",
+ tmppath, stream->walmethod->getlasterror());
+ return false;
+ }
+
+ if (stream->walmethod->close(f, CLOSE_NORMAL) != 0)
+ {
+ pg_log_error("could not close archive status file \"%s\": %s",
+ tmppath, stream->walmethod->getlasterror());
+ return false;
+ }
+
+ return true;
+}
+
+/*
+ * Open a new WAL file in the specified directory.
+ *
+ * Returns true if OK; on failure, returns false after printing an error msg.
+ * On success, 'walfile' is set to the FD for the file, and the base filename
+ * (without partial_suffix) is stored in 'current_walfile_name'.
+ *
+ * The file will be padded to 16Mb with zeroes.
+ */
+static bool
+open_walfile(StreamCtl *stream, XLogRecPtr startpoint)
+{
+ Walfile *f;
+ char *fn;
+ ssize_t size;
+ XLogSegNo segno;
+
+ XLByteToSeg(startpoint, segno, WalSegSz);
+ XLogFileName(current_walfile_name, stream->timeline, segno, WalSegSz);
+
+ /* Note that this considers the compression used if necessary */
+ fn = stream->walmethod->get_file_name(current_walfile_name,
+ stream->partial_suffix);
+
+ /*
+ * When streaming to files, if an existing file exists we verify that it's
+ * either empty (just created), or a complete WalSegSz segment (in which
+ * case it has been created and padded). Anything else indicates a corrupt
+ * file. Compressed files have no need for padding, so just ignore this
+ * case.
+ *
+ * When streaming to tar, no file with this name will exist before, so we
+ * never have to verify a size.
+ */
+ if (stream->walmethod->compression() == 0 &&
+ stream->walmethod->existsfile(fn))
+ {
+ size = stream->walmethod->get_file_size(fn);
+ if (size < 0)
+ {
+ pg_log_error("could not get size of write-ahead log file \"%s\": %s",
+ fn, stream->walmethod->getlasterror());
+ pg_free(fn);
+ return false;
+ }
+ if (size == WalSegSz)
+ {
+ /* Already padded file. Open it for use */
+ f = stream->walmethod->open_for_write(current_walfile_name, stream->partial_suffix, 0);
+ if (f == NULL)
+ {
+ pg_log_error("could not open existing write-ahead log file \"%s\": %s",
+ fn, stream->walmethod->getlasterror());
+ pg_free(fn);
+ return false;
+ }
+
+ /* fsync file in case of a previous crash */
+ if (stream->walmethod->sync(f) != 0)
+ {
+ pg_log_fatal("could not fsync existing write-ahead log file \"%s\": %s",
+ fn, stream->walmethod->getlasterror());
+ stream->walmethod->close(f, CLOSE_UNLINK);
+ exit(1);
+ }
+
+ walfile = f;
+ pg_free(fn);
+ return true;
+ }
+ if (size != 0)
+ {
+ /* if write didn't set errno, assume problem is no disk space */
+ if (errno == 0)
+ errno = ENOSPC;
+ pg_log_error(ngettext("write-ahead log file \"%s\" has %d byte, should be 0 or %d",
+ "write-ahead log file \"%s\" has %d bytes, should be 0 or %d",
+ size),
+ fn, (int) size, WalSegSz);
+ pg_free(fn);
+ return false;
+ }
+ /* File existed and was empty, so fall through and open */
+ }
+
+ /* No file existed, so create one */
+
+ f = stream->walmethod->open_for_write(current_walfile_name,
+ stream->partial_suffix, WalSegSz);
+ if (f == NULL)
+ {
+ pg_log_error("could not open write-ahead log file \"%s\": %s",
+ fn, stream->walmethod->getlasterror());
+ pg_free(fn);
+ return false;
+ }
+
+ pg_free(fn);
+ walfile = f;
+ return true;
+}
+
+/*
+ * Close the current WAL file (if open), and rename it to the correct
+ * filename if it's complete. On failure, prints an error message to stderr
+ * and returns false, otherwise returns true.
+ */
+static bool
+close_walfile(StreamCtl *stream, XLogRecPtr pos)
+{
+ off_t currpos;
+ int r;
+
+ if (walfile == NULL)
+ return true;
+
+ currpos = stream->walmethod->get_current_pos(walfile);
+ if (currpos == -1)
+ {
+ pg_log_error("could not determine seek position in file \"%s\": %s",
+ current_walfile_name, stream->walmethod->getlasterror());
+ stream->walmethod->close(walfile, CLOSE_UNLINK);
+ walfile = NULL;
+
+ return false;
+ }
+
+ if (stream->partial_suffix)
+ {
+ if (currpos == WalSegSz)
+ r = stream->walmethod->close(walfile, CLOSE_NORMAL);
+ else
+ {
+ pg_log_info("not renaming \"%s%s\", segment is not complete",
+ current_walfile_name, stream->partial_suffix);
+ r = stream->walmethod->close(walfile, CLOSE_NO_RENAME);
+ }
+ }
+ else
+ r = stream->walmethod->close(walfile, CLOSE_NORMAL);
+
+ walfile = NULL;
+
+ if (r != 0)
+ {
+ pg_log_error("could not close file \"%s\": %s",
+ current_walfile_name, stream->walmethod->getlasterror());
+ return false;
+ }
+
+ /*
+ * Mark file as archived if requested by the caller - pg_basebackup needs
+ * to do so as files can otherwise get archived again after promotion of a
+ * new node. This is in line with walreceiver.c always doing a
+ * XLogArchiveForceDone() after a complete segment.
+ */
+ if (currpos == WalSegSz && stream->mark_done)
+ {
+ /* writes error message if failed */
+ if (!mark_file_as_archived(stream, current_walfile_name))
+ return false;
+ }
+
+ lastFlushPosition = pos;
+ return true;
+}
+
+
+/*
+ * Check if a timeline history file exists.
+ */
+static bool
+existsTimeLineHistoryFile(StreamCtl *stream)
+{
+ char histfname[MAXFNAMELEN];
+
+ /*
+ * Timeline 1 never has a history file. We treat that as if it existed,
+ * since we never need to stream it.
+ */
+ if (stream->timeline == 1)
+ return true;
+
+ TLHistoryFileName(histfname, stream->timeline);
+
+ return stream->walmethod->existsfile(histfname);
+}
+
+static bool
+writeTimeLineHistoryFile(StreamCtl *stream, char *filename, char *content)
+{
+ int size = strlen(content);
+ char histfname[MAXFNAMELEN];
+ Walfile *f;
+
+ /*
+ * Check that the server's idea of how timeline history files should be
+ * named matches ours.
+ */
+ TLHistoryFileName(histfname, stream->timeline);
+ if (strcmp(histfname, filename) != 0)
+ {
+ pg_log_error("server reported unexpected history file name for timeline %u: %s",
+ stream->timeline, filename);
+ return false;
+ }
+
+ f = stream->walmethod->open_for_write(histfname, ".tmp", 0);
+ if (f == NULL)
+ {
+ pg_log_error("could not create timeline history file \"%s\": %s",
+ histfname, stream->walmethod->getlasterror());
+ return false;
+ }
+
+ if ((int) stream->walmethod->write(f, content, size) != size)
+ {
+ pg_log_error("could not write timeline history file \"%s\": %s",
+ histfname, stream->walmethod->getlasterror());
+
+ /*
+ * If we fail to make the file, delete it to release disk space
+ */
+ stream->walmethod->close(f, CLOSE_UNLINK);
+
+ return false;
+ }
+
+ if (stream->walmethod->close(f, CLOSE_NORMAL) != 0)
+ {
+ pg_log_error("could not close file \"%s\": %s",
+ histfname, stream->walmethod->getlasterror());
+ return false;
+ }
+
+ /* Maintain archive_status, check close_walfile() for details. */
+ if (stream->mark_done)
+ {
+ /* writes error message if failed */
+ if (!mark_file_as_archived(stream, histfname))
+ return false;
+ }
+
+ return true;
+}
+
+/*
+ * Send a Standby Status Update message to server.
+ */
+static bool
+sendFeedback(PGconn *conn, XLogRecPtr blockpos, TimestampTz now, bool replyRequested)
+{
+ char replybuf[1 + 8 + 8 + 8 + 8 + 1];
+ int len = 0;
+
+ replybuf[len] = 'r';
+ len += 1;
+ fe_sendint64(blockpos, &replybuf[len]); /* write */
+ len += 8;
+ if (reportFlushPosition)
+ fe_sendint64(lastFlushPosition, &replybuf[len]); /* flush */
+ else
+ fe_sendint64(InvalidXLogRecPtr, &replybuf[len]); /* flush */
+ len += 8;
+ fe_sendint64(InvalidXLogRecPtr, &replybuf[len]); /* apply */
+ len += 8;
+ fe_sendint64(now, &replybuf[len]); /* sendTime */
+ len += 8;
+ replybuf[len] = replyRequested ? 1 : 0; /* replyRequested */
+ len += 1;
+
+ if (PQputCopyData(conn, replybuf, len) <= 0 || PQflush(conn))
+ {
+ pg_log_error("could not send feedback packet: %s",
+ PQerrorMessage(conn));
+ return false;
+ }
+
+ return true;
+}
+
+/*
+ * Check that the server version we're connected to is supported by
+ * ReceiveXlogStream().
+ *
+ * If it's not, an error message is printed to stderr, and false is returned.
+ */
+bool
+CheckServerVersionForStreaming(PGconn *conn)
+{
+ int minServerMajor,
+ maxServerMajor;
+ int serverMajor;
+
+ /*
+ * The message format used in streaming replication changed in 9.3, so we
+ * cannot stream from older servers. And we don't support servers newer
+ * than the client; it might work, but we don't know, so err on the safe
+ * side.
+ */
+ minServerMajor = 903;
+ maxServerMajor = PG_VERSION_NUM / 100;
+ serverMajor = PQserverVersion(conn) / 100;
+ if (serverMajor < minServerMajor)
+ {
+ const char *serverver = PQparameterStatus(conn, "server_version");
+
+ pg_log_error("incompatible server version %s; client does not support streaming from server versions older than %s",
+ serverver ? serverver : "'unknown'",
+ "9.3");
+ return false;
+ }
+ else if (serverMajor > maxServerMajor)
+ {
+ const char *serverver = PQparameterStatus(conn, "server_version");
+
+ pg_log_error("incompatible server version %s; client does not support streaming from server versions newer than %s",
+ serverver ? serverver : "'unknown'",
+ PG_VERSION);
+ return false;
+ }
+ return true;
+}
+
+/*
+ * Receive a log stream starting at the specified position.
+ *
+ * Individual parameters are passed through the StreamCtl structure.
+ *
+ * If sysidentifier is specified, validate that both the system
+ * identifier and the timeline matches the specified ones
+ * (by sending an extra IDENTIFY_SYSTEM command)
+ *
+ * All received segments will be written to the directory
+ * specified by basedir. This will also fetch any missing timeline history
+ * files.
+ *
+ * The stream_stop callback will be called every time data
+ * is received, and whenever a segment is completed. If it returns
+ * true, the streaming will stop and the function
+ * return. As long as it returns false, streaming will continue
+ * indefinitely.
+ *
+ * If stream_stop() checks for external input, stop_socket should be set to
+ * the FD it checks. This will allow such input to be detected promptly
+ * rather than after standby_message_timeout (which might be indefinite).
+ * Note that signals will interrupt waits for input as well, but that is
+ * race-y since a signal received while busy won't interrupt the wait.
+ *
+ * standby_message_timeout controls how often we send a message
+ * back to the primary letting it know our progress, in milliseconds.
+ * Zero means no messages are sent.
+ * This message will only contain the write location, and never
+ * flush or replay.
+ *
+ * If 'partial_suffix' is not NULL, files are initially created with the
+ * given suffix, and the suffix is removed once the file is finished. That
+ * allows you to tell the difference between partial and completed files,
+ * so that you can continue later where you left.
+ *
+ * If 'synchronous' is true, the received WAL is flushed as soon as written,
+ * otherwise only when the WAL file is closed.
+ *
+ * Note: The WAL location *must* be at a log segment start!
+ */
+bool
+ReceiveXlogStream(PGconn *conn, StreamCtl *stream)
+{
+ char query[128];
+ char slotcmd[128];
+ PGresult *res;
+ XLogRecPtr stoppos;
+
+ /*
+ * The caller should've checked the server version already, but doesn't do
+ * any harm to check it here too.
+ */
+ if (!CheckServerVersionForStreaming(conn))
+ return false;
+
+ /*
+ * Decide whether we want to report the flush position. If we report the
+ * flush position, the primary will know what WAL we'll possibly
+ * re-request, and it can then remove older WAL safely. We must always do
+ * that when we are using slots.
+ *
+ * Reporting the flush position makes one eligible as a synchronous
+ * replica. People shouldn't include generic names in
+ * synchronous_standby_names, but we've protected them against it so far,
+ * so let's continue to do so unless specifically requested.
+ */
+ if (stream->replication_slot != NULL)
+ {
+ reportFlushPosition = true;
+ sprintf(slotcmd, "SLOT \"%s\" ", stream->replication_slot);
+ }
+ else
+ {
+ if (stream->synchronous)
+ reportFlushPosition = true;
+ else
+ reportFlushPosition = false;
+ slotcmd[0] = 0;
+ }
+
+ if (stream->sysidentifier != NULL)
+ {
+ /* Validate system identifier hasn't changed */
+ res = PQexec(conn, "IDENTIFY_SYSTEM");
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ {
+ pg_log_error("could not send replication command \"%s\": %s",
+ "IDENTIFY_SYSTEM", PQerrorMessage(conn));
+ PQclear(res);
+ return false;
+ }
+ if (PQntuples(res) != 1 || PQnfields(res) < 3)
+ {
+ pg_log_error("could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields",
+ PQntuples(res), PQnfields(res), 1, 3);
+ PQclear(res);
+ return false;
+ }
+ if (strcmp(stream->sysidentifier, PQgetvalue(res, 0, 0)) != 0)
+ {
+ pg_log_error("system identifier does not match between base backup and streaming connection");
+ PQclear(res);
+ return false;
+ }
+ if (stream->timeline > atoi(PQgetvalue(res, 0, 1)))
+ {
+ pg_log_error("starting timeline %u is not present in the server",
+ stream->timeline);
+ PQclear(res);
+ return false;
+ }
+ PQclear(res);
+ }
+
+ /*
+ * initialize flush position to starting point, it's the caller's
+ * responsibility that that's sane.
+ */
+ lastFlushPosition = stream->startpos;
+
+ while (1)
+ {
+ /*
+ * Fetch the timeline history file for this timeline, if we don't have
+ * it already. When streaming log to tar, this will always return
+ * false, as we are never streaming into an existing file and
+ * therefore there can be no pre-existing timeline history file.
+ */
+ if (!existsTimeLineHistoryFile(stream))
+ {
+ snprintf(query, sizeof(query), "TIMELINE_HISTORY %u", stream->timeline);
+ res = PQexec(conn, query);
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ {
+ /* FIXME: we might send it ok, but get an error */
+ pg_log_error("could not send replication command \"%s\": %s",
+ "TIMELINE_HISTORY", PQresultErrorMessage(res));
+ PQclear(res);
+ return false;
+ }
+
+ /*
+ * The response to TIMELINE_HISTORY is a single row result set
+ * with two fields: filename and content
+ */
+ if (PQnfields(res) != 2 || PQntuples(res) != 1)
+ {
+ pg_log_warning("unexpected response to TIMELINE_HISTORY command: got %d rows and %d fields, expected %d rows and %d fields",
+ PQntuples(res), PQnfields(res), 1, 2);
+ }
+
+ /* Write the history file to disk */
+ writeTimeLineHistoryFile(stream,
+ PQgetvalue(res, 0, 0),
+ PQgetvalue(res, 0, 1));
+
+ PQclear(res);
+ }
+
+ /*
+ * Before we start streaming from the requested location, check if the
+ * callback tells us to stop here.
+ */
+ if (stream->stream_stop(stream->startpos, stream->timeline, false))
+ return true;
+
+ /* Initiate the replication stream at specified location */
+ snprintf(query, sizeof(query), "START_REPLICATION %s%X/%X TIMELINE %u",
+ slotcmd,
+ LSN_FORMAT_ARGS(stream->startpos),
+ stream->timeline);
+ res = PQexec(conn, query);
+ if (PQresultStatus(res) != PGRES_COPY_BOTH)
+ {
+ pg_log_error("could not send replication command \"%s\": %s",
+ "START_REPLICATION", PQresultErrorMessage(res));
+ PQclear(res);
+ return false;
+ }
+ PQclear(res);
+
+ /* Stream the WAL */
+ res = HandleCopyStream(conn, stream, &stoppos);
+ if (res == NULL)
+ goto error;
+
+ /*
+ * Streaming finished.
+ *
+ * There are two possible reasons for that: a controlled shutdown, or
+ * we reached the end of the current timeline. In case of
+ * end-of-timeline, the server sends a result set after Copy has
+ * finished, containing information about the next timeline. Read
+ * that, and restart streaming from the next timeline. In case of
+ * controlled shutdown, stop here.
+ */
+ if (PQresultStatus(res) == PGRES_TUPLES_OK)
+ {
+ /*
+ * End-of-timeline. Read the next timeline's ID and starting
+ * position. Usually, the starting position will match the end of
+ * the previous timeline, but there are corner cases like if the
+ * server had sent us half of a WAL record, when it was promoted.
+ * The new timeline will begin at the end of the last complete
+ * record in that case, overlapping the partial WAL record on the
+ * old timeline.
+ */
+ uint32 newtimeline;
+ bool parsed;
+
+ parsed = ReadEndOfStreamingResult(res, &stream->startpos, &newtimeline);
+ PQclear(res);
+ if (!parsed)
+ goto error;
+
+ /* Sanity check the values the server gave us */
+ if (newtimeline <= stream->timeline)
+ {
+ pg_log_error("server reported unexpected next timeline %u, following timeline %u",
+ newtimeline, stream->timeline);
+ goto error;
+ }
+ if (stream->startpos > stoppos)
+ {
+ pg_log_error("server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X",
+ stream->timeline, LSN_FORMAT_ARGS(stoppos),
+ newtimeline, LSN_FORMAT_ARGS(stream->startpos));
+ goto error;
+ }
+
+ /* Read the final result, which should be CommandComplete. */
+ res = PQgetResult(conn);
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ pg_log_error("unexpected termination of replication stream: %s",
+ PQresultErrorMessage(res));
+ PQclear(res);
+ goto error;
+ }
+ PQclear(res);
+
+ /*
+ * Loop back to start streaming from the new timeline. Always
+ * start streaming at the beginning of a segment.
+ */
+ stream->timeline = newtimeline;
+ stream->startpos = stream->startpos -
+ XLogSegmentOffset(stream->startpos, WalSegSz);
+ continue;
+ }
+ else if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+
+ /*
+ * End of replication (ie. controlled shut down of the server).
+ *
+ * Check if the callback thinks it's OK to stop here. If not,
+ * complain.
+ */
+ if (stream->stream_stop(stoppos, stream->timeline, false))
+ return true;
+ else
+ {
+ pg_log_error("replication stream was terminated before stop point");
+ goto error;
+ }
+ }
+ else
+ {
+ /* Server returned an error. */
+ pg_log_error("unexpected termination of replication stream: %s",
+ PQresultErrorMessage(res));
+ PQclear(res);
+ goto error;
+ }
+ }
+
+error:
+ if (walfile != NULL && stream->walmethod->close(walfile, CLOSE_NO_RENAME) != 0)
+ pg_log_error("could not close file \"%s\": %s",
+ current_walfile_name, stream->walmethod->getlasterror());
+ walfile = NULL;
+ return false;
+}
+
+/*
+ * Helper function to parse the result set returned by server after streaming
+ * has finished. On failure, prints an error to stderr and returns false.
+ */
+static bool
+ReadEndOfStreamingResult(PGresult *res, XLogRecPtr *startpos, uint32 *timeline)
+{
+ uint32 startpos_xlogid,
+ startpos_xrecoff;
+
+ /*----------
+ * The result set consists of one row and two columns, e.g:
+ *
+ * next_tli | next_tli_startpos
+ * ----------+-------------------
+ * 4 | 0/9949AE0
+ *
+ * next_tli is the timeline ID of the next timeline after the one that
+ * just finished streaming. next_tli_startpos is the WAL location where
+ * the server switched to it.
+ *----------
+ */
+ if (PQnfields(res) < 2 || PQntuples(res) != 1)
+ {
+ pg_log_error("unexpected result set after end-of-timeline: got %d rows and %d fields, expected %d rows and %d fields",
+ PQntuples(res), PQnfields(res), 1, 2);
+ return false;
+ }
+
+ *timeline = atoi(PQgetvalue(res, 0, 0));
+ if (sscanf(PQgetvalue(res, 0, 1), "%X/%X", &startpos_xlogid,
+ &startpos_xrecoff) != 2)
+ {
+ pg_log_error("could not parse next timeline's starting point \"%s\"",
+ PQgetvalue(res, 0, 1));
+ return false;
+ }
+ *startpos = ((uint64) startpos_xlogid << 32) | startpos_xrecoff;
+
+ return true;
+}
+
+/*
+ * The main loop of ReceiveXlogStream. Handles the COPY stream after
+ * initiating streaming with the START_REPLICATION command.
+ *
+ * If the COPY ends (not necessarily successfully) due a message from the
+ * server, returns a PGresult and sets *stoppos to the last byte written.
+ * On any other sort of error, returns NULL.
+ */
+static PGresult *
+HandleCopyStream(PGconn *conn, StreamCtl *stream,
+ XLogRecPtr *stoppos)
+{
+ char *copybuf = NULL;
+ TimestampTz last_status = -1;
+ XLogRecPtr blockpos = stream->startpos;
+
+ still_sending = true;
+
+ while (1)
+ {
+ int r;
+ TimestampTz now;
+ long sleeptime;
+
+ /*
+ * Check if we should continue streaming, or abort at this point.
+ */
+ if (!CheckCopyStreamStop(conn, stream, blockpos))
+ goto error;
+
+ now = feGetCurrentTimestamp();
+
+ /*
+ * If synchronous option is true, issue sync command as soon as there
+ * are WAL data which has not been flushed yet.
+ */
+ if (stream->synchronous && lastFlushPosition < blockpos && walfile != NULL)
+ {
+ if (stream->walmethod->sync(walfile) != 0)
+ {
+ pg_log_fatal("could not fsync file \"%s\": %s",
+ current_walfile_name, stream->walmethod->getlasterror());
+ exit(1);
+ }
+ lastFlushPosition = blockpos;
+
+ /*
+ * Send feedback so that the server sees the latest WAL locations
+ * immediately.
+ */
+ if (!sendFeedback(conn, blockpos, now, false))
+ goto error;
+ last_status = now;
+ }
+
+ /*
+ * Potentially send a status message to the primary
+ */
+ if (still_sending && stream->standby_message_timeout > 0 &&
+ feTimestampDifferenceExceeds(last_status, now,
+ stream->standby_message_timeout))
+ {
+ /* Time to send feedback! */
+ if (!sendFeedback(conn, blockpos, now, false))
+ goto error;
+ last_status = now;
+ }
+
+ /*
+ * Calculate how long send/receive loops should sleep
+ */
+ sleeptime = CalculateCopyStreamSleeptime(now, stream->standby_message_timeout,
+ last_status);
+
+ r = CopyStreamReceive(conn, sleeptime, stream->stop_socket, &copybuf);
+ while (r != 0)
+ {
+ if (r == -1)
+ goto error;
+ if (r == -2)
+ {
+ PGresult *res = HandleEndOfCopyStream(conn, stream, copybuf, blockpos, stoppos);
+
+ if (res == NULL)
+ goto error;
+ else
+ return res;
+ }
+
+ /* Check the message type. */
+ if (copybuf[0] == 'k')
+ {
+ if (!ProcessKeepaliveMsg(conn, stream, copybuf, r, blockpos,
+ &last_status))
+ goto error;
+ }
+ else if (copybuf[0] == 'w')
+ {
+ if (!ProcessXLogDataMsg(conn, stream, copybuf, r, &blockpos))
+ goto error;
+
+ /*
+ * Check if we should continue streaming, or abort at this
+ * point.
+ */
+ if (!CheckCopyStreamStop(conn, stream, blockpos))
+ goto error;
+ }
+ else
+ {
+ pg_log_error("unrecognized streaming header: \"%c\"",
+ copybuf[0]);
+ goto error;
+ }
+
+ /*
+ * Process the received data, and any subsequent data we can read
+ * without blocking.
+ */
+ r = CopyStreamReceive(conn, 0, stream->stop_socket, &copybuf);
+ }
+ }
+
+error:
+ if (copybuf != NULL)
+ PQfreemem(copybuf);
+ return NULL;
+}
+
+/*
+ * Wait until we can read a CopyData message,
+ * or timeout, or occurrence of a signal or input on the stop_socket.
+ * (timeout_ms < 0 means wait indefinitely; 0 means don't wait.)
+ *
+ * Returns 1 if data has become available for reading, 0 if timed out
+ * or interrupted by signal or stop_socket input, and -1 on an error.
+ */
+static int
+CopyStreamPoll(PGconn *conn, long timeout_ms, pgsocket stop_socket)
+{
+ int ret;
+ fd_set input_mask;
+ int connsocket;
+ int maxfd;
+ struct timeval timeout;
+ struct timeval *timeoutptr;
+
+ connsocket = PQsocket(conn);
+ if (connsocket < 0)
+ {
+ pg_log_error("invalid socket: %s", PQerrorMessage(conn));
+ return -1;
+ }
+
+ FD_ZERO(&input_mask);
+ FD_SET(connsocket, &input_mask);
+ maxfd = connsocket;
+ if (stop_socket != PGINVALID_SOCKET)
+ {
+ FD_SET(stop_socket, &input_mask);
+ maxfd = Max(maxfd, stop_socket);
+ }
+
+ if (timeout_ms < 0)
+ timeoutptr = NULL;
+ else
+ {
+ timeout.tv_sec = timeout_ms / 1000L;
+ timeout.tv_usec = (timeout_ms % 1000L) * 1000L;
+ timeoutptr = &timeout;
+ }
+
+ ret = select(maxfd + 1, &input_mask, NULL, NULL, timeoutptr);
+
+ if (ret < 0)
+ {
+ if (errno == EINTR)
+ return 0; /* Got a signal, so not an error */
+ pg_log_error("%s() failed: %m", "select");
+ return -1;
+ }
+ if (ret > 0 && FD_ISSET(connsocket, &input_mask))
+ return 1; /* Got input on connection socket */
+
+ return 0; /* Got timeout or input on stop_socket */
+}
+
+/*
+ * Receive CopyData message available from XLOG stream, blocking for
+ * maximum of 'timeout' ms.
+ *
+ * If data was received, returns the length of the data. *buffer is set to
+ * point to a buffer holding the received message. The buffer is only valid
+ * until the next CopyStreamReceive call.
+ *
+ * Returns 0 if no data was available within timeout, or if wait was
+ * interrupted by signal or stop_socket input.
+ * -1 on error. -2 if the server ended the COPY.
+ */
+static int
+CopyStreamReceive(PGconn *conn, long timeout, pgsocket stop_socket,
+ char **buffer)
+{
+ char *copybuf = NULL;
+ int rawlen;
+
+ if (*buffer != NULL)
+ PQfreemem(*buffer);
+ *buffer = NULL;
+
+ /* Try to receive a CopyData message */
+ rawlen = PQgetCopyData(conn, &copybuf, 1);
+ if (rawlen == 0)
+ {
+ int ret;
+
+ /*
+ * No data available. Wait for some to appear, but not longer than
+ * the specified timeout, so that we can ping the server. Also stop
+ * waiting if input appears on stop_socket.
+ */
+ ret = CopyStreamPoll(conn, timeout, stop_socket);
+ if (ret <= 0)
+ return ret;
+
+ /* Now there is actually data on the socket */
+ if (PQconsumeInput(conn) == 0)
+ {
+ pg_log_error("could not receive data from WAL stream: %s",
+ PQerrorMessage(conn));
+ return -1;
+ }
+
+ /* Now that we've consumed some input, try again */
+ rawlen = PQgetCopyData(conn, &copybuf, 1);
+ if (rawlen == 0)
+ return 0;
+ }
+ if (rawlen == -1) /* end-of-streaming or error */
+ return -2;
+ if (rawlen == -2)
+ {
+ pg_log_error("could not read COPY data: %s", PQerrorMessage(conn));
+ return -1;
+ }
+
+ /* Return received messages to caller */
+ *buffer = copybuf;
+ return rawlen;
+}
+
+/*
+ * Process the keepalive message.
+ */
+static bool
+ProcessKeepaliveMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len,
+ XLogRecPtr blockpos, TimestampTz *last_status)
+{
+ int pos;
+ bool replyRequested;
+ TimestampTz now;
+
+ /*
+ * Parse the keepalive message, enclosed in the CopyData message. We just
+ * check if the server requested a reply, and ignore the rest.
+ */
+ pos = 1; /* skip msgtype 'k' */
+ pos += 8; /* skip walEnd */
+ pos += 8; /* skip sendTime */
+
+ if (len < pos + 1)
+ {
+ pg_log_error("streaming header too small: %d", len);
+ return false;
+ }
+ replyRequested = copybuf[pos];
+
+ /* If the server requested an immediate reply, send one. */
+ if (replyRequested && still_sending)
+ {
+ if (reportFlushPosition && lastFlushPosition < blockpos &&
+ walfile != NULL)
+ {
+ /*
+ * If a valid flush location needs to be reported, flush the
+ * current WAL file so that the latest flush location is sent back
+ * to the server. This is necessary to see whether the last WAL
+ * data has been successfully replicated or not, at the normal
+ * shutdown of the server.
+ */
+ if (stream->walmethod->sync(walfile) != 0)
+ {
+ pg_log_fatal("could not fsync file \"%s\": %s",
+ current_walfile_name, stream->walmethod->getlasterror());
+ exit(1);
+ }
+ lastFlushPosition = blockpos;
+ }
+
+ now = feGetCurrentTimestamp();
+ if (!sendFeedback(conn, blockpos, now, false))
+ return false;
+ *last_status = now;
+ }
+
+ return true;
+}
+
+/*
+ * Process XLogData message.
+ */
+static bool
+ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len,
+ XLogRecPtr *blockpos)
+{
+ int xlogoff;
+ int bytes_left;
+ int bytes_written;
+ int hdr_len;
+
+ /*
+ * Once we've decided we don't want to receive any more, just ignore any
+ * subsequent XLogData messages.
+ */
+ if (!(still_sending))
+ return true;
+
+ /*
+ * Read the header of the XLogData message, enclosed in the CopyData
+ * message. We only need the WAL location field (dataStart), the rest of
+ * the header is ignored.
+ */
+ hdr_len = 1; /* msgtype 'w' */
+ hdr_len += 8; /* dataStart */
+ hdr_len += 8; /* walEnd */
+ hdr_len += 8; /* sendTime */
+ if (len < hdr_len)
+ {
+ pg_log_error("streaming header too small: %d", len);
+ return false;
+ }
+ *blockpos = fe_recvint64(&copybuf[1]);
+
+ /* Extract WAL location for this block */
+ xlogoff = XLogSegmentOffset(*blockpos, WalSegSz);
+
+ /*
+ * Verify that the initial location in the stream matches where we think
+ * we are.
+ */
+ if (walfile == NULL)
+ {
+ /* No file open yet */
+ if (xlogoff != 0)
+ {
+ pg_log_error("received write-ahead log record for offset %u with no file open",
+ xlogoff);
+ return false;
+ }
+ }
+ else
+ {
+ /* More data in existing segment */
+ if (stream->walmethod->get_current_pos(walfile) != xlogoff)
+ {
+ pg_log_error("got WAL data offset %08x, expected %08x",
+ xlogoff, (int) stream->walmethod->get_current_pos(walfile));
+ return false;
+ }
+ }
+
+ bytes_left = len - hdr_len;
+ bytes_written = 0;
+
+ while (bytes_left)
+ {
+ int bytes_to_write;
+
+ /*
+ * If crossing a WAL boundary, only write up until we reach wal
+ * segment size.
+ */
+ if (xlogoff + bytes_left > WalSegSz)
+ bytes_to_write = WalSegSz - xlogoff;
+ else
+ bytes_to_write = bytes_left;
+
+ if (walfile == NULL)
+ {
+ if (!open_walfile(stream, *blockpos))
+ {
+ /* Error logged by open_walfile */
+ return false;
+ }
+ }
+
+ if (stream->walmethod->write(walfile, copybuf + hdr_len + bytes_written,
+ bytes_to_write) != bytes_to_write)
+ {
+ pg_log_error("could not write %u bytes to WAL file \"%s\": %s",
+ bytes_to_write, current_walfile_name,
+ stream->walmethod->getlasterror());
+ return false;
+ }
+
+ /* Write was successful, advance our position */
+ bytes_written += bytes_to_write;
+ bytes_left -= bytes_to_write;
+ *blockpos += bytes_to_write;
+ xlogoff += bytes_to_write;
+
+ /* Did we reach the end of a WAL segment? */
+ if (XLogSegmentOffset(*blockpos, WalSegSz) == 0)
+ {
+ if (!close_walfile(stream, *blockpos))
+ /* Error message written in close_walfile() */
+ return false;
+
+ xlogoff = 0;
+
+ if (still_sending && stream->stream_stop(*blockpos, stream->timeline, true))
+ {
+ if (PQputCopyEnd(conn, NULL) <= 0 || PQflush(conn))
+ {
+ pg_log_error("could not send copy-end packet: %s",
+ PQerrorMessage(conn));
+ return false;
+ }
+ still_sending = false;
+ return true; /* ignore the rest of this XLogData packet */
+ }
+ }
+ }
+ /* No more data left to write, receive next copy packet */
+
+ return true;
+}
+
+/*
+ * Handle end of the copy stream.
+ */
+static PGresult *
+HandleEndOfCopyStream(PGconn *conn, StreamCtl *stream, char *copybuf,
+ XLogRecPtr blockpos, XLogRecPtr *stoppos)
+{
+ PGresult *res = PQgetResult(conn);
+
+ /*
+ * The server closed its end of the copy stream. If we haven't closed
+ * ours already, we need to do so now, unless the server threw an error,
+ * in which case we don't.
+ */
+ if (still_sending)
+ {
+ if (!close_walfile(stream, blockpos))
+ {
+ /* Error message written in close_walfile() */
+ PQclear(res);
+ return NULL;
+ }
+ if (PQresultStatus(res) == PGRES_COPY_IN)
+ {
+ if (PQputCopyEnd(conn, NULL) <= 0 || PQflush(conn))
+ {
+ pg_log_error("could not send copy-end packet: %s",
+ PQerrorMessage(conn));
+ PQclear(res);
+ return NULL;
+ }
+ res = PQgetResult(conn);
+ }
+ still_sending = false;
+ }
+ if (copybuf != NULL)
+ PQfreemem(copybuf);
+ *stoppos = blockpos;
+ return res;
+}
+
+/*
+ * Check if we should continue streaming, or abort at this point.
+ */
+static bool
+CheckCopyStreamStop(PGconn *conn, StreamCtl *stream, XLogRecPtr blockpos)
+{
+ if (still_sending && stream->stream_stop(blockpos, stream->timeline, false))
+ {
+ if (!close_walfile(stream, blockpos))
+ {
+ /* Potential error message is written by close_walfile */
+ return false;
+ }
+ if (PQputCopyEnd(conn, NULL) <= 0 || PQflush(conn))
+ {
+ pg_log_error("could not send copy-end packet: %s",
+ PQerrorMessage(conn));
+ return false;
+ }
+ still_sending = false;
+ }
+
+ return true;
+}
+
+/*
+ * Calculate how long send/receive loops should sleep
+ */
+static long
+CalculateCopyStreamSleeptime(TimestampTz now, int standby_message_timeout,
+ TimestampTz last_status)
+{
+ TimestampTz status_targettime = 0;
+ long sleeptime;
+
+ if (standby_message_timeout && still_sending)
+ status_targettime = last_status +
+ (standby_message_timeout - 1) * ((int64) 1000);
+
+ if (status_targettime > 0)
+ {
+ long secs;
+ int usecs;
+
+ feTimestampDifference(now,
+ status_targettime,
+ &secs,
+ &usecs);
+ /* Always sleep at least 1 sec */
+ if (secs <= 0)
+ {
+ secs = 1;
+ usecs = 0;
+ }
+
+ sleeptime = secs * 1000 + usecs / 1000;
+ }
+ else
+ sleeptime = -1;
+
+ return sleeptime;
+}
diff --git a/src/bin/pg_basebackup/receivelog.h b/src/bin/pg_basebackup/receivelog.h
new file mode 100644
index 0000000..e04333b
--- /dev/null
+++ b/src/bin/pg_basebackup/receivelog.h
@@ -0,0 +1,57 @@
+/*-------------------------------------------------------------------------
+ *
+ * receivelog.h
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_basebackup/receivelog.h
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef RECEIVELOG_H
+#define RECEIVELOG_H
+
+#include "access/xlogdefs.h"
+#include "libpq-fe.h"
+#include "walmethods.h"
+
+/*
+ * Called before trying to read more data or when a segment is
+ * finished. Return true to stop streaming.
+ */
+typedef bool (*stream_stop_callback) (XLogRecPtr segendpos, uint32 timeline, bool segment_finished);
+
+/*
+ * Global parameters when receiving xlog stream. For details about the individual fields,
+ * see the function comment for ReceiveXlogStream().
+ */
+typedef struct StreamCtl
+{
+ XLogRecPtr startpos; /* Start position for streaming */
+ TimeLineID timeline; /* Timeline to stream data from */
+ char *sysidentifier; /* Validate this system identifier and
+ * timeline */
+ int standby_message_timeout; /* Send status messages this often */
+ bool synchronous; /* Flush immediately WAL data on write */
+ bool mark_done; /* Mark segment as done in generated archive */
+ bool do_sync; /* Flush to disk to ensure consistent state of
+ * data */
+
+ stream_stop_callback stream_stop; /* Stop streaming when returns true */
+
+ pgsocket stop_socket; /* if valid, watch for input on this socket
+ * and check stream_stop() when there is any */
+
+ WalWriteMethod *walmethod; /* How to write the WAL */
+ char *partial_suffix; /* Suffix appended to partially received files */
+ char *replication_slot; /* Replication slot to use, or NULL */
+} StreamCtl;
+
+
+
+extern bool CheckServerVersionForStreaming(PGconn *conn);
+extern bool ReceiveXlogStream(PGconn *conn,
+ StreamCtl *stream);
+
+#endif /* RECEIVELOG_H */
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c
new file mode 100644
index 0000000..f8764a8
--- /dev/null
+++ b/src/bin/pg_basebackup/streamutil.c
@@ -0,0 +1,680 @@
+/*-------------------------------------------------------------------------
+ *
+ * streamutil.c - utility functions for pg_basebackup, pg_receivewal and
+ * pg_recvlogical
+ *
+ * Author: Magnus Hagander <magnus@hagander.net>
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_basebackup/streamutil.c
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <sys/time.h>
+#include <unistd.h>
+
+#include "access/xlog_internal.h"
+#include "common/connect.h"
+#include "common/fe_memutils.h"
+#include "common/file_perm.h"
+#include "common/logging.h"
+#include "common/string.h"
+#include "datatype/timestamp.h"
+#include "port/pg_bswap.h"
+#include "pqexpbuffer.h"
+#include "receivelog.h"
+#include "streamutil.h"
+
+#define ERRCODE_DUPLICATE_OBJECT "42710"
+
+uint32 WalSegSz;
+
+static bool RetrieveDataDirCreatePerm(PGconn *conn);
+
+/* SHOW command for replication connection was introduced in version 10 */
+#define MINIMUM_VERSION_FOR_SHOW_CMD 100000
+
+/*
+ * Group access is supported from version 11.
+ */
+#define MINIMUM_VERSION_FOR_GROUP_ACCESS 110000
+
+const char *progname;
+char *connection_string = NULL;
+char *dbhost = NULL;
+char *dbuser = NULL;
+char *dbport = NULL;
+char *dbname = NULL;
+int dbgetpassword = 0; /* 0=auto, -1=never, 1=always */
+static char *password = NULL;
+PGconn *conn = NULL;
+
+/*
+ * Connect to the server. Returns a valid PGconn pointer if connected,
+ * or NULL on non-permanent error. On permanent error, the function will
+ * call exit(1) directly.
+ */
+PGconn *
+GetConnection(void)
+{
+ PGconn *tmpconn;
+ int argcount = 7; /* dbname, replication, fallback_app_name,
+ * host, user, port, password */
+ int i;
+ const char **keywords;
+ const char **values;
+ const char *tmpparam;
+ bool need_password;
+ PQconninfoOption *conn_opts = NULL;
+ PQconninfoOption *conn_opt;
+ char *err_msg = NULL;
+
+ /* pg_recvlogical uses dbname only; others use connection_string only. */
+ Assert(dbname == NULL || connection_string == NULL);
+
+ /*
+ * Merge the connection info inputs given in form of connection string,
+ * options and default values (dbname=replication, replication=true, etc.)
+ * Explicitly discard any dbname value in the connection string;
+ * otherwise, PQconnectdbParams() would interpret that value as being
+ * itself a connection string.
+ */
+ i = 0;
+ if (connection_string)
+ {
+ conn_opts = PQconninfoParse(connection_string, &err_msg);
+ if (conn_opts == NULL)
+ {
+ pg_log_error("%s", err_msg);
+ exit(1);
+ }
+
+ for (conn_opt = conn_opts; conn_opt->keyword != NULL; conn_opt++)
+ {
+ if (conn_opt->val != NULL && conn_opt->val[0] != '\0' &&
+ strcmp(conn_opt->keyword, "dbname") != 0)
+ argcount++;
+ }
+
+ keywords = pg_malloc0((argcount + 1) * sizeof(*keywords));
+ values = pg_malloc0((argcount + 1) * sizeof(*values));
+
+ for (conn_opt = conn_opts; conn_opt->keyword != NULL; conn_opt++)
+ {
+ if (conn_opt->val != NULL && conn_opt->val[0] != '\0' &&
+ strcmp(conn_opt->keyword, "dbname") != 0)
+ {
+ keywords[i] = conn_opt->keyword;
+ values[i] = conn_opt->val;
+ i++;
+ }
+ }
+ }
+ else
+ {
+ keywords = pg_malloc0((argcount + 1) * sizeof(*keywords));
+ values = pg_malloc0((argcount + 1) * sizeof(*values));
+ }
+
+ keywords[i] = "dbname";
+ values[i] = dbname == NULL ? "replication" : dbname;
+ i++;
+ keywords[i] = "replication";
+ values[i] = dbname == NULL ? "true" : "database";
+ i++;
+ keywords[i] = "fallback_application_name";
+ values[i] = progname;
+ i++;
+
+ if (dbhost)
+ {
+ keywords[i] = "host";
+ values[i] = dbhost;
+ i++;
+ }
+ if (dbuser)
+ {
+ keywords[i] = "user";
+ values[i] = dbuser;
+ i++;
+ }
+ if (dbport)
+ {
+ keywords[i] = "port";
+ values[i] = dbport;
+ i++;
+ }
+
+ /* If -W was given, force prompt for password, but only the first time */
+ need_password = (dbgetpassword == 1 && !password);
+
+ do
+ {
+ /* Get a new password if appropriate */
+ if (need_password)
+ {
+ if (password)
+ free(password);
+ password = simple_prompt("Password: ", false);
+ need_password = false;
+ }
+
+ /* Use (or reuse, on a subsequent connection) password if we have it */
+ if (password)
+ {
+ keywords[i] = "password";
+ values[i] = password;
+ }
+ else
+ {
+ keywords[i] = NULL;
+ values[i] = NULL;
+ }
+
+ tmpconn = PQconnectdbParams(keywords, values, true);
+
+ /*
+ * If there is too little memory even to allocate the PGconn object
+ * and PQconnectdbParams returns NULL, we call exit(1) directly.
+ */
+ if (!tmpconn)
+ {
+ pg_log_error("could not connect to server");
+ exit(1);
+ }
+
+ /* If we need a password and -w wasn't given, loop back and get one */
+ if (PQstatus(tmpconn) == CONNECTION_BAD &&
+ PQconnectionNeedsPassword(tmpconn) &&
+ dbgetpassword != -1)
+ {
+ PQfinish(tmpconn);
+ need_password = true;
+ }
+ }
+ while (need_password);
+
+ if (PQstatus(tmpconn) != CONNECTION_OK)
+ {
+ pg_log_error("%s", PQerrorMessage(tmpconn));
+ PQfinish(tmpconn);
+ free(values);
+ free(keywords);
+ if (conn_opts)
+ PQconninfoFree(conn_opts);
+ return NULL;
+ }
+
+ /* Connection ok! */
+ free(values);
+ free(keywords);
+ if (conn_opts)
+ PQconninfoFree(conn_opts);
+
+ /*
+ * Set always-secure search path, so malicious users can't get control.
+ * The capacity to run normal SQL queries was added in PostgreSQL 10, so
+ * the search path cannot be changed (by us or attackers) on earlier
+ * versions.
+ */
+ if (dbname != NULL && PQserverVersion(tmpconn) >= 100000)
+ {
+ PGresult *res;
+
+ res = PQexec(tmpconn, ALWAYS_SECURE_SEARCH_PATH_SQL);
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ {
+ pg_log_error("could not clear search_path: %s",
+ PQerrorMessage(tmpconn));
+ PQclear(res);
+ PQfinish(tmpconn);
+ exit(1);
+ }
+ PQclear(res);
+ }
+
+ /*
+ * Ensure we have the same value of integer_datetimes (now always "on") as
+ * the server we are connecting to.
+ */
+ tmpparam = PQparameterStatus(tmpconn, "integer_datetimes");
+ if (!tmpparam)
+ {
+ pg_log_error("could not determine server setting for integer_datetimes");
+ PQfinish(tmpconn);
+ exit(1);
+ }
+
+ if (strcmp(tmpparam, "on") != 0)
+ {
+ pg_log_error("integer_datetimes compile flag does not match server");
+ PQfinish(tmpconn);
+ exit(1);
+ }
+
+ /*
+ * Retrieve the source data directory mode and use it to construct a umask
+ * for creating directories and files.
+ */
+ if (!RetrieveDataDirCreatePerm(tmpconn))
+ {
+ PQfinish(tmpconn);
+ exit(1);
+ }
+
+ return tmpconn;
+}
+
+/*
+ * From version 10, explicitly set wal segment size using SHOW wal_segment_size
+ * since ControlFile is not accessible here.
+ */
+bool
+RetrieveWalSegSize(PGconn *conn)
+{
+ PGresult *res;
+ char xlog_unit[3];
+ int xlog_val,
+ multiplier = 1;
+
+ /* check connection existence */
+ Assert(conn != NULL);
+
+ /* for previous versions set the default xlog seg size */
+ if (PQserverVersion(conn) < MINIMUM_VERSION_FOR_SHOW_CMD)
+ {
+ WalSegSz = DEFAULT_XLOG_SEG_SIZE;
+ return true;
+ }
+
+ res = PQexec(conn, "SHOW wal_segment_size");
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ {
+ pg_log_error("could not send replication command \"%s\": %s",
+ "SHOW wal_segment_size", PQerrorMessage(conn));
+
+ PQclear(res);
+ return false;
+ }
+ if (PQntuples(res) != 1 || PQnfields(res) < 1)
+ {
+ pg_log_error("could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields",
+ PQntuples(res), PQnfields(res), 1, 1);
+
+ PQclear(res);
+ return false;
+ }
+
+ /* fetch xlog value and unit from the result */
+ if (sscanf(PQgetvalue(res, 0, 0), "%d%2s", &xlog_val, xlog_unit) != 2)
+ {
+ pg_log_error("WAL segment size could not be parsed");
+ PQclear(res);
+ return false;
+ }
+
+ PQclear(res);
+
+ /* set the multiplier based on unit to convert xlog_val to bytes */
+ if (strcmp(xlog_unit, "MB") == 0)
+ multiplier = 1024 * 1024;
+ else if (strcmp(xlog_unit, "GB") == 0)
+ multiplier = 1024 * 1024 * 1024;
+
+ /* convert and set WalSegSz */
+ WalSegSz = xlog_val * multiplier;
+
+ if (!IsValidWalSegSize(WalSegSz))
+ {
+ pg_log_error(ngettext("WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte",
+ "WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes",
+ WalSegSz),
+ WalSegSz);
+ return false;
+ }
+
+ return true;
+}
+
+/*
+ * RetrieveDataDirCreatePerm
+ *
+ * This function is used to determine the privileges on the server's PG data
+ * directory and, based on that, set what the permissions will be for
+ * directories and files we create.
+ *
+ * PG11 added support for (optionally) group read/execute rights to be set on
+ * the data directory. Prior to PG11, only the owner was allowed to have rights
+ * on the data directory.
+ */
+static bool
+RetrieveDataDirCreatePerm(PGconn *conn)
+{
+ PGresult *res;
+ int data_directory_mode;
+
+ /* check connection existence */
+ Assert(conn != NULL);
+
+ /* for previous versions leave the default group access */
+ if (PQserverVersion(conn) < MINIMUM_VERSION_FOR_GROUP_ACCESS)
+ return true;
+
+ res = PQexec(conn, "SHOW data_directory_mode");
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ {
+ pg_log_error("could not send replication command \"%s\": %s",
+ "SHOW data_directory_mode", PQerrorMessage(conn));
+
+ PQclear(res);
+ return false;
+ }
+ if (PQntuples(res) != 1 || PQnfields(res) < 1)
+ {
+ pg_log_error("could not fetch group access flag: got %d rows and %d fields, expected %d rows and %d or more fields",
+ PQntuples(res), PQnfields(res), 1, 1);
+
+ PQclear(res);
+ return false;
+ }
+
+ if (sscanf(PQgetvalue(res, 0, 0), "%o", &data_directory_mode) != 1)
+ {
+ pg_log_error("group access flag could not be parsed: %s",
+ PQgetvalue(res, 0, 0));
+
+ PQclear(res);
+ return false;
+ }
+
+ SetDataDirectoryCreatePerm(data_directory_mode);
+
+ PQclear(res);
+ return true;
+}
+
+/*
+ * Run IDENTIFY_SYSTEM through a given connection and give back to caller
+ * some result information if requested:
+ * - System identifier
+ * - Current timeline ID
+ * - Start LSN position
+ * - Database name (NULL in servers prior to 9.4)
+ */
+bool
+RunIdentifySystem(PGconn *conn, char **sysid, TimeLineID *starttli,
+ XLogRecPtr *startpos, char **db_name)
+{
+ PGresult *res;
+ uint32 hi,
+ lo;
+
+ /* Check connection existence */
+ Assert(conn != NULL);
+
+ res = PQexec(conn, "IDENTIFY_SYSTEM");
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ {
+ pg_log_error("could not send replication command \"%s\": %s",
+ "IDENTIFY_SYSTEM", PQerrorMessage(conn));
+
+ PQclear(res);
+ return false;
+ }
+ if (PQntuples(res) != 1 || PQnfields(res) < 3)
+ {
+ pg_log_error("could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields",
+ PQntuples(res), PQnfields(res), 1, 3);
+
+ PQclear(res);
+ return false;
+ }
+
+ /* Get system identifier */
+ if (sysid != NULL)
+ *sysid = pg_strdup(PQgetvalue(res, 0, 0));
+
+ /* Get timeline ID to start streaming from */
+ if (starttli != NULL)
+ *starttli = atoi(PQgetvalue(res, 0, 1));
+
+ /* Get LSN start position if necessary */
+ if (startpos != NULL)
+ {
+ if (sscanf(PQgetvalue(res, 0, 2), "%X/%X", &hi, &lo) != 2)
+ {
+ pg_log_error("could not parse write-ahead log location \"%s\"",
+ PQgetvalue(res, 0, 2));
+
+ PQclear(res);
+ return false;
+ }
+ *startpos = ((uint64) hi) << 32 | lo;
+ }
+
+ /* Get database name, only available in 9.4 and newer versions */
+ if (db_name != NULL)
+ {
+ *db_name = NULL;
+ if (PQserverVersion(conn) >= 90400)
+ {
+ if (PQnfields(res) < 4)
+ {
+ pg_log_error("could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields",
+ PQntuples(res), PQnfields(res), 1, 4);
+
+ PQclear(res);
+ return false;
+ }
+ if (!PQgetisnull(res, 0, 3))
+ *db_name = pg_strdup(PQgetvalue(res, 0, 3));
+ }
+ }
+
+ PQclear(res);
+ return true;
+}
+
+/*
+ * Create a replication slot for the given connection. This function
+ * returns true in case of success.
+ */
+bool
+CreateReplicationSlot(PGconn *conn, const char *slot_name, const char *plugin,
+ bool is_temporary, bool is_physical, bool reserve_wal,
+ bool slot_exists_ok)
+{
+ PQExpBuffer query;
+ PGresult *res;
+
+ query = createPQExpBuffer();
+
+ Assert((is_physical && plugin == NULL) ||
+ (!is_physical && plugin != NULL));
+ Assert(slot_name != NULL);
+
+ /* Build query */
+ appendPQExpBuffer(query, "CREATE_REPLICATION_SLOT \"%s\"", slot_name);
+ if (is_temporary)
+ appendPQExpBufferStr(query, " TEMPORARY");
+ if (is_physical)
+ {
+ appendPQExpBufferStr(query, " PHYSICAL");
+ if (reserve_wal)
+ appendPQExpBufferStr(query, " RESERVE_WAL");
+ }
+ else
+ {
+ appendPQExpBuffer(query, " LOGICAL \"%s\"", plugin);
+ if (PQserverVersion(conn) >= 100000)
+ /* pg_recvlogical doesn't use an exported snapshot, so suppress */
+ appendPQExpBufferStr(query, " NOEXPORT_SNAPSHOT");
+ }
+
+ res = PQexec(conn, query->data);
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ {
+ const char *sqlstate = PQresultErrorField(res, PG_DIAG_SQLSTATE);
+
+ if (slot_exists_ok &&
+ sqlstate &&
+ strcmp(sqlstate, ERRCODE_DUPLICATE_OBJECT) == 0)
+ {
+ destroyPQExpBuffer(query);
+ PQclear(res);
+ return true;
+ }
+ else
+ {
+ pg_log_error("could not send replication command \"%s\": %s",
+ query->data, PQerrorMessage(conn));
+
+ destroyPQExpBuffer(query);
+ PQclear(res);
+ return false;
+ }
+ }
+
+ if (PQntuples(res) != 1 || PQnfields(res) != 4)
+ {
+ pg_log_error("could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields",
+ slot_name,
+ PQntuples(res), PQnfields(res), 1, 4);
+
+ destroyPQExpBuffer(query);
+ PQclear(res);
+ return false;
+ }
+
+ destroyPQExpBuffer(query);
+ PQclear(res);
+ return true;
+}
+
+/*
+ * Drop a replication slot for the given connection. This function
+ * returns true in case of success.
+ */
+bool
+DropReplicationSlot(PGconn *conn, const char *slot_name)
+{
+ PQExpBuffer query;
+ PGresult *res;
+
+ Assert(slot_name != NULL);
+
+ query = createPQExpBuffer();
+
+ /* Build query */
+ appendPQExpBuffer(query, "DROP_REPLICATION_SLOT \"%s\"",
+ slot_name);
+ res = PQexec(conn, query->data);
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ pg_log_error("could not send replication command \"%s\": %s",
+ query->data, PQerrorMessage(conn));
+
+ destroyPQExpBuffer(query);
+ PQclear(res);
+ return false;
+ }
+
+ if (PQntuples(res) != 0 || PQnfields(res) != 0)
+ {
+ pg_log_error("could not drop replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields",
+ slot_name,
+ PQntuples(res), PQnfields(res), 0, 0);
+
+ destroyPQExpBuffer(query);
+ PQclear(res);
+ return false;
+ }
+
+ destroyPQExpBuffer(query);
+ PQclear(res);
+ return true;
+}
+
+
+/*
+ * Frontend version of GetCurrentTimestamp(), since we are not linked with
+ * backend code.
+ */
+TimestampTz
+feGetCurrentTimestamp(void)
+{
+ TimestampTz result;
+ struct timeval tp;
+
+ gettimeofday(&tp, NULL);
+
+ result = (TimestampTz) tp.tv_sec -
+ ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY);
+ result = (result * USECS_PER_SEC) + tp.tv_usec;
+
+ return result;
+}
+
+/*
+ * Frontend version of TimestampDifference(), since we are not linked with
+ * backend code.
+ */
+void
+feTimestampDifference(TimestampTz start_time, TimestampTz stop_time,
+ long *secs, int *microsecs)
+{
+ TimestampTz diff = stop_time - start_time;
+
+ if (diff <= 0)
+ {
+ *secs = 0;
+ *microsecs = 0;
+ }
+ else
+ {
+ *secs = (long) (diff / USECS_PER_SEC);
+ *microsecs = (int) (diff % USECS_PER_SEC);
+ }
+}
+
+/*
+ * Frontend version of TimestampDifferenceExceeds(), since we are not
+ * linked with backend code.
+ */
+bool
+feTimestampDifferenceExceeds(TimestampTz start_time,
+ TimestampTz stop_time,
+ int msec)
+{
+ TimestampTz diff = stop_time - start_time;
+
+ return (diff >= msec * INT64CONST(1000));
+}
+
+/*
+ * Converts an int64 to network byte order.
+ */
+void
+fe_sendint64(int64 i, char *buf)
+{
+ uint64 n64 = pg_hton64(i);
+
+ memcpy(buf, &n64, sizeof(n64));
+}
+
+/*
+ * Converts an int64 from network byte order to native format.
+ */
+int64
+fe_recvint64(char *buf)
+{
+ uint64 n64;
+
+ memcpy(&n64, buf, sizeof(n64));
+
+ return pg_ntoh64(n64);
+}
diff --git a/src/bin/pg_basebackup/streamutil.h b/src/bin/pg_basebackup/streamutil.h
new file mode 100644
index 0000000..10f87ad
--- /dev/null
+++ b/src/bin/pg_basebackup/streamutil.h
@@ -0,0 +1,53 @@
+/*-------------------------------------------------------------------------
+ *
+ * streamutil.h
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_basebackup/streamutil.h
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef STREAMUTIL_H
+#define STREAMUTIL_H
+
+#include "access/xlogdefs.h"
+#include "datatype/timestamp.h"
+#include "libpq-fe.h"
+
+extern const char *progname;
+extern char *connection_string;
+extern char *dbhost;
+extern char *dbuser;
+extern char *dbport;
+extern char *dbname;
+extern int dbgetpassword;
+extern uint32 WalSegSz;
+
+/* Connection kept global so we can disconnect easily */
+extern PGconn *conn;
+
+extern PGconn *GetConnection(void);
+
+/* Replication commands */
+extern bool CreateReplicationSlot(PGconn *conn, const char *slot_name,
+ const char *plugin, bool is_temporary,
+ bool is_physical, bool reserve_wal,
+ bool slot_exists_ok);
+extern bool DropReplicationSlot(PGconn *conn, const char *slot_name);
+extern bool RunIdentifySystem(PGconn *conn, char **sysid,
+ TimeLineID *starttli,
+ XLogRecPtr *startpos,
+ char **db_name);
+extern bool RetrieveWalSegSize(PGconn *conn);
+extern TimestampTz feGetCurrentTimestamp(void);
+extern void feTimestampDifference(TimestampTz start_time, TimestampTz stop_time,
+ long *secs, int *microsecs);
+
+extern bool feTimestampDifferenceExceeds(TimestampTz start_time, TimestampTz stop_time,
+ int msec);
+extern void fe_sendint64(int64 i, char *buf);
+extern int64 fe_recvint64(char *buf);
+
+#endif /* STREAMUTIL_H */
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
new file mode 100644
index 0000000..72a2cf8
--- /dev/null
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -0,0 +1,612 @@
+
+# Copyright (c) 2021, PostgreSQL Global Development Group
+
+use strict;
+use warnings;
+use Cwd;
+use Config;
+use File::Basename qw(basename dirname);
+use File::Path qw(rmtree);
+use PostgresNode;
+use TestLib;
+use Test::More tests => 110;
+
+program_help_ok('pg_basebackup');
+program_version_ok('pg_basebackup');
+program_options_handling_ok('pg_basebackup');
+
+my $tempdir = TestLib::tempdir;
+
+my $node = get_new_node('main');
+
+# Set umask so test directories and files are created with default permissions
+umask(0077);
+
+# Initialize node without replication settings
+$node->init(extra => ['--data-checksums']);
+$node->start;
+my $pgdata = $node->data_dir;
+
+$node->command_fails(['pg_basebackup'],
+ 'pg_basebackup needs target directory specified');
+
+# Some Windows ANSI code pages may reject this filename, in which case we
+# quietly proceed without this bit of test coverage.
+if (open my $badchars, '>>', "$tempdir/pgdata/FOO\xe0\xe0\xe0BAR")
+{
+ print $badchars "test backup of file with non-UTF8 name\n";
+ close $badchars;
+}
+
+$node->set_replication_conf();
+$node->reload;
+
+$node->command_fails(
+ [ 'pg_basebackup', '-D', "$tempdir/backup" ],
+ 'pg_basebackup fails because of WAL configuration');
+
+ok(!-d "$tempdir/backup", 'backup directory was cleaned up');
+
+# Create a backup directory that is not empty so the next command will fail
+# but leave the data directory behind
+mkdir("$tempdir/backup")
+ or BAIL_OUT("unable to create $tempdir/backup");
+append_to_file("$tempdir/backup/dir-not-empty.txt", "Some data");
+
+$node->command_fails([ 'pg_basebackup', '-D', "$tempdir/backup", '-n' ],
+ 'failing run with no-clean option');
+
+ok(-d "$tempdir/backup", 'backup directory was created and left behind');
+rmtree("$tempdir/backup");
+
+open my $conf, '>>', "$pgdata/postgresql.conf";
+print $conf "max_replication_slots = 10\n";
+print $conf "max_wal_senders = 10\n";
+print $conf "wal_level = replica\n";
+close $conf;
+$node->restart;
+
+# Write some files to test that they are not copied.
+foreach my $filename (
+ qw(backup_label tablespace_map postgresql.auto.conf.tmp
+ current_logfiles.tmp global/pg_internal.init.123))
+{
+ open my $file, '>>', "$pgdata/$filename";
+ print $file "DONOTCOPY";
+ close $file;
+}
+
+# Connect to a database to create global/pg_internal.init. If this is removed
+# the test to ensure global/pg_internal.init is not copied will return a false
+# positive.
+$node->safe_psql('postgres', 'SELECT 1;');
+
+# Create an unlogged table to test that forks other than init are not copied.
+$node->safe_psql('postgres', 'CREATE UNLOGGED TABLE base_unlogged (id int)');
+
+my $baseUnloggedPath = $node->safe_psql('postgres',
+ q{select pg_relation_filepath('base_unlogged')});
+
+# Make sure main and init forks exist
+ok(-f "$pgdata/${baseUnloggedPath}_init", 'unlogged init fork in base');
+ok(-f "$pgdata/$baseUnloggedPath", 'unlogged main fork in base');
+
+# Create files that look like temporary relations to ensure they are ignored.
+my $postgresOid = $node->safe_psql('postgres',
+ q{select oid from pg_database where datname = 'postgres'});
+
+my @tempRelationFiles =
+ qw(t999_999 t9999_999.1 t999_9999_vm t99999_99999_vm.1);
+
+foreach my $filename (@tempRelationFiles)
+{
+ append_to_file("$pgdata/base/$postgresOid/$filename", 'TEMP_RELATION');
+}
+
+# Run base backup.
+$node->command_ok([ 'pg_basebackup', '-D', "$tempdir/backup", '-X', 'none' ],
+ 'pg_basebackup runs');
+ok(-f "$tempdir/backup/PG_VERSION", 'backup was created');
+ok(-f "$tempdir/backup/backup_manifest", 'backup manifest included');
+
+# Permissions on backup should be default
+SKIP:
+{
+ skip "unix-style permissions not supported on Windows", 1
+ if ($windows_os);
+
+ ok(check_mode_recursive("$tempdir/backup", 0700, 0600),
+ "check backup dir permissions");
+}
+
+# Only archive_status directory should be copied in pg_wal/.
+is_deeply(
+ [ sort(slurp_dir("$tempdir/backup/pg_wal/")) ],
+ [ sort qw(. .. archive_status) ],
+ 'no WAL files copied');
+
+# Contents of these directories should not be copied.
+foreach my $dirname (
+ qw(pg_dynshmem pg_notify pg_replslot pg_serial pg_snapshots pg_stat_tmp pg_subtrans)
+ )
+{
+ is_deeply(
+ [ sort(slurp_dir("$tempdir/backup/$dirname/")) ],
+ [ sort qw(. ..) ],
+ "contents of $dirname/ not copied");
+}
+
+# These files should not be copied.
+foreach my $filename (
+ qw(postgresql.auto.conf.tmp postmaster.opts postmaster.pid tablespace_map current_logfiles.tmp
+ global/pg_internal.init global/pg_internal.init.123))
+{
+ ok(!-f "$tempdir/backup/$filename", "$filename not copied");
+}
+
+# Unlogged relation forks other than init should not be copied
+ok(-f "$tempdir/backup/${baseUnloggedPath}_init",
+ 'unlogged init fork in backup');
+ok( !-f "$tempdir/backup/$baseUnloggedPath",
+ 'unlogged main fork not in backup');
+
+# Temp relations should not be copied.
+foreach my $filename (@tempRelationFiles)
+{
+ ok( !-f "$tempdir/backup/base/$postgresOid/$filename",
+ "base/$postgresOid/$filename not copied");
+}
+
+# Make sure existing backup_label was ignored.
+isnt(slurp_file("$tempdir/backup/backup_label"),
+ 'DONOTCOPY', 'existing backup_label not copied');
+rmtree("$tempdir/backup");
+
+$node->command_ok(
+ [
+ 'pg_basebackup', '-D',
+ "$tempdir/backup2", '--no-manifest',
+ '--waldir', "$tempdir/xlog2"
+ ],
+ 'separate xlog directory');
+ok(-f "$tempdir/backup2/PG_VERSION", 'backup was created');
+ok(!-f "$tempdir/backup2/backup_manifest", 'manifest was suppressed');
+ok(-d "$tempdir/xlog2/", 'xlog directory was created');
+rmtree("$tempdir/backup2");
+rmtree("$tempdir/xlog2");
+
+$node->command_ok([ 'pg_basebackup', '-D', "$tempdir/tarbackup", '-Ft' ],
+ 'tar format');
+ok(-f "$tempdir/tarbackup/base.tar", 'backup tar was created');
+rmtree("$tempdir/tarbackup");
+
+$node->command_fails(
+ [ 'pg_basebackup', '-D', "$tempdir/backup_foo", '-Fp', "-T=/foo" ],
+ '-T with empty old directory fails');
+$node->command_fails(
+ [ 'pg_basebackup', '-D', "$tempdir/backup_foo", '-Fp', "-T/foo=" ],
+ '-T with empty new directory fails');
+$node->command_fails(
+ [
+ 'pg_basebackup', '-D', "$tempdir/backup_foo", '-Fp',
+ "-T/foo=/bar=/baz"
+ ],
+ '-T with multiple = fails');
+$node->command_fails(
+ [ 'pg_basebackup', '-D', "$tempdir/backup_foo", '-Fp', "-Tfoo=/bar" ],
+ '-T with old directory not absolute fails');
+$node->command_fails(
+ [ 'pg_basebackup', '-D', "$tempdir/backup_foo", '-Fp', "-T/foo=bar" ],
+ '-T with new directory not absolute fails');
+$node->command_fails(
+ [ 'pg_basebackup', '-D', "$tempdir/backup_foo", '-Fp', "-Tfoo" ],
+ '-T with invalid format fails');
+
+# Tar format doesn't support filenames longer than 100 bytes.
+my $superlongname = "superlongname_" . ("x" x 100);
+my $superlongpath = "$pgdata/$superlongname";
+
+open my $file, '>', "$superlongpath"
+ or die "unable to create file $superlongpath";
+close $file;
+$node->command_fails(
+ [ 'pg_basebackup', '-D', "$tempdir/tarbackup_l1", '-Ft' ],
+ 'pg_basebackup tar with long name fails');
+unlink "$pgdata/$superlongname";
+
+# The following tests are for symlinks.
+
+# Move pg_replslot out of $pgdata and create a symlink to it.
+$node->stop;
+
+# Set umask so test directories and files are created with group permissions
+umask(0027);
+
+# Enable group permissions on PGDATA
+chmod_recursive("$pgdata", 0750, 0640);
+
+rename("$pgdata/pg_replslot", "$tempdir/pg_replslot")
+ or BAIL_OUT "could not move $pgdata/pg_replslot";
+dir_symlink("$tempdir/pg_replslot", "$pgdata/pg_replslot")
+ or BAIL_OUT "could not symlink to $pgdata/pg_replslot";
+
+$node->start;
+
+# Test backup of a tablespace using tar format.
+# Create a temporary directory in the system location and symlink it
+# to our physical temp location. That way we can use shorter names
+# for the tablespace directories, which hopefully won't run afoul of
+# the 99 character length limit.
+my $sys_tempdir = TestLib::tempdir_short;
+my $real_sys_tempdir = "$sys_tempdir/tempdir";
+dir_symlink "$tempdir", $real_sys_tempdir;
+
+mkdir "$tempdir/tblspc1";
+my $realTsDir = "$real_sys_tempdir/tblspc1";
+$node->safe_psql('postgres',
+ "CREATE TABLESPACE tblspc1 LOCATION '$realTsDir';");
+$node->safe_psql('postgres',
+ "CREATE TABLE test1 (a int) TABLESPACE tblspc1;"
+ . "INSERT INTO test1 VALUES (1234);");
+$node->backup('tarbackup2', backup_options => ['-Ft']);
+# empty test1, just so that it's different from the to-be-restored data
+$node->safe_psql('postgres', "TRUNCATE TABLE test1;");
+
+# basic checks on the output
+my $backupdir = $node->backup_dir . '/tarbackup2';
+ok(-f "$backupdir/base.tar", 'backup tar was created');
+ok(-f "$backupdir/pg_wal.tar", 'WAL tar was created');
+my @tblspc_tars = glob "$backupdir/[0-9]*.tar";
+is(scalar(@tblspc_tars), 1, 'one tablespace tar was created');
+
+# Try to verify the tar-format backup by restoring it.
+# For this, we use the tar program identified by configure.
+SKIP:
+{
+ my $tar = $ENV{TAR};
+ # don't check for a working tar here, to accomodate various odd
+ # cases such as AIX. If tar doesn't work the init_from_backup below
+ # will fail.
+ skip "no tar program available", 1
+ if (!defined $tar || $tar eq '');
+
+ my $node2 = get_new_node('replica');
+
+ # Recover main data directory
+ $node2->init_from_backup($node, 'tarbackup2', tar_program => $tar);
+
+ # Recover tablespace into a new directory (not where it was!)
+ my $repTsDir = "$tempdir/tblspc1replica";
+ my $realRepTsDir = "$real_sys_tempdir/tblspc1replica";
+ mkdir $repTsDir;
+ TestLib::system_or_bail($tar, 'xf', $tblspc_tars[0], '-C', $repTsDir);
+
+ # Update tablespace map to point to new directory.
+ # XXX Ideally pg_basebackup would handle this.
+ $tblspc_tars[0] =~ m|/([0-9]*)\.tar$|;
+ my $tblspcoid = $1;
+ my $escapedRepTsDir = $realRepTsDir;
+ $escapedRepTsDir =~ s/\\/\\\\/g;
+ open my $mapfile, '>', $node2->data_dir . '/tablespace_map';
+ print $mapfile "$tblspcoid $escapedRepTsDir\n";
+ close $mapfile;
+
+ $node2->start;
+ my $result = $node2->safe_psql('postgres', 'SELECT * FROM test1');
+ is($result, '1234', "tablespace data restored from tar-format backup");
+ $node2->stop;
+}
+
+# Create an unlogged table to test that forks other than init are not copied.
+$node->safe_psql('postgres',
+ 'CREATE UNLOGGED TABLE tblspc1_unlogged (id int) TABLESPACE tblspc1;');
+
+my $tblspc1UnloggedPath = $node->safe_psql('postgres',
+ q{select pg_relation_filepath('tblspc1_unlogged')});
+
+# Make sure main and init forks exist
+ok( -f "$pgdata/${tblspc1UnloggedPath}_init",
+ 'unlogged init fork in tablespace');
+ok(-f "$pgdata/$tblspc1UnloggedPath", 'unlogged main fork in tablespace');
+
+# Create files that look like temporary relations to ensure they are ignored
+# in a tablespace.
+@tempRelationFiles = qw(t888_888 t888888_888888_vm.1);
+my $tblSpc1Id = basename(
+ dirname(
+ dirname(
+ $node->safe_psql(
+ 'postgres', q{select pg_relation_filepath('test1')}))));
+
+foreach my $filename (@tempRelationFiles)
+{
+ append_to_file(
+ "$real_sys_tempdir/tblspc1/$tblSpc1Id/$postgresOid/$filename",
+ 'TEMP_RELATION');
+}
+
+$node->command_fails(
+ [ 'pg_basebackup', '-D', "$tempdir/backup1", '-Fp' ],
+ 'plain format with tablespaces fails without tablespace mapping');
+
+$node->command_ok(
+ [
+ 'pg_basebackup', '-D',
+ "$tempdir/backup1", '-Fp',
+ "-T$realTsDir=$tempdir/tbackup/tblspc1",
+ ],
+ 'plain format with tablespaces succeeds with tablespace mapping');
+ok(-d "$tempdir/tbackup/tblspc1", 'tablespace was relocated');
+
+# This symlink check is not supported on Windows as -l
+# doesn't work with junctions
+SKIP:
+{
+ skip "symlink check not implemented on Windows", 1
+ if ($windows_os);
+ opendir(my $dh, "$pgdata/pg_tblspc") or die;
+ ok( ( grep {
+ -l "$tempdir/backup1/pg_tblspc/$_"
+ and readlink "$tempdir/backup1/pg_tblspc/$_" eq
+ "$tempdir/tbackup/tblspc1"
+ } readdir($dh)),
+ "tablespace symlink was updated");
+ closedir $dh;
+}
+
+# Group access should be enabled on all backup files
+SKIP:
+{
+ skip "unix-style permissions not supported on Windows", 1
+ if ($windows_os);
+
+ ok(check_mode_recursive("$tempdir/backup1", 0750, 0640),
+ "check backup dir permissions");
+}
+
+# Unlogged relation forks other than init should not be copied
+my ($tblspc1UnloggedBackupPath) =
+ $tblspc1UnloggedPath =~ /[^\/]*\/[^\/]*\/[^\/]*$/g;
+
+ok(-f "$tempdir/tbackup/tblspc1/${tblspc1UnloggedBackupPath}_init",
+ 'unlogged init fork in tablespace backup');
+ok(!-f "$tempdir/tbackup/tblspc1/$tblspc1UnloggedBackupPath",
+ 'unlogged main fork not in tablespace backup');
+
+# Temp relations should not be copied.
+foreach my $filename (@tempRelationFiles)
+{
+ ok(!-f "$tempdir/tbackup/tblspc1/$tblSpc1Id/$postgresOid/$filename",
+ "[tblspc1]/$postgresOid/$filename not copied");
+
+ # Also remove temp relation files or tablespace drop will fail.
+ my $filepath =
+ "$real_sys_tempdir/tblspc1/$tblSpc1Id/$postgresOid/$filename";
+
+ unlink($filepath)
+ or BAIL_OUT("unable to unlink $filepath");
+}
+
+ok( -d "$tempdir/backup1/pg_replslot",
+ 'pg_replslot symlink copied as directory');
+rmtree("$tempdir/backup1");
+
+mkdir "$tempdir/tbl=spc2";
+$realTsDir = "$real_sys_tempdir/tbl=spc2";
+$node->safe_psql('postgres', "DROP TABLE test1;");
+$node->safe_psql('postgres', "DROP TABLE tblspc1_unlogged;");
+$node->safe_psql('postgres', "DROP TABLESPACE tblspc1;");
+$node->safe_psql('postgres',
+ "CREATE TABLESPACE tblspc2 LOCATION '$realTsDir';");
+$realTsDir =~ s/=/\\=/;
+$node->command_ok(
+ [
+ 'pg_basebackup', '-D',
+ "$tempdir/backup3", '-Fp',
+ "-T$realTsDir=$tempdir/tbackup/tbl\\=spc2",
+ ],
+ 'mapping tablespace with = sign in path');
+ok(-d "$tempdir/tbackup/tbl=spc2", 'tablespace with = sign was relocated');
+$node->safe_psql('postgres', "DROP TABLESPACE tblspc2;");
+rmtree("$tempdir/backup3");
+
+mkdir "$tempdir/$superlongname";
+$realTsDir = "$real_sys_tempdir/$superlongname";
+$node->safe_psql('postgres',
+ "CREATE TABLESPACE tblspc3 LOCATION '$realTsDir';");
+$node->command_ok([ 'pg_basebackup', '-D', "$tempdir/tarbackup_l3", '-Ft' ],
+ 'pg_basebackup tar with long symlink target');
+$node->safe_psql('postgres', "DROP TABLESPACE tblspc3;");
+rmtree("$tempdir/tarbackup_l3");
+
+$node->command_ok([ 'pg_basebackup', '-D', "$tempdir/backupR", '-R' ],
+ 'pg_basebackup -R runs');
+ok(-f "$tempdir/backupR/postgresql.auto.conf", 'postgresql.auto.conf exists');
+ok(-f "$tempdir/backupR/standby.signal", 'standby.signal was created');
+my $recovery_conf = slurp_file "$tempdir/backupR/postgresql.auto.conf";
+rmtree("$tempdir/backupR");
+
+my $port = $node->port;
+like(
+ $recovery_conf,
+ qr/^primary_conninfo = '.*port=$port.*'\n/m,
+ 'postgresql.auto.conf sets primary_conninfo');
+
+$node->command_ok(
+ [ 'pg_basebackup', '-D', "$tempdir/backupxd" ],
+ 'pg_basebackup runs in default xlog mode');
+ok(grep(/^[0-9A-F]{24}$/, slurp_dir("$tempdir/backupxd/pg_wal")),
+ 'WAL files copied');
+rmtree("$tempdir/backupxd");
+
+$node->command_ok(
+ [ 'pg_basebackup', '-D', "$tempdir/backupxf", '-X', 'fetch' ],
+ 'pg_basebackup -X fetch runs');
+ok(grep(/^[0-9A-F]{24}$/, slurp_dir("$tempdir/backupxf/pg_wal")),
+ 'WAL files copied');
+rmtree("$tempdir/backupxf");
+$node->command_ok(
+ [ 'pg_basebackup', '-D', "$tempdir/backupxs", '-X', 'stream' ],
+ 'pg_basebackup -X stream runs');
+ok(grep(/^[0-9A-F]{24}$/, slurp_dir("$tempdir/backupxs/pg_wal")),
+ 'WAL files copied');
+rmtree("$tempdir/backupxs");
+$node->command_ok(
+ [ 'pg_basebackup', '-D', "$tempdir/backupxst", '-X', 'stream', '-Ft' ],
+ 'pg_basebackup -X stream runs in tar mode');
+ok(-f "$tempdir/backupxst/pg_wal.tar", "tar file was created");
+rmtree("$tempdir/backupxst");
+$node->command_ok(
+ [
+ 'pg_basebackup', '-D',
+ "$tempdir/backupnoslot", '-X',
+ 'stream', '--no-slot'
+ ],
+ 'pg_basebackup -X stream runs with --no-slot');
+rmtree("$tempdir/backupnoslot");
+
+$node->command_fails(
+ [
+ 'pg_basebackup', '-D',
+ "$tempdir/backupxs_sl_fail", '-X',
+ 'stream', '-S',
+ 'slot0'
+ ],
+ 'pg_basebackup fails with nonexistent replication slot');
+
+$node->command_fails(
+ [ 'pg_basebackup', '-D', "$tempdir/backupxs_slot", '-C' ],
+ 'pg_basebackup -C fails without slot name');
+
+$node->command_fails(
+ [
+ 'pg_basebackup', '-D',
+ "$tempdir/backupxs_slot", '-C',
+ '-S', 'slot0',
+ '--no-slot'
+ ],
+ 'pg_basebackup fails with -C -S --no-slot');
+
+$node->command_ok(
+ [ 'pg_basebackup', '-D', "$tempdir/backupxs_slot", '-C', '-S', 'slot0' ],
+ 'pg_basebackup -C runs');
+rmtree("$tempdir/backupxs_slot");
+
+is( $node->safe_psql(
+ 'postgres',
+ q{SELECT slot_name FROM pg_replication_slots WHERE slot_name = 'slot0'}
+ ),
+ 'slot0',
+ 'replication slot was created');
+isnt(
+ $node->safe_psql(
+ 'postgres',
+ q{SELECT restart_lsn FROM pg_replication_slots WHERE slot_name = 'slot0'}
+ ),
+ '',
+ 'restart LSN of new slot is not null');
+
+$node->command_fails(
+ [ 'pg_basebackup', '-D', "$tempdir/backupxs_slot1", '-C', '-S', 'slot0' ],
+ 'pg_basebackup fails with -C -S and a previously existing slot');
+
+$node->safe_psql('postgres',
+ q{SELECT * FROM pg_create_physical_replication_slot('slot1')});
+my $lsn = $node->safe_psql('postgres',
+ q{SELECT restart_lsn FROM pg_replication_slots WHERE slot_name = 'slot1'}
+);
+is($lsn, '', 'restart LSN of new slot is null');
+$node->command_fails(
+ [ 'pg_basebackup', '-D', "$tempdir/fail", '-S', 'slot1', '-X', 'none' ],
+ 'pg_basebackup with replication slot fails without WAL streaming');
+$node->command_ok(
+ [
+ 'pg_basebackup', '-D', "$tempdir/backupxs_sl", '-X',
+ 'stream', '-S', 'slot1'
+ ],
+ 'pg_basebackup -X stream with replication slot runs');
+$lsn = $node->safe_psql('postgres',
+ q{SELECT restart_lsn FROM pg_replication_slots WHERE slot_name = 'slot1'}
+);
+like($lsn, qr!^0/[0-9A-Z]{7,8}$!, 'restart LSN of slot has advanced');
+rmtree("$tempdir/backupxs_sl");
+
+$node->command_ok(
+ [
+ 'pg_basebackup', '-D', "$tempdir/backupxs_sl_R", '-X',
+ 'stream', '-S', 'slot1', '-R'
+ ],
+ 'pg_basebackup with replication slot and -R runs');
+like(
+ slurp_file("$tempdir/backupxs_sl_R/postgresql.auto.conf"),
+ qr/^primary_slot_name = 'slot1'\n/m,
+ 'recovery conf file sets primary_slot_name');
+
+my $checksum = $node->safe_psql('postgres', 'SHOW data_checksums;');
+is($checksum, 'on', 'checksums are enabled');
+rmtree("$tempdir/backupxs_sl_R");
+
+# create tables to corrupt and get their relfilenodes
+my $file_corrupt1 = $node->safe_psql('postgres',
+ q{CREATE TABLE corrupt1 AS SELECT a FROM generate_series(1,10000) AS a; ALTER TABLE corrupt1 SET (autovacuum_enabled=false); SELECT pg_relation_filepath('corrupt1')}
+);
+my $file_corrupt2 = $node->safe_psql('postgres',
+ q{CREATE TABLE corrupt2 AS SELECT b FROM generate_series(1,2) AS b; ALTER TABLE corrupt2 SET (autovacuum_enabled=false); SELECT pg_relation_filepath('corrupt2')}
+);
+
+# get block size for corruption steps
+my $block_size = $node->safe_psql('postgres', 'SHOW block_size;');
+
+# induce corruption
+$node->stop;
+$node->corrupt_page_checksum($file_corrupt1, 0);
+$node->start;
+
+$node->command_checks_all(
+ [ 'pg_basebackup', '-D', "$tempdir/backup_corrupt" ],
+ 1,
+ [qr{^$}],
+ [qr/^WARNING.*checksum verification failed/s],
+ 'pg_basebackup reports checksum mismatch');
+rmtree("$tempdir/backup_corrupt");
+
+# induce further corruption in 5 more blocks
+$node->stop;
+for my $i (1 .. 5)
+{
+ $node->corrupt_page_checksum($file_corrupt1, $i * $block_size);
+}
+$node->start;
+
+$node->command_checks_all(
+ [ 'pg_basebackup', '-D', "$tempdir/backup_corrupt2" ],
+ 1,
+ [qr{^$}],
+ [qr/^WARNING.*further.*failures.*will.not.be.reported/s],
+ 'pg_basebackup does not report more than 5 checksum mismatches');
+rmtree("$tempdir/backup_corrupt2");
+
+# induce corruption in a second file
+$node->stop;
+$node->corrupt_page_checksum($file_corrupt2, 0);
+$node->start;
+
+$node->command_checks_all(
+ [ 'pg_basebackup', '-D', "$tempdir/backup_corrupt3" ],
+ 1,
+ [qr{^$}],
+ [qr/^WARNING.*7 total checksum verification failures/s],
+ 'pg_basebackup correctly report the total number of checksum mismatches');
+rmtree("$tempdir/backup_corrupt3");
+
+# do not verify checksums, should return ok
+$node->command_ok(
+ [
+ 'pg_basebackup', '-D',
+ "$tempdir/backup_corrupt4", '--no-verify-checksums'
+ ],
+ 'pg_basebackup with -k does not report checksum mismatch');
+rmtree("$tempdir/backup_corrupt4");
+
+$node->safe_psql('postgres', "DROP TABLE corrupt1;");
+$node->safe_psql('postgres', "DROP TABLE corrupt2;");
diff --git a/src/bin/pg_basebackup/t/020_pg_receivewal.pl b/src/bin/pg_basebackup/t/020_pg_receivewal.pl
new file mode 100644
index 0000000..a547c97
--- /dev/null
+++ b/src/bin/pg_basebackup/t/020_pg_receivewal.pl
@@ -0,0 +1,77 @@
+
+# Copyright (c) 2021, PostgreSQL Global Development Group
+
+use strict;
+use warnings;
+use TestLib;
+use PostgresNode;
+use Test::More tests => 19;
+
+program_help_ok('pg_receivewal');
+program_version_ok('pg_receivewal');
+program_options_handling_ok('pg_receivewal');
+
+# Set umask so test directories and files are created with default permissions
+umask(0077);
+
+my $primary = get_new_node('primary');
+$primary->init(allows_streaming => 1);
+$primary->start;
+
+my $stream_dir = $primary->basedir . '/archive_wal';
+mkdir($stream_dir);
+
+# Sanity checks for command line options.
+$primary->command_fails(['pg_receivewal'],
+ 'pg_receivewal needs target directory specified');
+$primary->command_fails(
+ [ 'pg_receivewal', '-D', $stream_dir, '--create-slot', '--drop-slot' ],
+ 'failure if both --create-slot and --drop-slot specified');
+$primary->command_fails(
+ [ 'pg_receivewal', '-D', $stream_dir, '--create-slot' ],
+ 'failure if --create-slot specified without --slot');
+$primary->command_fails(
+ [ 'pg_receivewal', '-D', $stream_dir, '--synchronous', '--no-sync' ],
+ 'failure if --synchronous specified with --no-sync');
+
+# Slot creation and drop
+my $slot_name = 'test';
+$primary->command_ok(
+ [ 'pg_receivewal', '--slot', $slot_name, '--create-slot' ],
+ 'creating a replication slot');
+my $slot = $primary->slot($slot_name);
+is($slot->{'slot_type'}, 'physical', 'physical replication slot was created');
+is($slot->{'restart_lsn'}, '', 'restart LSN of new slot is null');
+$primary->command_ok([ 'pg_receivewal', '--slot', $slot_name, '--drop-slot' ],
+ 'dropping a replication slot');
+is($primary->slot($slot_name)->{'slot_type'},
+ '', 'replication slot was removed');
+
+# Generate some WAL. Use --synchronous at the same time to add more
+# code coverage. Switch to the next segment first so that subsequent
+# restarts of pg_receivewal will see this segment as full..
+$primary->psql('postgres', 'CREATE TABLE test_table(x integer);');
+$primary->psql('postgres', 'SELECT pg_switch_wal();');
+my $nextlsn =
+ $primary->safe_psql('postgres', 'SELECT pg_current_wal_insert_lsn();');
+chomp($nextlsn);
+$primary->psql('postgres',
+ 'INSERT INTO test_table VALUES (generate_series(1,100));');
+
+# Stream up to the given position.
+$primary->command_ok(
+ [
+ 'pg_receivewal', '-D', $stream_dir, '--verbose',
+ '--endpos', $nextlsn, '--synchronous', '--no-loop'
+ ],
+ 'streaming some WAL with --synchronous');
+
+# Permissions on WAL files should be default
+SKIP:
+{
+ skip "unix-style permissions not supported on Windows", 1
+ if ($windows_os);
+
+ ok(check_mode_recursive($stream_dir, 0700, 0600),
+ "check stream dir permissions");
+}
diff --git a/src/bin/pg_basebackup/t/030_pg_recvlogical.pl b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl
new file mode 100644
index 0000000..53f4181
--- /dev/null
+++ b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl
@@ -0,0 +1,65 @@
+
+# Copyright (c) 2021, PostgreSQL Global Development Group
+
+use strict;
+use warnings;
+use TestLib;
+use PostgresNode;
+use Test::More tests => 15;
+
+program_help_ok('pg_recvlogical');
+program_version_ok('pg_recvlogical');
+program_options_handling_ok('pg_recvlogical');
+
+my $node = get_new_node('main');
+
+# Initialize node without replication settings
+$node->init(allows_streaming => 1, has_archiving => 1);
+$node->append_conf(
+ 'postgresql.conf', q{
+wal_level = 'logical'
+max_replication_slots = 4
+max_wal_senders = 4
+log_min_messages = 'debug1'
+log_error_verbosity = verbose
+});
+$node->dump_info;
+$node->start;
+
+$node->command_fails(['pg_recvlogical'], 'pg_recvlogical needs a slot name');
+$node->command_fails([ 'pg_recvlogical', '-S', 'test' ],
+ 'pg_recvlogical needs a database');
+$node->command_fails([ 'pg_recvlogical', '-S', 'test', '-d', 'postgres' ],
+ 'pg_recvlogical needs an action');
+$node->command_fails(
+ [
+ 'pg_recvlogical', '-S',
+ 'test', '-d',
+ $node->connstr('postgres'), '--start'
+ ],
+ 'no destination file');
+
+$node->command_ok(
+ [
+ 'pg_recvlogical', '-S',
+ 'test', '-d',
+ $node->connstr('postgres'), '--create-slot'
+ ],
+ 'slot created');
+
+my $slot = $node->slot('test');
+isnt($slot->{'restart_lsn'}, '', 'restart lsn is defined for new slot');
+
+$node->psql('postgres', 'CREATE TABLE test_table(x integer)');
+$node->psql('postgres',
+ 'INSERT INTO test_table(x) SELECT y FROM generate_series(1, 10) a(y);');
+my $nextlsn =
+ $node->safe_psql('postgres', 'SELECT pg_current_wal_insert_lsn()');
+chomp($nextlsn);
+
+$node->command_ok(
+ [
+ 'pg_recvlogical', '-S', 'test', '-d', $node->connstr('postgres'),
+ '--start', '--endpos', "$nextlsn", '--no-loop', '-f', '-'
+ ],
+ 'replayed a transaction');
diff --git a/src/bin/pg_basebackup/walmethods.c b/src/bin/pg_basebackup/walmethods.c
new file mode 100644
index 0000000..be98057
--- /dev/null
+++ b/src/bin/pg_basebackup/walmethods.c
@@ -0,0 +1,1161 @@
+/*-------------------------------------------------------------------------
+ *
+ * walmethods.c - implementations of different ways to write received wal
+ *
+ * NOTE! The caller must ensure that only one method is instantiated in
+ * any given program, and that it's only instantiated once!
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_basebackup/walmethods.c
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <sys/stat.h>
+#include <time.h>
+#include <unistd.h>
+#ifdef HAVE_LIBZ
+#include <zlib.h>
+#endif
+
+#include "common/file_perm.h"
+#include "common/file_utils.h"
+#include "common/logging.h"
+#include "pgtar.h"
+#include "receivelog.h"
+#include "streamutil.h"
+
+/* Size of zlib buffer for .tar.gz */
+#define ZLIB_OUT_SIZE 4096
+
+/*-------------------------------------------------------------------------
+ * WalDirectoryMethod - write wal to a directory looking like pg_wal
+ *-------------------------------------------------------------------------
+ */
+
+/*
+ * Global static data for this method
+ */
+typedef struct DirectoryMethodData
+{
+ char *basedir;
+ int compression;
+ bool sync;
+ const char *lasterrstring; /* if set, takes precedence over lasterrno */
+ int lasterrno;
+} DirectoryMethodData;
+static DirectoryMethodData *dir_data = NULL;
+
+/*
+ * Local file handle
+ */
+typedef struct DirectoryMethodFile
+{
+ int fd;
+ off_t currpos;
+ char *pathname;
+ char *fullpath;
+ char *temp_suffix;
+#ifdef HAVE_LIBZ
+ gzFile gzfp;
+#endif
+} DirectoryMethodFile;
+
+#define dir_clear_error() \
+ (dir_data->lasterrstring = NULL, dir_data->lasterrno = 0)
+#define dir_set_error(msg) \
+ (dir_data->lasterrstring = _(msg))
+
+static const char *
+dir_getlasterror(void)
+{
+ if (dir_data->lasterrstring)
+ return dir_data->lasterrstring;
+ return strerror(dir_data->lasterrno);
+}
+
+static char *
+dir_get_file_name(const char *pathname, const char *temp_suffix)
+{
+ char *filename = pg_malloc0(MAXPGPATH * sizeof(char));
+
+ snprintf(filename, MAXPGPATH, "%s%s%s",
+ pathname, dir_data->compression > 0 ? ".gz" : "",
+ temp_suffix ? temp_suffix : "");
+
+ return filename;
+}
+
+static Walfile
+dir_open_for_write(const char *pathname, const char *temp_suffix, size_t pad_to_size)
+{
+ char tmppath[MAXPGPATH];
+ char *filename;
+ int fd;
+ DirectoryMethodFile *f;
+#ifdef HAVE_LIBZ
+ gzFile gzfp = NULL;
+#endif
+
+ dir_clear_error();
+
+ filename = dir_get_file_name(pathname, temp_suffix);
+ snprintf(tmppath, sizeof(tmppath), "%s/%s",
+ dir_data->basedir, filename);
+ pg_free(filename);
+
+ /*
+ * Open a file for non-compressed as well as compressed files. Tracking
+ * the file descriptor is important for dir_sync() method as gzflush()
+ * does not do any system calls to fsync() to make changes permanent on
+ * disk.
+ */
+ fd = open(tmppath, O_WRONLY | O_CREAT | PG_BINARY, pg_file_create_mode);
+ if (fd < 0)
+ {
+ dir_data->lasterrno = errno;
+ return NULL;
+ }
+
+#ifdef HAVE_LIBZ
+ if (dir_data->compression > 0)
+ {
+ gzfp = gzdopen(fd, "wb");
+ if (gzfp == NULL)
+ {
+ dir_data->lasterrno = errno;
+ close(fd);
+ return NULL;
+ }
+
+ if (gzsetparams(gzfp, dir_data->compression,
+ Z_DEFAULT_STRATEGY) != Z_OK)
+ {
+ dir_data->lasterrno = errno;
+ gzclose(gzfp);
+ return NULL;
+ }
+ }
+#endif
+
+ /* Do pre-padding on non-compressed files */
+ if (pad_to_size && dir_data->compression == 0)
+ {
+ PGAlignedXLogBlock zerobuf;
+ int bytes;
+
+ memset(zerobuf.data, 0, XLOG_BLCKSZ);
+ for (bytes = 0; bytes < pad_to_size; bytes += XLOG_BLCKSZ)
+ {
+ errno = 0;
+ if (write(fd, zerobuf.data, XLOG_BLCKSZ) != XLOG_BLCKSZ)
+ {
+ /* If write didn't set errno, assume problem is no disk space */
+ dir_data->lasterrno = errno ? errno : ENOSPC;
+ close(fd);
+ return NULL;
+ }
+ }
+
+ if (lseek(fd, 0, SEEK_SET) != 0)
+ {
+ dir_data->lasterrno = errno;
+ close(fd);
+ return NULL;
+ }
+ }
+
+ /*
+ * fsync WAL file and containing directory, to ensure the file is
+ * persistently created and zeroed (if padded). That's particularly
+ * important when using synchronous mode, where the file is modified and
+ * fsynced in-place, without a directory fsync.
+ */
+ if (dir_data->sync)
+ {
+ if (fsync_fname(tmppath, false) != 0 ||
+ fsync_parent_path(tmppath) != 0)
+ {
+ dir_data->lasterrno = errno;
+#ifdef HAVE_LIBZ
+ if (dir_data->compression > 0)
+ gzclose(gzfp);
+ else
+#endif
+ close(fd);
+ return NULL;
+ }
+ }
+
+ f = pg_malloc0(sizeof(DirectoryMethodFile));
+#ifdef HAVE_LIBZ
+ if (dir_data->compression > 0)
+ f->gzfp = gzfp;
+#endif
+ f->fd = fd;
+ f->currpos = 0;
+ f->pathname = pg_strdup(pathname);
+ f->fullpath = pg_strdup(tmppath);
+ if (temp_suffix)
+ f->temp_suffix = pg_strdup(temp_suffix);
+
+ return f;
+}
+
+static ssize_t
+dir_write(Walfile f, const void *buf, size_t count)
+{
+ ssize_t r;
+ DirectoryMethodFile *df = (DirectoryMethodFile *) f;
+
+ Assert(f != NULL);
+ dir_clear_error();
+
+#ifdef HAVE_LIBZ
+ if (dir_data->compression > 0)
+ {
+ errno = 0;
+ r = (ssize_t) gzwrite(df->gzfp, buf, count);
+ if (r != count)
+ {
+ /* If write didn't set errno, assume problem is no disk space */
+ dir_data->lasterrno = errno ? errno : ENOSPC;
+ }
+ }
+ else
+#endif
+ {
+ errno = 0;
+ r = write(df->fd, buf, count);
+ if (r != count)
+ {
+ /* If write didn't set errno, assume problem is no disk space */
+ dir_data->lasterrno = errno ? errno : ENOSPC;
+ }
+ }
+ if (r > 0)
+ df->currpos += r;
+ return r;
+}
+
+static off_t
+dir_get_current_pos(Walfile f)
+{
+ Assert(f != NULL);
+ dir_clear_error();
+
+ /* Use a cached value to prevent lots of reseeks */
+ return ((DirectoryMethodFile *) f)->currpos;
+}
+
+static int
+dir_close(Walfile f, WalCloseMethod method)
+{
+ int r;
+ DirectoryMethodFile *df = (DirectoryMethodFile *) f;
+ char tmppath[MAXPGPATH];
+ char tmppath2[MAXPGPATH];
+
+ Assert(f != NULL);
+ dir_clear_error();
+
+#ifdef HAVE_LIBZ
+ if (dir_data->compression > 0)
+ {
+ errno = 0; /* in case gzclose() doesn't set it */
+ r = gzclose(df->gzfp);
+ }
+ else
+#endif
+ r = close(df->fd);
+
+ if (r == 0)
+ {
+ /* Build path to the current version of the file */
+ if (method == CLOSE_NORMAL && df->temp_suffix)
+ {
+ char *filename;
+ char *filename2;
+
+ /*
+ * If we have a temp prefix, normal operation is to rename the
+ * file.
+ */
+ filename = dir_get_file_name(df->pathname, df->temp_suffix);
+ snprintf(tmppath, sizeof(tmppath), "%s/%s",
+ dir_data->basedir, filename);
+ pg_free(filename);
+
+ /* permanent name, so no need for the prefix */
+ filename2 = dir_get_file_name(df->pathname, NULL);
+ snprintf(tmppath2, sizeof(tmppath2), "%s/%s",
+ dir_data->basedir, filename2);
+ pg_free(filename2);
+ r = durable_rename(tmppath, tmppath2);
+ }
+ else if (method == CLOSE_UNLINK)
+ {
+ char *filename;
+
+ /* Unlink the file once it's closed */
+ filename = dir_get_file_name(df->pathname, df->temp_suffix);
+ snprintf(tmppath, sizeof(tmppath), "%s/%s",
+ dir_data->basedir, filename);
+ pg_free(filename);
+ r = unlink(tmppath);
+ }
+ else
+ {
+ /*
+ * Else either CLOSE_NORMAL and no temp suffix, or
+ * CLOSE_NO_RENAME. In this case, fsync the file and containing
+ * directory if sync mode is requested.
+ */
+ if (dir_data->sync)
+ {
+ r = fsync_fname(df->fullpath, false);
+ if (r == 0)
+ r = fsync_parent_path(df->fullpath);
+ }
+ }
+ }
+
+ if (r != 0)
+ dir_data->lasterrno = errno;
+
+ pg_free(df->pathname);
+ pg_free(df->fullpath);
+ if (df->temp_suffix)
+ pg_free(df->temp_suffix);
+ pg_free(df);
+
+ return r;
+}
+
+static int
+dir_sync(Walfile f)
+{
+ int r;
+
+ Assert(f != NULL);
+ dir_clear_error();
+
+ if (!dir_data->sync)
+ return 0;
+
+#ifdef HAVE_LIBZ
+ if (dir_data->compression > 0)
+ {
+ if (gzflush(((DirectoryMethodFile *) f)->gzfp, Z_SYNC_FLUSH) != Z_OK)
+ {
+ dir_data->lasterrno = errno;
+ return -1;
+ }
+ }
+#endif
+
+ r = fsync(((DirectoryMethodFile *) f)->fd);
+ if (r < 0)
+ dir_data->lasterrno = errno;
+ return r;
+}
+
+static ssize_t
+dir_get_file_size(const char *pathname)
+{
+ struct stat statbuf;
+ char tmppath[MAXPGPATH];
+
+ snprintf(tmppath, sizeof(tmppath), "%s/%s",
+ dir_data->basedir, pathname);
+
+ if (stat(tmppath, &statbuf) != 0)
+ {
+ dir_data->lasterrno = errno;
+ return -1;
+ }
+
+ return statbuf.st_size;
+}
+
+static int
+dir_compression(void)
+{
+ return dir_data->compression;
+}
+
+static bool
+dir_existsfile(const char *pathname)
+{
+ char tmppath[MAXPGPATH];
+ int fd;
+
+ dir_clear_error();
+
+ snprintf(tmppath, sizeof(tmppath), "%s/%s",
+ dir_data->basedir, pathname);
+
+ fd = open(tmppath, O_RDONLY | PG_BINARY, 0);
+ if (fd < 0)
+ return false;
+ close(fd);
+ return true;
+}
+
+static bool
+dir_finish(void)
+{
+ dir_clear_error();
+
+ if (dir_data->sync)
+ {
+ /*
+ * Files are fsynced when they are closed, but we need to fsync the
+ * directory entry here as well.
+ */
+ if (fsync_fname(dir_data->basedir, true) != 0)
+ {
+ dir_data->lasterrno = errno;
+ return false;
+ }
+ }
+ return true;
+}
+
+
+WalWriteMethod *
+CreateWalDirectoryMethod(const char *basedir, int compression, bool sync)
+{
+ WalWriteMethod *method;
+
+ method = pg_malloc0(sizeof(WalWriteMethod));
+ method->open_for_write = dir_open_for_write;
+ method->write = dir_write;
+ method->get_current_pos = dir_get_current_pos;
+ method->get_file_size = dir_get_file_size;
+ method->get_file_name = dir_get_file_name;
+ method->compression = dir_compression;
+ method->close = dir_close;
+ method->sync = dir_sync;
+ method->existsfile = dir_existsfile;
+ method->finish = dir_finish;
+ method->getlasterror = dir_getlasterror;
+
+ dir_data = pg_malloc0(sizeof(DirectoryMethodData));
+ dir_data->compression = compression;
+ dir_data->basedir = pg_strdup(basedir);
+ dir_data->sync = sync;
+
+ return method;
+}
+
+void
+FreeWalDirectoryMethod(void)
+{
+ pg_free(dir_data->basedir);
+ pg_free(dir_data);
+ dir_data = NULL;
+}
+
+
+/*-------------------------------------------------------------------------
+ * WalTarMethod - write wal to a tar file containing pg_wal contents
+ *-------------------------------------------------------------------------
+ */
+
+typedef struct TarMethodFile
+{
+ off_t ofs_start; /* Where does the *header* for this file start */
+ off_t currpos;
+ char header[TAR_BLOCK_SIZE];
+ char *pathname;
+ size_t pad_to_size;
+} TarMethodFile;
+
+typedef struct TarMethodData
+{
+ char *tarfilename;
+ int fd;
+ int compression;
+ bool sync;
+ TarMethodFile *currentfile;
+ const char *lasterrstring; /* if set, takes precedence over lasterrno */
+ int lasterrno;
+#ifdef HAVE_LIBZ
+ z_streamp zp;
+ void *zlibOut;
+#endif
+} TarMethodData;
+static TarMethodData *tar_data = NULL;
+
+#define tar_clear_error() \
+ (tar_data->lasterrstring = NULL, tar_data->lasterrno = 0)
+#define tar_set_error(msg) \
+ (tar_data->lasterrstring = _(msg))
+
+static const char *
+tar_getlasterror(void)
+{
+ if (tar_data->lasterrstring)
+ return tar_data->lasterrstring;
+ return strerror(tar_data->lasterrno);
+}
+
+#ifdef HAVE_LIBZ
+static bool
+tar_write_compressed_data(void *buf, size_t count, bool flush)
+{
+ tar_data->zp->next_in = buf;
+ tar_data->zp->avail_in = count;
+
+ while (tar_data->zp->avail_in || flush)
+ {
+ int r;
+
+ r = deflate(tar_data->zp, flush ? Z_FINISH : Z_NO_FLUSH);
+ if (r == Z_STREAM_ERROR)
+ {
+ tar_set_error("could not compress data");
+ return false;
+ }
+
+ if (tar_data->zp->avail_out < ZLIB_OUT_SIZE)
+ {
+ size_t len = ZLIB_OUT_SIZE - tar_data->zp->avail_out;
+
+ errno = 0;
+ if (write(tar_data->fd, tar_data->zlibOut, len) != len)
+ {
+ /* If write didn't set errno, assume problem is no disk space */
+ tar_data->lasterrno = errno ? errno : ENOSPC;
+ return false;
+ }
+
+ tar_data->zp->next_out = tar_data->zlibOut;
+ tar_data->zp->avail_out = ZLIB_OUT_SIZE;
+ }
+
+ if (r == Z_STREAM_END)
+ break;
+ }
+
+ if (flush)
+ {
+ /* Reset the stream for writing */
+ if (deflateReset(tar_data->zp) != Z_OK)
+ {
+ tar_set_error("could not reset compression stream");
+ return false;
+ }
+ }
+
+ return true;
+}
+#endif
+
+static ssize_t
+tar_write(Walfile f, const void *buf, size_t count)
+{
+ ssize_t r;
+
+ Assert(f != NULL);
+ tar_clear_error();
+
+ /* Tarfile will always be positioned at the end */
+ if (!tar_data->compression)
+ {
+ errno = 0;
+ r = write(tar_data->fd, buf, count);
+ if (r != count)
+ {
+ /* If write didn't set errno, assume problem is no disk space */
+ tar_data->lasterrno = errno ? errno : ENOSPC;
+ return -1;
+ }
+ ((TarMethodFile *) f)->currpos += r;
+ return r;
+ }
+#ifdef HAVE_LIBZ
+ else
+ {
+ if (!tar_write_compressed_data(unconstify(void *, buf), count, false))
+ return -1;
+ ((TarMethodFile *) f)->currpos += count;
+ return count;
+ }
+#else
+ else
+ {
+ /* Can't happen - compression enabled with no libz */
+ tar_data->lasterrno = ENOSYS;
+ return -1;
+ }
+#endif
+}
+
+static bool
+tar_write_padding_data(TarMethodFile *f, size_t bytes)
+{
+ PGAlignedXLogBlock zerobuf;
+ size_t bytesleft = bytes;
+
+ memset(zerobuf.data, 0, XLOG_BLCKSZ);
+ while (bytesleft)
+ {
+ size_t bytestowrite = Min(bytesleft, XLOG_BLCKSZ);
+ ssize_t r = tar_write(f, zerobuf.data, bytestowrite);
+
+ if (r < 0)
+ return false;
+ bytesleft -= r;
+ }
+
+ return true;
+}
+
+static char *
+tar_get_file_name(const char *pathname, const char *temp_suffix)
+{
+ char *filename = pg_malloc0(MAXPGPATH * sizeof(char));
+
+ snprintf(filename, MAXPGPATH, "%s%s",
+ pathname, temp_suffix ? temp_suffix : "");
+
+ return filename;
+}
+
+static Walfile
+tar_open_for_write(const char *pathname, const char *temp_suffix, size_t pad_to_size)
+{
+ char *tmppath;
+
+ tar_clear_error();
+
+ if (tar_data->fd < 0)
+ {
+ /*
+ * We open the tar file only when we first try to write to it.
+ */
+ tar_data->fd = open(tar_data->tarfilename,
+ O_WRONLY | O_CREAT | PG_BINARY,
+ pg_file_create_mode);
+ if (tar_data->fd < 0)
+ {
+ tar_data->lasterrno = errno;
+ return NULL;
+ }
+
+#ifdef HAVE_LIBZ
+ if (tar_data->compression)
+ {
+ tar_data->zp = (z_streamp) pg_malloc(sizeof(z_stream));
+ tar_data->zp->zalloc = Z_NULL;
+ tar_data->zp->zfree = Z_NULL;
+ tar_data->zp->opaque = Z_NULL;
+ tar_data->zp->next_out = tar_data->zlibOut;
+ tar_data->zp->avail_out = ZLIB_OUT_SIZE;
+
+ /*
+ * Initialize deflation library. Adding the magic value 16 to the
+ * default 15 for the windowBits parameter makes the output be
+ * gzip instead of zlib.
+ */
+ if (deflateInit2(tar_data->zp, tar_data->compression, Z_DEFLATED, 15 + 16, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+ {
+ pg_free(tar_data->zp);
+ tar_data->zp = NULL;
+ tar_set_error("could not initialize compression library");
+ return NULL;
+ }
+ }
+#endif
+
+ /* There's no tar header itself, the file starts with regular files */
+ }
+
+ if (tar_data->currentfile != NULL)
+ {
+ tar_set_error("implementation error: tar files can't have more than one open file");
+ return NULL;
+ }
+
+ tar_data->currentfile = pg_malloc0(sizeof(TarMethodFile));
+
+ tmppath = tar_get_file_name(pathname, temp_suffix);
+
+ /* Create a header with size set to 0 - we will fill out the size on close */
+ if (tarCreateHeader(tar_data->currentfile->header, tmppath, NULL, 0, S_IRUSR | S_IWUSR, 0, 0, time(NULL)) != TAR_OK)
+ {
+ pg_free(tar_data->currentfile);
+ pg_free(tmppath);
+ tar_data->currentfile = NULL;
+ tar_set_error("could not create tar header");
+ return NULL;
+ }
+
+ pg_free(tmppath);
+
+#ifdef HAVE_LIBZ
+ if (tar_data->compression)
+ {
+ /* Flush existing data */
+ if (!tar_write_compressed_data(NULL, 0, true))
+ return NULL;
+
+ /* Turn off compression for header */
+ if (deflateParams(tar_data->zp, 0, 0) != Z_OK)
+ {
+ tar_set_error("could not change compression parameters");
+ return NULL;
+ }
+ }
+#endif
+
+ tar_data->currentfile->ofs_start = lseek(tar_data->fd, 0, SEEK_CUR);
+ if (tar_data->currentfile->ofs_start == -1)
+ {
+ tar_data->lasterrno = errno;
+ pg_free(tar_data->currentfile);
+ tar_data->currentfile = NULL;
+ return NULL;
+ }
+ tar_data->currentfile->currpos = 0;
+
+ if (!tar_data->compression)
+ {
+ errno = 0;
+ if (write(tar_data->fd, tar_data->currentfile->header,
+ TAR_BLOCK_SIZE) != TAR_BLOCK_SIZE)
+ {
+ /* If write didn't set errno, assume problem is no disk space */
+ tar_data->lasterrno = errno ? errno : ENOSPC;
+ pg_free(tar_data->currentfile);
+ tar_data->currentfile = NULL;
+ return NULL;
+ }
+ }
+#ifdef HAVE_LIBZ
+ else
+ {
+ /* Write header through the zlib APIs but with no compression */
+ if (!tar_write_compressed_data(tar_data->currentfile->header,
+ TAR_BLOCK_SIZE, true))
+ return NULL;
+
+ /* Re-enable compression for the rest of the file */
+ if (deflateParams(tar_data->zp, tar_data->compression, 0) != Z_OK)
+ {
+ tar_set_error("could not change compression parameters");
+ return NULL;
+ }
+ }
+#endif
+
+ tar_data->currentfile->pathname = pg_strdup(pathname);
+
+ /*
+ * Uncompressed files are padded on creation, but for compression we can't
+ * do that
+ */
+ if (pad_to_size)
+ {
+ tar_data->currentfile->pad_to_size = pad_to_size;
+ if (!tar_data->compression)
+ {
+ /* Uncompressed, so pad now */
+ if (!tar_write_padding_data(tar_data->currentfile, pad_to_size))
+ return NULL;
+ /* Seek back to start */
+ if (lseek(tar_data->fd,
+ tar_data->currentfile->ofs_start + TAR_BLOCK_SIZE,
+ SEEK_SET) != tar_data->currentfile->ofs_start + TAR_BLOCK_SIZE)
+ {
+ tar_data->lasterrno = errno;
+ return NULL;
+ }
+
+ tar_data->currentfile->currpos = 0;
+ }
+ }
+
+ return tar_data->currentfile;
+}
+
+static ssize_t
+tar_get_file_size(const char *pathname)
+{
+ tar_clear_error();
+
+ /* Currently not used, so not supported */
+ tar_data->lasterrno = ENOSYS;
+ return -1;
+}
+
+static int
+tar_compression(void)
+{
+ return tar_data->compression;
+}
+
+static off_t
+tar_get_current_pos(Walfile f)
+{
+ Assert(f != NULL);
+ tar_clear_error();
+
+ return ((TarMethodFile *) f)->currpos;
+}
+
+static int
+tar_sync(Walfile f)
+{
+ int r;
+
+ Assert(f != NULL);
+ tar_clear_error();
+
+ if (!tar_data->sync)
+ return 0;
+
+ /*
+ * Always sync the whole tarfile, because that's all we can do. This makes
+ * no sense on compressed files, so just ignore those.
+ */
+ if (tar_data->compression)
+ return 0;
+
+ r = fsync(tar_data->fd);
+ if (r < 0)
+ tar_data->lasterrno = errno;
+ return r;
+}
+
+static int
+tar_close(Walfile f, WalCloseMethod method)
+{
+ ssize_t filesize;
+ int padding;
+ TarMethodFile *tf = (TarMethodFile *) f;
+
+ Assert(f != NULL);
+ tar_clear_error();
+
+ if (method == CLOSE_UNLINK)
+ {
+ if (tar_data->compression)
+ {
+ tar_set_error("unlink not supported with compression");
+ return -1;
+ }
+
+ /*
+ * Unlink the file that we just wrote to the tar. We do this by
+ * truncating it to the start of the header. This is safe as we only
+ * allow writing of the very last file.
+ */
+ if (ftruncate(tar_data->fd, tf->ofs_start) != 0)
+ {
+ tar_data->lasterrno = errno;
+ return -1;
+ }
+
+ pg_free(tf->pathname);
+ pg_free(tf);
+ tar_data->currentfile = NULL;
+
+ return 0;
+ }
+
+ /*
+ * Pad the file itself with zeroes if necessary. Note that this is
+ * different from the tar format padding -- this is the padding we asked
+ * for when the file was opened.
+ */
+ if (tf->pad_to_size)
+ {
+ if (tar_data->compression)
+ {
+ /*
+ * A compressed tarfile is padded on close since we cannot know
+ * the size of the compressed output until the end.
+ */
+ size_t sizeleft = tf->pad_to_size - tf->currpos;
+
+ if (sizeleft)
+ {
+ if (!tar_write_padding_data(tf, sizeleft))
+ return -1;
+ }
+ }
+ else
+ {
+ /*
+ * An uncompressed tarfile was padded on creation, so just adjust
+ * the current position as if we seeked to the end.
+ */
+ tf->currpos = tf->pad_to_size;
+ }
+ }
+
+ /*
+ * Get the size of the file, and pad out to a multiple of the tar block
+ * size.
+ */
+ filesize = tar_get_current_pos(f);
+ padding = tarPaddingBytesRequired(filesize);
+ if (padding)
+ {
+ char zerobuf[TAR_BLOCK_SIZE];
+
+ MemSet(zerobuf, 0, padding);
+ if (tar_write(f, zerobuf, padding) != padding)
+ return -1;
+ }
+
+
+#ifdef HAVE_LIBZ
+ if (tar_data->compression)
+ {
+ /* Flush the current buffer */
+ if (!tar_write_compressed_data(NULL, 0, true))
+ return -1;
+ }
+#endif
+
+ /*
+ * Now go back and update the header with the correct filesize and
+ * possibly also renaming the file. We overwrite the entire current header
+ * when done, including the checksum.
+ */
+ print_tar_number(&(tf->header[124]), 12, filesize);
+
+ if (method == CLOSE_NORMAL)
+
+ /*
+ * We overwrite it with what it was before if we have no tempname,
+ * since we're going to write the buffer anyway.
+ */
+ strlcpy(&(tf->header[0]), tf->pathname, 100);
+
+ print_tar_number(&(tf->header[148]), 8, tarChecksum(((TarMethodFile *) f)->header));
+ if (lseek(tar_data->fd, tf->ofs_start, SEEK_SET) != ((TarMethodFile *) f)->ofs_start)
+ {
+ tar_data->lasterrno = errno;
+ return -1;
+ }
+ if (!tar_data->compression)
+ {
+ errno = 0;
+ if (write(tar_data->fd, tf->header, TAR_BLOCK_SIZE) != TAR_BLOCK_SIZE)
+ {
+ /* If write didn't set errno, assume problem is no disk space */
+ tar_data->lasterrno = errno ? errno : ENOSPC;
+ return -1;
+ }
+ }
+#ifdef HAVE_LIBZ
+ else
+ {
+ /* Turn off compression */
+ if (deflateParams(tar_data->zp, 0, 0) != Z_OK)
+ {
+ tar_set_error("could not change compression parameters");
+ return -1;
+ }
+
+ /* Overwrite the header, assuming the size will be the same */
+ if (!tar_write_compressed_data(tar_data->currentfile->header,
+ TAR_BLOCK_SIZE, true))
+ return -1;
+
+ /* Turn compression back on */
+ if (deflateParams(tar_data->zp, tar_data->compression, 0) != Z_OK)
+ {
+ tar_set_error("could not change compression parameters");
+ return -1;
+ }
+ }
+#endif
+
+ /* Move file pointer back down to end, so we can write the next file */
+ if (lseek(tar_data->fd, 0, SEEK_END) < 0)
+ {
+ tar_data->lasterrno = errno;
+ return -1;
+ }
+
+ /* Always fsync on close, so the padding gets fsynced */
+ if (tar_sync(f) < 0)
+ {
+ /* XXX this seems pretty bogus; why is only this case fatal? */
+ pg_log_fatal("could not fsync file \"%s\": %s",
+ tf->pathname, tar_getlasterror());
+ exit(1);
+ }
+
+ /* Clean up and done */
+ pg_free(tf->pathname);
+ pg_free(tf);
+ tar_data->currentfile = NULL;
+
+ return 0;
+}
+
+static bool
+tar_existsfile(const char *pathname)
+{
+ tar_clear_error();
+ /* We only deal with new tarfiles, so nothing externally created exists */
+ return false;
+}
+
+static bool
+tar_finish(void)
+{
+ char zerobuf[1024];
+
+ tar_clear_error();
+
+ if (tar_data->currentfile)
+ {
+ if (tar_close(tar_data->currentfile, CLOSE_NORMAL) != 0)
+ return false;
+ }
+
+ /* A tarfile always ends with two empty blocks */
+ MemSet(zerobuf, 0, sizeof(zerobuf));
+ if (!tar_data->compression)
+ {
+ errno = 0;
+ if (write(tar_data->fd, zerobuf, sizeof(zerobuf)) != sizeof(zerobuf))
+ {
+ /* If write didn't set errno, assume problem is no disk space */
+ tar_data->lasterrno = errno ? errno : ENOSPC;
+ return false;
+ }
+ }
+#ifdef HAVE_LIBZ
+ else
+ {
+ if (!tar_write_compressed_data(zerobuf, sizeof(zerobuf), false))
+ return false;
+
+ /* Also flush all data to make sure the gzip stream is finished */
+ tar_data->zp->next_in = NULL;
+ tar_data->zp->avail_in = 0;
+ while (true)
+ {
+ int r;
+
+ r = deflate(tar_data->zp, Z_FINISH);
+
+ if (r == Z_STREAM_ERROR)
+ {
+ tar_set_error("could not compress data");
+ return false;
+ }
+ if (tar_data->zp->avail_out < ZLIB_OUT_SIZE)
+ {
+ size_t len = ZLIB_OUT_SIZE - tar_data->zp->avail_out;
+
+ errno = 0;
+ if (write(tar_data->fd, tar_data->zlibOut, len) != len)
+ {
+ /*
+ * If write didn't set errno, assume problem is no disk
+ * space.
+ */
+ tar_data->lasterrno = errno ? errno : ENOSPC;
+ return false;
+ }
+ }
+ if (r == Z_STREAM_END)
+ break;
+ }
+
+ if (deflateEnd(tar_data->zp) != Z_OK)
+ {
+ tar_set_error("could not close compression stream");
+ return false;
+ }
+ }
+#endif
+
+ /* sync the empty blocks as well, since they're after the last file */
+ if (tar_data->sync)
+ {
+ if (fsync(tar_data->fd) != 0)
+ {
+ tar_data->lasterrno = errno;
+ return false;
+ }
+ }
+
+ if (close(tar_data->fd) != 0)
+ {
+ tar_data->lasterrno = errno;
+ return false;
+ }
+
+ tar_data->fd = -1;
+
+ if (tar_data->sync)
+ {
+ if (fsync_fname(tar_data->tarfilename, false) != 0 ||
+ fsync_parent_path(tar_data->tarfilename) != 0)
+ {
+ tar_data->lasterrno = errno;
+ return false;
+ }
+ }
+
+ return true;
+}
+
+WalWriteMethod *
+CreateWalTarMethod(const char *tarbase, int compression, bool sync)
+{
+ WalWriteMethod *method;
+ const char *suffix = (compression != 0) ? ".tar.gz" : ".tar";
+
+ method = pg_malloc0(sizeof(WalWriteMethod));
+ method->open_for_write = tar_open_for_write;
+ method->write = tar_write;
+ method->get_current_pos = tar_get_current_pos;
+ method->get_file_size = tar_get_file_size;
+ method->get_file_name = tar_get_file_name;
+ method->compression = tar_compression;
+ method->close = tar_close;
+ method->sync = tar_sync;
+ method->existsfile = tar_existsfile;
+ method->finish = tar_finish;
+ method->getlasterror = tar_getlasterror;
+
+ tar_data = pg_malloc0(sizeof(TarMethodData));
+ tar_data->tarfilename = pg_malloc0(strlen(tarbase) + strlen(suffix) + 1);
+ sprintf(tar_data->tarfilename, "%s%s", tarbase, suffix);
+ tar_data->fd = -1;
+ tar_data->compression = compression;
+ tar_data->sync = sync;
+#ifdef HAVE_LIBZ
+ if (compression)
+ tar_data->zlibOut = (char *) pg_malloc(ZLIB_OUT_SIZE + 1);
+#endif
+
+ return method;
+}
+
+void
+FreeWalTarMethod(void)
+{
+ pg_free(tar_data->tarfilename);
+#ifdef HAVE_LIBZ
+ if (tar_data->compression)
+ pg_free(tar_data->zlibOut);
+#endif
+ pg_free(tar_data);
+ tar_data = NULL;
+}
diff --git a/src/bin/pg_basebackup/walmethods.h b/src/bin/pg_basebackup/walmethods.h
new file mode 100644
index 0000000..4abdfd8
--- /dev/null
+++ b/src/bin/pg_basebackup/walmethods.h
@@ -0,0 +1,103 @@
+/*-------------------------------------------------------------------------
+ *
+ * walmethods.h
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_basebackup/walmethods.h
+ *-------------------------------------------------------------------------
+ */
+
+
+typedef void *Walfile;
+
+typedef enum
+{
+ CLOSE_NORMAL,
+ CLOSE_UNLINK,
+ CLOSE_NO_RENAME
+} WalCloseMethod;
+
+/*
+ * A WalWriteMethod structure represents the different methods used
+ * to write the streaming WAL as it's received.
+ *
+ * All methods that have a failure return indicator will set state
+ * allowing the getlasterror() method to return a suitable message.
+ * Commonly, errno is this state (or part of it); so callers must take
+ * care not to clobber errno between a failed method call and use of
+ * getlasterror() to retrieve the message.
+ */
+typedef struct WalWriteMethod WalWriteMethod;
+struct WalWriteMethod
+{
+ /*
+ * Open a target file. Returns Walfile, or NULL if open failed. If a temp
+ * suffix is specified, a file with that name will be opened, and then
+ * automatically renamed in close(). If pad_to_size is specified, the file
+ * will be padded with NUL up to that size, if supported by the Walmethod.
+ */
+ Walfile (*open_for_write) (const char *pathname, const char *temp_suffix, size_t pad_to_size);
+
+ /*
+ * Close an open Walfile, using one or more methods for handling automatic
+ * unlinking etc. Returns 0 on success, other values for error.
+ */
+ int (*close) (Walfile f, WalCloseMethod method);
+
+ /* Check if a file exist */
+ bool (*existsfile) (const char *pathname);
+
+ /* Return the size of a file, or -1 on failure. */
+ ssize_t (*get_file_size) (const char *pathname);
+
+ /*
+ * Return the name of the current file to work on in pg_malloc()'d string,
+ * without the base directory. This is useful for logging.
+ */
+ char *(*get_file_name) (const char *pathname, const char *temp_suffix);
+
+ /* Return the level of compression */
+ int (*compression) (void);
+
+ /*
+ * Write count number of bytes to the file, and return the number of bytes
+ * actually written or -1 for error.
+ */
+ ssize_t (*write) (Walfile f, const void *buf, size_t count);
+
+ /* Return the current position in a file or -1 on error */
+ off_t (*get_current_pos) (Walfile f);
+
+ /*
+ * fsync the contents of the specified file. Returns 0 on success.
+ */
+ int (*sync) (Walfile f);
+
+ /*
+ * Clean up the Walmethod, closing any shared resources. For methods like
+ * tar, this includes writing updated headers. Returns true if the
+ * close/write/sync of shared resources succeeded, otherwise returns false
+ * (but the resources are still closed).
+ */
+ bool (*finish) (void);
+
+ /* Return a text for the last error in this Walfile */
+ const char *(*getlasterror) (void);
+};
+
+/*
+ * Available WAL methods:
+ * - WalDirectoryMethod - write WAL to regular files in a standard pg_wal
+ * - WalTarMethod - write WAL to a tarfile corresponding to pg_wal
+ * (only implements the methods required for pg_basebackup,
+ * not all those required for pg_receivewal)
+ */
+WalWriteMethod *CreateWalDirectoryMethod(const char *basedir,
+ int compression, bool sync);
+WalWriteMethod *CreateWalTarMethod(const char *tarbase, int compression, bool sync);
+
+/* Cleanup routines for previously-created methods */
+void FreeWalDirectoryMethod(void);
+void FreeWalTarMethod(void);