PostgreSQL Source Code git master
Loading...
Searching...
No Matches
basebackup_zstd.c File Reference
#include "postgres.h"
#include "backup/basebackup_sink.h"
Include dependency graph for basebackup_zstd.c:

Go to the source code of this file.

Functions

bbsinkbbsink_zstd_new (bbsink *next, pg_compress_specification *compress)
 

Function Documentation

◆ bbsink_zstd_new()

bbsink * bbsink_zstd_new ( bbsink next,
pg_compress_specification compress 
)

Definition at line 61 of file basebackup_zstd.c.

62{
63#ifndef USE_ZSTD
66 errmsg("zstd compression is not supported by this build")));
67 return NULL; /* keep compiler quiet */
68#else
70
71 Assert(next != NULL);
72
74 *((const bbsink_ops **) &sink->base.bbs_ops) = &bbsink_zstd_ops;
75 sink->base.bbs_next = next;
76 sink->compress = compress;
77
78 return &sink->base;
79#endif
80}
static int32 next
Definition blutils.c:225
#define Assert(condition)
Definition c.h:873
int errcode(int sqlerrcode)
Definition elog.c:863
int errmsg(const char *fmt,...)
Definition elog.c:1080
#define ERROR
Definition elog.h:39
#define ereport(elevel,...)
Definition elog.h:150
#define palloc0_object(type)
Definition fe_memutils.h:75
static int fb(int x)

References Assert, ereport, errcode(), errmsg(), ERROR, fb(), next, and palloc0_object.

Referenced by SendBaseBackup().