Move recovery injector astreamer to a separate header file.
Unlike the rest of the astreamer (formerly bbstreamer) infrastructure which is reusable by other tools, astreamer_inject.c seems extremely specific to pg_basebackup. Hence, move the corresponding declarations to a separate header file, so that we can move the rest of the code without moving this. Amul Sul, reviewed by Sravan Kumar and by me. Discussion: http://postgr.es/m/CAAJ_b94StvLWrc_p4q-f7n3OPfr6GhL8_XuAg2aAaYZp1tF-nw@mail.gmail.com
This commit is contained in:
parent
3c90569811
commit
53b2c921a0
@ -217,10 +217,4 @@ extern astreamer *astreamer_tar_parser_new(astreamer *next);
|
|||||||
extern astreamer *astreamer_tar_terminator_new(astreamer *next);
|
extern astreamer *astreamer_tar_terminator_new(astreamer *next);
|
||||||
extern astreamer *astreamer_tar_archiver_new(astreamer *next);
|
extern astreamer *astreamer_tar_archiver_new(astreamer *next);
|
||||||
|
|
||||||
extern astreamer *astreamer_recovery_injector_new(astreamer *next,
|
|
||||||
bool is_recovery_guc_supported,
|
|
||||||
PQExpBuffer recoveryconfcontents);
|
|
||||||
extern void astreamer_inject_file(astreamer *streamer, char *pathname,
|
|
||||||
char *data, int len);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
#include "astreamer.h"
|
#include "astreamer_inject.h"
|
||||||
#include "common/file_perm.h"
|
#include "common/file_perm.h"
|
||||||
#include "common/logging.h"
|
#include "common/logging.h"
|
||||||
|
|
||||||
|
24
src/bin/pg_basebackup/astreamer_inject.h
Normal file
24
src/bin/pg_basebackup/astreamer_inject.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* astreamer_inject.h
|
||||||
|
*
|
||||||
|
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
||||||
|
*
|
||||||
|
* IDENTIFICATION
|
||||||
|
* src/bin/pg_basebackup/astreamer_inject.h
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ASTREAMER_INJECT_H
|
||||||
|
#define ASTREAMER_INJECT_H
|
||||||
|
|
||||||
|
#include "astreamer.h"
|
||||||
|
#include "pqexpbuffer.h"
|
||||||
|
|
||||||
|
extern astreamer *astreamer_recovery_injector_new(astreamer *next,
|
||||||
|
bool is_recovery_guc_supported,
|
||||||
|
PQExpBuffer recoveryconfcontents);
|
||||||
|
extern void astreamer_inject_file(astreamer *streamer, char *pathname,
|
||||||
|
char *data, int len);
|
||||||
|
|
||||||
|
#endif
|
@ -26,7 +26,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "access/xlog_internal.h"
|
#include "access/xlog_internal.h"
|
||||||
#include "astreamer.h"
|
#include "astreamer_inject.h"
|
||||||
#include "backup/basebackup.h"
|
#include "backup/basebackup.h"
|
||||||
#include "common/compression.h"
|
#include "common/compression.h"
|
||||||
#include "common/file_perm.h"
|
#include "common/file_perm.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user