mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 00:03:57 -04:00 
			
		
		
		
	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
This commit is contained in:
		
							parent
							
								
									53b2c921a0
								
							
						
					
					
						commit
						f80b09bac8
					
				| @ -3037,7 +3037,7 @@ frontend_common_code = declare_dependency( | ||||
|   compile_args: ['-DFRONTEND'], | ||||
|   include_directories: [postgres_inc], | ||||
|   sources: generated_headers, | ||||
|   dependencies: [os_deps, zlib, zstd], | ||||
|   dependencies: [os_deps, zlib, zstd, lz4], | ||||
| ) | ||||
| 
 | ||||
| backend_common_code = declare_dependency( | ||||
|  | ||||
| @ -37,12 +37,7 @@ OBJS = \ | ||||
| 
 | ||||
| BBOBJS = \
 | ||||
| 	pg_basebackup.o \
 | ||||
| 	astreamer_file.o \
 | ||||
| 	astreamer_gzip.o \
 | ||||
| 	astreamer_inject.o \
 | ||||
| 	astreamer_lz4.o \
 | ||||
| 	astreamer_tar.o \
 | ||||
| 	astreamer_zstd.o | ||||
| 	astreamer_inject.o | ||||
| 
 | ||||
| all: pg_basebackup pg_createsubscriber pg_receivewal pg_recvlogical | ||||
| 
 | ||||
|  | ||||
| @ -12,7 +12,7 @@ | ||||
| #ifndef ASTREAMER_INJECT_H | ||||
| #define ASTREAMER_INJECT_H | ||||
| 
 | ||||
| #include "astreamer.h" | ||||
| #include "fe_utils/astreamer.h" | ||||
| #include "pqexpbuffer.h" | ||||
| 
 | ||||
| extern astreamer *astreamer_recovery_injector_new(astreamer *next, | ||||
|  | ||||
| @ -1,12 +1,7 @@ | ||||
| # Copyright (c) 2022-2024, PostgreSQL Global Development Group | ||||
| 
 | ||||
| common_sources = files( | ||||
|   'astreamer_file.c', | ||||
|   'astreamer_gzip.c', | ||||
|   'astreamer_inject.c', | ||||
|   'astreamer_lz4.c', | ||||
|   'astreamer_tar.c', | ||||
|   'astreamer_zstd.c', | ||||
|   'receivelog.c', | ||||
|   'streamutil.c', | ||||
|   'walmethods.c', | ||||
|  | ||||
| @ -21,6 +21,11 @@ override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS) | ||||
| 
 | ||||
| OBJS = \
 | ||||
| 	archive.o \
 | ||||
| 	astreamer_file.o \
 | ||||
| 	astreamer_gzip.o \
 | ||||
| 	astreamer_lz4.o \
 | ||||
| 	astreamer_tar.o \
 | ||||
| 	astreamer_zstd.o \
 | ||||
| 	cancel.o \
 | ||||
| 	conditional.o \
 | ||||
| 	connect_utils.o \
 | ||||
|  | ||||
| @ -13,10 +13,10 @@ | ||||
| 
 | ||||
| #include <unistd.h> | ||||
| 
 | ||||
| #include "astreamer.h" | ||||
| #include "common/file_perm.h" | ||||
| #include "common/logging.h" | ||||
| #include "common/string.h" | ||||
| #include "fe_utils/astreamer.h" | ||||
| 
 | ||||
| typedef struct astreamer_plain_writer | ||||
| { | ||||
| @ -17,10 +17,10 @@ | ||||
| #include <zlib.h> | ||||
| #endif | ||||
| 
 | ||||
| #include "astreamer.h" | ||||
| #include "common/file_perm.h" | ||||
| #include "common/logging.h" | ||||
| #include "common/string.h" | ||||
| #include "fe_utils/astreamer.h" | ||||
| 
 | ||||
| #ifdef HAVE_LIBZ | ||||
| typedef struct astreamer_gzip_writer | ||||
| @ -17,10 +17,10 @@ | ||||
| #include <lz4frame.h> | ||||
| #endif | ||||
| 
 | ||||
| #include "astreamer.h" | ||||
| #include "common/file_perm.h" | ||||
| #include "common/logging.h" | ||||
| #include "common/string.h" | ||||
| #include "fe_utils/astreamer.h" | ||||
| 
 | ||||
| #ifdef USE_LZ4 | ||||
| typedef struct astreamer_lz4_frame | ||||
| @ -23,8 +23,8 @@ | ||||
| 
 | ||||
| #include <time.h> | ||||
| 
 | ||||
| #include "astreamer.h" | ||||
| #include "common/logging.h" | ||||
| #include "fe_utils/astreamer.h" | ||||
| #include "pgtar.h" | ||||
| 
 | ||||
| typedef struct astreamer_tar_parser | ||||
| @ -17,8 +17,8 @@ | ||||
| #include <zstd.h> | ||||
| #endif | ||||
| 
 | ||||
| #include "astreamer.h" | ||||
| #include "common/logging.h" | ||||
| #include "fe_utils/astreamer.h" | ||||
| 
 | ||||
| #ifdef USE_ZSTD | ||||
| 
 | ||||
| @ -2,6 +2,11 @@ | ||||
| 
 | ||||
| fe_utils_sources = files( | ||||
|   'archive.c', | ||||
|   'astreamer_file.c', | ||||
|   'astreamer_gzip.c', | ||||
|   'astreamer_lz4.c', | ||||
|   'astreamer_tar.c', | ||||
|   'astreamer_zstd.c', | ||||
|   'cancel.c', | ||||
|   'conditional.c', | ||||
|   'connect_utils.c', | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user