v1-0002-Refactor-Add-astreamer_inject.h-and-move-related-.patch

application/x-patch

Filename: v1-0002-Refactor-Add-astreamer_inject.h-and-move-related-.patch
Type: application/x-patch
Part: 7
Message: pg_verifybackup: TAR format backup verification

Patch

Format: format-patch
Series: patch v1-0002
Subject: Refactor: Add astreamer_inject.h and move related declarations to it.
File+
src/bin/pg_basebackup/astreamer.h 0 7
src/bin/pg_basebackup/astreamer_inject.c 1 1
src/bin/pg_basebackup/astreamer_inject.h 24 0
src/bin/pg_basebackup/pg_basebackup.c 1 1
From 3d851acbab2a141b4a23b21c83260a4bace354fb Mon Sep 17 00:00:00 2001
From: Amul Sul <amul.sul@enterprisedb.com>
Date: Mon, 17 Jun 2024 15:33:15 +0530
Subject: [PATCH v1 02/10] Refactor: Add astreamer_inject.h and move related
 declarations to it.

---
 src/bin/pg_basebackup/astreamer.h        |  7 -------
 src/bin/pg_basebackup/astreamer_inject.c |  2 +-
 src/bin/pg_basebackup/astreamer_inject.h | 24 ++++++++++++++++++++++++
 src/bin/pg_basebackup/pg_basebackup.c    |  2 +-
 4 files changed, 26 insertions(+), 9 deletions(-)
 create mode 100644 src/bin/pg_basebackup/astreamer_inject.h

diff --git a/src/bin/pg_basebackup/astreamer.h b/src/bin/pg_basebackup/astreamer.h
index 6b0047418bb..b4b9e381900 100644
--- a/src/bin/pg_basebackup/astreamer.h
+++ b/src/bin/pg_basebackup/astreamer.h
@@ -24,7 +24,6 @@
 
 #include "common/compression.h"
 #include "lib/stringinfo.h"
-#include "pqexpbuffer.h"
 
 struct astreamer;
 struct astreamer_ops;
@@ -217,10 +216,4 @@ extern astreamer *astreamer_tar_parser_new(astreamer *next);
 extern astreamer *astreamer_tar_terminator_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
diff --git a/src/bin/pg_basebackup/astreamer_inject.c b/src/bin/pg_basebackup/astreamer_inject.c
index 7f1decded8d..4ad8381f102 100644
--- a/src/bin/pg_basebackup/astreamer_inject.c
+++ b/src/bin/pg_basebackup/astreamer_inject.c
@@ -11,7 +11,7 @@
 
 #include "postgres_fe.h"
 
-#include "astreamer.h"
+#include "astreamer_inject.h"
 #include "common/file_perm.h"
 #include "common/logging.h"
 
diff --git a/src/bin/pg_basebackup/astreamer_inject.h b/src/bin/pg_basebackup/astreamer_inject.h
new file mode 100644
index 00000000000..8504b3f5e0d
--- /dev/null
+++ b/src/bin/pg_basebackup/astreamer_inject.h
@@ -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
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 4179b064cbc..1e753e40c97 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -26,7 +26,7 @@
 #endif
 
 #include "access/xlog_internal.h"
-#include "astreamer.h"
+#include "astreamer_inject.h"
 #include "backup/basebackup.h"
 #include "common/compression.h"
 #include "common/file_perm.h"
-- 
2.18.0