]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Remove incorrect Assert introduced in c8aeaf3ab.
authorJeff Davis <jdavis@postgresql.org>
Sat, 23 Mar 2024 20:37:08 +0000 (13:37 -0700)
committerJeff Davis <jdavis@postgresql.org>
Sat, 23 Mar 2024 20:37:08 +0000 (13:37 -0700)
Already removed incidentally in version 15 (c4649cce3), so this commit
is only applied to versions 13 and 14.

The comment above is misleading in all versions 13 and later, so that
will be fixed in a separate commit.

Discussion: https://postgr.es/m/cfd84cb8-12fe-433a-a4bb-f460a4515f9c.zhaotinghai.zth%40alibaba-inc.com
Reported-by: Tinghai Zhao
Backpatch-through: 13

src/backend/utils/sort/logtape.c

index 720f9dfe2b76c284494d64f4a35114b0bb74f1ec..95b174fc7e8a028731c93171f99eae0a4e01149e 100644 (file)
@@ -1269,12 +1269,5 @@ LogicalTapeTell(LogicalTapeSet *lts, int tapenum,
 long
 LogicalTapeSetBlocks(LogicalTapeSet *lts)
 {
-#ifdef USE_ASSERT_CHECKING
-       for (int i = 0; i < lts->nTapes; i++)
-       {
-               LogicalTape *lt = &lts->tapes[i];
-               Assert(!lt->writing || lt->buffer == NULL);
-       }
-#endif
        return lts->nBlocksWritten - lts->nHoleBlocks;
 }