mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
Fix thinko in assertion in basebackup.c.
Commit 5a1007a508
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.
This commit is contained in:
parent
a27048cbcb
commit
10eae82b27
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user