diff options
author | Robert Haas <rhaas@postgresql.org> | 2021-11-10 10:12:20 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2021-11-10 10:12:20 -0500 |
commit | 10eae82b27cebbb9586cda8baf8e3226496891d0 (patch) | |
tree | e806ed5039c139b68a1fe7f1789b852d2863081f /src/backend/replication/basebackup.c | |
parent | a27048cbcb582056bfbf15aa2f898b4a3ec74304 (diff) | |
download | postgresql-10eae82b27cebbb9586cda8baf8e3226496891d0.tar.gz postgresql-10eae82b27cebbb9586cda8baf8e3226496891d0.zip |
Fix thinko in assertion in basebackup.c.
Commit 5a1007a5088cd6ddf892f7422ea8dbaef362372f tried to introduce
an assertion that the block size was at least twice the size of a
tar block, but I got the math wrong. My error was reported to me
off-list.
Diffstat (limited to 'src/backend/replication/basebackup.c')
-rw-r--r-- | src/backend/replication/basebackup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 92430439f53..ec0485705df 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -376,7 +376,7 @@ perform_base_backup(basebackup_options *opt, bbsink *sink) else { /* Properly terminate the tarfile. */ - StaticAssertStmt(TAR_BLOCK_SIZE <= 2 * BLCKSZ, + StaticAssertStmt(2 * TAR_BLOCK_SIZE <= BLCKSZ, "BLCKSZ too small for 2 tar blocks"); memset(sink->bbs_buffer, 0, 2 * TAR_BLOCK_SIZE); bbsink_archive_contents(sink, 2 * TAR_BLOCK_SIZE); @@ -621,7 +621,7 @@ perform_base_backup(basebackup_options *opt, bbsink *sink) } /* Properly terminate the tar file. */ - StaticAssertStmt(TAR_BLOCK_SIZE <= 2 * BLCKSZ, + StaticAssertStmt(2 * TAR_BLOCK_SIZE <= BLCKSZ, "BLCKSZ too small for 2 tar blocks"); memset(sink->bbs_buffer, 0, 2 * TAR_BLOCK_SIZE); bbsink_archive_contents(sink, 2 * TAR_BLOCK_SIZE); |