Skip to content

Commit 53b2c92

Browse files
committed
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
1 parent 3c90569 commit 53b2c92

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

src/bin/pg_basebackup/astreamer.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,4 @@ extern astreamer *astreamer_tar_parser_new(astreamer *next);
217217
extern astreamer *astreamer_tar_terminator_new(astreamer *next);
218218
extern astreamer *astreamer_tar_archiver_new(astreamer *next);
219219

220-
extern astreamer *astreamer_recovery_injector_new(astreamer *next,
221-
bool is_recovery_guc_supported,
222-
PQExpBuffer recoveryconfcontents);
223-
extern void astreamer_inject_file(astreamer *streamer, char *pathname,
224-
char *data, int len);
225-
226220
#endif

src/bin/pg_basebackup/astreamer_inject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "postgres_fe.h"
1313

14-
#include "astreamer.h"
14+
#include "astreamer_inject.h"
1515
#include "common/file_perm.h"
1616
#include "common/logging.h"
1717

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* astreamer_inject.h
4+
*
5+
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
6+
*
7+
* IDENTIFICATION
8+
* src/bin/pg_basebackup/astreamer_inject.h
9+
*-------------------------------------------------------------------------
10+
*/
11+
12+
#ifndef ASTREAMER_INJECT_H
13+
#define ASTREAMER_INJECT_H
14+
15+
#include "astreamer.h"
16+
#include "pqexpbuffer.h"
17+
18+
extern astreamer *astreamer_recovery_injector_new(astreamer *next,
19+
bool is_recovery_guc_supported,
20+
PQExpBuffer recoveryconfcontents);
21+
extern void astreamer_inject_file(astreamer *streamer, char *pathname,
22+
char *data, int len);
23+
24+
#endif

src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#endif
2727

2828
#include "access/xlog_internal.h"
29-
#include "astreamer.h"
29+
#include "astreamer_inject.h"
3030
#include "backup/basebackup.h"
3131
#include "common/compression.h"
3232
#include "common/file_perm.h"

0 commit comments

Comments
 (0)