PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/pg_type_d.h"
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
#include "replication/basebackup.h"
#include "replication/basebackup_sink.h"
#include "utils/timestamp.h"
Go to the source code of this file.
Data Structures | |
struct | bbsink_copystream |
Macros | |
#define | PROGRESS_REPORT_BYTE_INTERVAL 65536 |
#define | PROGRESS_REPORT_MILLISECOND_THRESHOLD 1000 |
Typedefs | |
typedef struct bbsink_copystream | bbsink_copystream |
Functions | |
static void | bbsink_copystream_begin_backup (bbsink *sink) |
static void | bbsink_copystream_begin_archive (bbsink *sink, const char *archive_name) |
static void | bbsink_copystream_archive_contents (bbsink *sink, size_t len) |
static void | bbsink_copystream_end_archive (bbsink *sink) |
static void | bbsink_copystream_begin_manifest (bbsink *sink) |
static void | bbsink_copystream_manifest_contents (bbsink *sink, size_t len) |
static void | bbsink_copystream_end_manifest (bbsink *sink) |
static void | bbsink_copystream_end_backup (bbsink *sink, XLogRecPtr endptr, TimeLineID endtli) |
static void | bbsink_copystream_cleanup (bbsink *sink) |
static void | SendCopyOutResponse (void) |
static void | SendCopyDone (void) |
static void | SendXlogRecPtrResult (XLogRecPtr ptr, TimeLineID tli) |
static void | SendTablespaceList (List *tablespaces) |
static void | send_int8_string (StringInfoData *buf, int64 intval) |
bbsink * | bbsink_copystream_new (bool send_to_client) |
Variables | |
static const bbsink_ops | bbsink_copystream_ops |
#define PROGRESS_REPORT_BYTE_INTERVAL 65536 |
Definition at line 68 of file basebackup_copy.c.
#define PROGRESS_REPORT_MILLISECOND_THRESHOLD 1000 |
Definition at line 69 of file basebackup_copy.c.
typedef struct bbsink_copystream bbsink_copystream |
|
static |
Definition at line 180 of file basebackup_copy.c.
References bbsink_copystream::base, bbsink::bbs_state, buf, bbsink_copystream::bytes_done_at_last_time_check, GetCurrentTimestamp(), bbsink_copystream::last_progress_report_time, len, bbsink_copystream::msgbuffer, now(), pq_beginmessage(), pq_endmessage(), pq_flush_if_writable, pq_putmessage, pq_sendbyte(), pq_sendint64(), PROGRESS_REPORT_BYTE_INTERVAL, PROGRESS_REPORT_MILLISECOND_THRESHOLD, bbsink_copystream::send_to_client, and TimestampDifferenceMilliseconds().
|
static |
Definition at line 162 of file basebackup_copy.c.
References bbsink::bbs_state, buf, list_nth(), tablespaceinfo::path, pq_beginmessage(), pq_endmessage(), pq_sendbyte(), and pq_sendstring().
|
static |
Definition at line 123 of file basebackup_copy.c.
References bbsink_copystream::base, bbsink::bbs_buffer, bbsink::bbs_buffer_length, bbsink::bbs_state, buf, bbsink_copystream::msgbuffer, palloc(), pq_puttextmessage(), SendCopyOutResponse(), SendTablespaceList(), and SendXlogRecPtrResult().
|
static |
Definition at line 256 of file basebackup_copy.c.
References buf, pq_beginmessage(), pq_endmessage(), and pq_sendbyte().
|
static |
Definition at line 304 of file basebackup_copy.c.
|
static |
Definition at line 237 of file basebackup_copy.c.
References bbsink_copystream::base, bbsink::bbs_state, buf, bbsink_copystream::bytes_done_at_last_time_check, GetCurrentTimestamp(), bbsink_copystream::last_progress_report_time, pq_beginmessage(), pq_endmessage(), pq_flush_if_writable, pq_sendbyte(), and pq_sendint64().
|
static |
Definition at line 293 of file basebackup_copy.c.
References SendCopyDone(), and SendXlogRecPtrResult().
|
static |
Definition at line 284 of file basebackup_copy.c.
|
static |
Definition at line 269 of file basebackup_copy.c.
References len, bbsink_copystream::msgbuffer, pq_putmessage, and bbsink_copystream::send_to_client.
Definition at line 105 of file basebackup_copy.c.
References bbsink_copystream::base, bbsink::bbs_ops, bbsink_copystream_ops, bbsink_copystream::bytes_done_at_last_time_check, GetCurrentTimestamp(), bbsink_copystream::last_progress_report_time, palloc0(), and bbsink_copystream::send_to_client.
Referenced by SendBaseBackup().
|
static |
Definition at line 466 of file basebackup_copy.c.
References buf, INT64_FORMAT, pq_sendbytes(), pq_sendint32(), and sprintf.
Referenced by SendTablespaceList().
|
static |
Definition at line 327 of file basebackup_copy.c.
References pq_putemptymessage().
Referenced by bbsink_copystream_end_backup().
|
static |
Definition at line 313 of file basebackup_copy.c.
References buf, pq_beginmessage(), pq_endmessage(), pq_sendbyte(), and pq_sendint16().
Referenced by bbsink_copystream_begin_backup().
|
static |
Definition at line 392 of file basebackup_copy.c.
References buf, len, lfirst, tablespaceinfo::oid, tablespaceinfo::path, pq_beginmessage(), pq_endmessage(), pq_sendbytes(), pq_sendint16(), pq_sendint32(), pq_sendstring(), send_int8_string(), and tablespaceinfo::size.
Referenced by bbsink_copystream_begin_backup().
|
static |
Definition at line 337 of file basebackup_copy.c.
References buf, len, LSN_FORMAT_ARGS, MAXFNAMELEN, pq_beginmessage(), pq_endmessage(), pq_puttextmessage(), pq_sendbytes(), pq_sendint16(), pq_sendint32(), pq_sendstring(), snprintf, and generate_unaccent_rules::str.
Referenced by bbsink_copystream_begin_backup(), and bbsink_copystream_end_backup().
|
static |
Definition at line 89 of file basebackup_copy.c.
Referenced by bbsink_copystream_new().