PostgreSQL Source Code git master
|
#include "postgres.h"
#include "backup/basebackup_sink.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "storage/latch.h"
#include "utils/timestamp.h"
Go to the source code of this file.
Data Structures | |
struct | bbsink_throttle |
Macros | |
#define | THROTTLING_FREQUENCY 8 |
Typedefs | |
typedef struct bbsink_throttle | bbsink_throttle |
Functions | |
static void | bbsink_throttle_begin_backup (bbsink *sink) |
static void | bbsink_throttle_archive_contents (bbsink *sink, size_t len) |
static void | bbsink_throttle_manifest_contents (bbsink *sink, size_t len) |
static void | throttle (bbsink_throttle *sink, size_t increment) |
bbsink * | bbsink_throttle_new (bbsink *next, uint32 maxrate) |
Variables | |
static const bbsink_ops | bbsink_throttle_ops |
#define THROTTLING_FREQUENCY 8 |
Definition at line 61 of file basebackup_throttle.c.
typedef struct bbsink_throttle bbsink_throttle |
|
static |
Definition at line 110 of file basebackup_throttle.c.
References bbsink_forward_archive_contents(), len, and throttle().
|
static |
Definition at line 96 of file basebackup_throttle.c.
References bbsink_forward_begin_backup(), GetCurrentTimestamp(), and bbsink_throttle::throttled_last.
|
static |
Definition at line 121 of file basebackup_throttle.c.
References bbsink_forward_manifest_contents(), len, and throttle().
Definition at line 68 of file basebackup_throttle.c.
References Assert, bbsink_throttle::base, bbsink::bbs_next, bbsink::bbs_ops, bbsink_throttle_ops, bbsink_throttle::elapsed_min_unit, maxrate, next, palloc0(), THROTTLING_FREQUENCY, bbsink_throttle::throttling_sample, and USECS_PER_SEC.
Referenced by SendBaseBackup().
|
static |
Definition at line 134 of file basebackup_throttle.c.
References Assert, CHECK_FOR_INTERRUPTS, bbsink_throttle::elapsed_min_unit, GetCurrentTimestamp(), MyLatch, ResetLatch(), bbsink_throttle::throttled_last, bbsink_throttle::throttling_counter, bbsink_throttle::throttling_sample, WaitLatch(), WL_EXIT_ON_PM_DEATH, WL_LATCH_SET, and WL_TIMEOUT.
Referenced by bbsink_throttle_archive_contents(), and bbsink_throttle_manifest_contents().
|
static |
Definition at line 46 of file basebackup_throttle.c.
Referenced by bbsink_throttle_new().