1/*-------------------------------------------------------------------------
4 * Default implementations for bbsink (basebackup sink) callbacks.
6 * Portions Copyright (c) 2010-2025, PostgreSQL Global Development Group
8 * src/backend/backup/basebackup_sink.c
10 *-------------------------------------------------------------------------
18 * Forward begin_backup callback.
20 * Only use this implementation if you want the bbsink you're implementing to
21 * share a buffer with the successor bbsink.
34 * Forward begin_archive callback.
44 * Forward archive_contents callback.
46 * Code that wants to use this should initialize its own bbs_buffer and
47 * bbs_buffer_length fields to the values from the successor sink. In cases
48 * where the buffer isn't shared, the data needs to be copied before forwarding
49 * the callback. We don't do try to do that here, because there's really no
50 * reason to have separately allocated buffers containing the same identical
63 * Forward end_archive callback.
73 * Forward begin_manifest callback.
83 * Forward manifest_contents callback.
85 * As with the archive_contents callback, it's expected that the buffer is
98 * Forward end_manifest callback.
108 * Forward end_backup callback.
118 * Forward cleanup callback.
void bbsink_forward_begin_backup(bbsink *sink)
void bbsink_forward_begin_manifest(bbsink *sink)
void bbsink_forward_end_backup(bbsink *sink, XLogRecPtr endptr, TimeLineID endtli)
void bbsink_forward_cleanup(bbsink *sink)
void bbsink_forward_manifest_contents(bbsink *sink, size_t len)
void bbsink_forward_end_archive(bbsink *sink)
void bbsink_forward_archive_contents(bbsink *sink, size_t len)
void bbsink_forward_begin_archive(bbsink *sink, const char *archive_name)
void bbsink_forward_end_manifest(bbsink *sink)
static void bbsink_begin_backup(bbsink *sink, bbsink_state *state, int buffer_length)
static void bbsink_begin_archive(bbsink *sink, const char *archive_name)
static void bbsink_end_archive(bbsink *sink)
static void bbsink_begin_manifest(bbsink *sink)
static void bbsink_end_backup(bbsink *sink, XLogRecPtr endptr, TimeLineID endtli)
static void bbsink_cleanup(bbsink *sink)
static void bbsink_end_manifest(bbsink *sink)
static void bbsink_archive_contents(bbsink *sink, size_t len)
static void bbsink_manifest_contents(bbsink *sink, size_t len)
Assert(PointerIsAligned(start, uint64))