Assorted cleanup of tar-related code.
Robert Haas <rhaas@postgresql.org>
Assorted cleanup of tar-related code. Introduce TAR_BLOCK_SIZE and replace many instances of 512 with the new constant. Introduce function tarPaddingBytesRequired and use it to replace numerous repetitions of (x + 511) & ~511. Add preprocessor guards against multiple inclusion to pgtar.h. Reformat the prototype for tarCreateHeader so it doesn't extend beyond 80 characters. Discussion: http://postgr.es/m/CA+TgmobWbfReO9-XFk8urR1K4wTNwqoHx_v56t7=T8KaiEoKNw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/replication/basebackup.c | modified | +19 −10 |
| src/bin/pg_basebackup/pg_basebackup.c | modified | +23 −23 |
| src/bin/pg_basebackup/walmethods.c | modified | +15 −10 |
| src/bin/pg_dump/pg_backup_tar.c | modified | +16 −14 |
| src/include/pgtar.h | modified | +21 −2 |
Discussion
- tar-related code in PostgreSQL 7 messages · 2020-04-24 → 2020-07-01