1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

Improve file header comments for astramer code.

Make it clear that "astreamer" stands for "archive streamer".
Generalize comments that still believe this code can only be used
by pg_basebackup. Add some comments explaining the asymmetry
between the gzip, lz4, and zstd astreamers, in the hopes of making
life easier for anyone who hacks on this code in the future.

Robert Haas, reviewed by Amul Sul.

Discussion: http://postgr.es/m/CAAJ_b97O2kkKVTWxt8MxDN1o-cDfbgokqtiN2yqFf48=gXpcxQ@mail.gmail.com
This commit is contained in:
Robert Haas
2024-08-07 08:49:41 -04:00
parent 2676040df0
commit 22b4a1b561
5 changed files with 42 additions and 6 deletions

View File

@@ -2,6 +2,10 @@
*
* astreamer_file.c
*
* Archive streamers that write to files. astreamer_plain_writer writes
* the whole archive to a single file, and astreamer_extractor writes
* each archive member to a separate file in a given directory.
*
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
*
* IDENTIFICATION

View File

@@ -2,6 +2,21 @@
*
* astreamer_gzip.c
*
* Archive streamers that deal with data compressed using gzip.
* astreamer_gzip_writer applies gzip compression to the input data
* and writes the result to a file. astreamer_gzip_decompressor assumes
* that the input stream is compressed using gzip and decompresses it.
*
* Note that the code in this file is asymmetric with what we do for
* other compression types: for lz4 and zstd, there is a compressor and
* a decompressor, rather than a writer and a decompressor. The approach
* taken here is less flexible, because a writer can only write to a file,
* while a compressor can write to a subsequent astreamer which is free
* to do whatever it likes. The reason it's like this is because this
* code was adapated from old, less-modular pg_basebackup code that used
* the same APIs that astreamer_gzip_writer now uses, and it didn't seem
* necessary to change anything at the time.
*
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
*
* IDENTIFICATION

View File

@@ -2,6 +2,10 @@
*
* astreamer_lz4.c
*
* Archive streamers that deal with data compressed using lz4.
* astreamer_lz4_compressor applies lz4 compression to the input stream,
* and astreamer_lz4_decompressor does the reverse.
*
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
*
* IDENTIFICATION

View File

@@ -2,6 +2,10 @@
*
* astreamer_zstd.c
*
* Archive streamers that deal with data compressed using zstd.
* astreamer_zstd_compressor applies lz4 compression to the input stream,
* and astreamer_zstd_decompressor does the reverse.
*
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
*
* IDENTIFICATION