Skip to content

Commit f80b09b

Browse files
committed
Move astreamer (except astreamer_inject) to fe_utils.
This allows the code to be used by other frontend applications. Amul Sul, reviewed by Sravan Kumar, Andres Freund (whose input I specifically solicited regarding the meson.build changes), and me. Discussion: http://postgr.es/m/CAAJ_b94StvLWrc_p4q-f7n3OPfr6GhL8_XuAg2aAaYZp1tF-nw@mail.gmail.com
1 parent 53b2c92 commit f80b09b

File tree

12 files changed

+18
-18
lines changed

12 files changed

+18
-18
lines changed

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3037,7 +3037,7 @@ frontend_common_code = declare_dependency(
30373037
compile_args: ['-DFRONTEND'],
30383038
include_directories: [postgres_inc],
30393039
sources: generated_headers,
3040-
dependencies: [os_deps, zlib, zstd],
3040+
dependencies: [os_deps, zlib, zstd, lz4],
30413041
)
30423042

30433043
backend_common_code = declare_dependency(

src/bin/pg_basebackup/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@ OBJS = \
3737

3838
BBOBJS = \
3939
pg_basebackup.o \
40-
astreamer_file.o \
41-
astreamer_gzip.o \
42-
astreamer_inject.o \
43-
astreamer_lz4.o \
44-
astreamer_tar.o \
45-
astreamer_zstd.o
40+
astreamer_inject.o
4641

4742
all: pg_basebackup pg_createsubscriber pg_receivewal pg_recvlogical
4843

src/bin/pg_basebackup/astreamer_inject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef ASTREAMER_INJECT_H
1313
#define ASTREAMER_INJECT_H
1414

15-
#include "astreamer.h"
15+
#include "fe_utils/astreamer.h"
1616
#include "pqexpbuffer.h"
1717

1818
extern astreamer *astreamer_recovery_injector_new(astreamer *next,

src/bin/pg_basebackup/meson.build

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
# Copyright (c) 2022-2024, PostgreSQL Global Development Group
22

33
common_sources = files(
4-
'astreamer_file.c',
5-
'astreamer_gzip.c',
64
'astreamer_inject.c',
7-
'astreamer_lz4.c',
8-
'astreamer_tar.c',
9-
'astreamer_zstd.c',
105
'receivelog.c',
116
'streamutil.c',
127
'walmethods.c',

src/fe_utils/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
2121

2222
OBJS = \
2323
archive.o \
24+
astreamer_file.o \
25+
astreamer_gzip.o \
26+
astreamer_lz4.o \
27+
astreamer_tar.o \
28+
astreamer_zstd.o \
2429
cancel.o \
2530
conditional.o \
2631
connect_utils.o \

src/bin/pg_basebackup/astreamer_file.c renamed to src/fe_utils/astreamer_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
#include <unistd.h>
1515

16-
#include "astreamer.h"
1716
#include "common/file_perm.h"
1817
#include "common/logging.h"
1918
#include "common/string.h"
19+
#include "fe_utils/astreamer.h"
2020

2121
typedef struct astreamer_plain_writer
2222
{

src/bin/pg_basebackup/astreamer_gzip.c renamed to src/fe_utils/astreamer_gzip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
#include <zlib.h>
1818
#endif
1919

20-
#include "astreamer.h"
2120
#include "common/file_perm.h"
2221
#include "common/logging.h"
2322
#include "common/string.h"
23+
#include "fe_utils/astreamer.h"
2424

2525
#ifdef HAVE_LIBZ
2626
typedef struct astreamer_gzip_writer

src/bin/pg_basebackup/astreamer_lz4.c renamed to src/fe_utils/astreamer_lz4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
#include <lz4frame.h>
1818
#endif
1919

20-
#include "astreamer.h"
2120
#include "common/file_perm.h"
2221
#include "common/logging.h"
2322
#include "common/string.h"
23+
#include "fe_utils/astreamer.h"
2424

2525
#ifdef USE_LZ4
2626
typedef struct astreamer_lz4_frame

src/bin/pg_basebackup/astreamer_tar.c renamed to src/fe_utils/astreamer_tar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
#include <time.h>
2525

26-
#include "astreamer.h"
2726
#include "common/logging.h"
27+
#include "fe_utils/astreamer.h"
2828
#include "pgtar.h"
2929

3030
typedef struct astreamer_tar_parser

src/bin/pg_basebackup/astreamer_zstd.c renamed to src/fe_utils/astreamer_zstd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#include <zstd.h>
1818
#endif
1919

20-
#include "astreamer.h"
2120
#include "common/logging.h"
21+
#include "fe_utils/astreamer.h"
2222

2323
#ifdef USE_ZSTD
2424

src/fe_utils/meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
fe_utils_sources = files(
44
'archive.c',
5+
'astreamer_file.c',
6+
'astreamer_gzip.c',
7+
'astreamer_lz4.c',
8+
'astreamer_tar.c',
9+
'astreamer_zstd.c',
510
'cancel.c',
611
'conditional.c',
712
'connect_utils.c',
File renamed without changes.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy