31 #include "catalog/pg_type_d.h"
72 #define PROGRESS_REPORT_BYTE_INTERVAL 65536
73 #define PROGRESS_REPORT_MILLISECOND_THRESHOLD 1000
77 const char *archive_name);
200 if (targetbytes <= state->bytes_done)
219 now < mysink->last_progress_report_time)
396 foreach(lc, tablespaces)
403 if (ti->
path == NULL)
long TimestampDifferenceMilliseconds(TimestampTz start_time, TimestampTz stop_time)
TimestampTz GetCurrentTimestamp(void)
Datum now(PG_FUNCTION_ARGS)
bbsink * bbsink_copystream_new(bool send_to_client)
static void SendCopyDone(void)
#define PROGRESS_REPORT_MILLISECOND_THRESHOLD
#define PROGRESS_REPORT_BYTE_INTERVAL
static void bbsink_copystream_manifest_contents(bbsink *sink, size_t len)
static void bbsink_copystream_cleanup(bbsink *sink)
static void bbsink_copystream_archive_contents(bbsink *sink, size_t len)
static void bbsink_copystream_end_backup(bbsink *sink, XLogRecPtr endptr, TimeLineID endtli)
static const bbsink_ops bbsink_copystream_ops
static void SendXlogRecPtrResult(XLogRecPtr ptr, TimeLineID tli)
static void bbsink_copystream_end_archive(bbsink *sink)
static void SendTablespaceList(List *tablespaces)
static void SendCopyOutResponse(void)
static void bbsink_copystream_begin_manifest(bbsink *sink)
static void bbsink_copystream_begin_archive(bbsink *sink, const char *archive_name)
struct bbsink_copystream bbsink_copystream
static void bbsink_copystream_begin_backup(bbsink *sink)
static void bbsink_copystream_end_manifest(bbsink *sink)
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
DestReceiver * CreateDestReceiver(CommandDest dest)
void do_tup_output(TupOutputState *tstate, const Datum *values, const bool *isnull)
const TupleTableSlotOps TTSOpsVirtual
void end_tup_output(TupOutputState *tstate)
TupOutputState * begin_tup_output_tupdesc(DestReceiver *dest, TupleDesc tupdesc, const TupleTableSlotOps *tts_ops)
Datum Int64GetDatum(int64 X)
#define pq_flush_if_writable()
#define pq_putmessage(msgtype, s, len)
void * palloc0(Size size)
static void * list_nth(const List *list, int n)
static Datum ObjectIdGetDatum(Oid X)
#define PqMsg_CommandComplete
#define PqMsg_CopyOutResponse
char * psprintf(const char *fmt,...)
TimestampTz last_progress_report_time
uint64 bytes_done_at_last_time_check
void(* begin_backup)(bbsink *sink)
const bbsink_ops * bbs_ops
TupleDesc CreateTemplateTupleDesc(int natts)
void TupleDescInitBuiltinEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
#define LSN_FORMAT_ARGS(lsn)