From: Jeff Davis Date: Sat, 23 Mar 2024 20:36:19 +0000 (-0700) Subject: Remove incorrect Assert introduced in c8aeaf3ab. X-Git-Tag: REL_14_12~46 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=a1a51dc4fab7efdcf3c3a50d9dd9f0a4a420f4f7;p=postgresql.git Remove incorrect Assert introduced in c8aeaf3ab. 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 --- diff --git a/src/backend/utils/sort/logtape.c b/src/backend/utils/sort/logtape.c index c361e47cee3..edd6025cc9c 100644 --- a/src/backend/utils/sort/logtape.c +++ b/src/backend/utils/sort/logtape.c @@ -1271,13 +1271,5 @@ LogicalTapeTell(LogicalTapeSet *lts, int tapenum, long LogicalTapeSetBlocks(LogicalTapeSet *lts) { -#ifdef USE_ASSERT_CHECKING - for (int i = 0; i < lts->nTapes; i++) - { - LogicalTape *lt = <s->tapes[i]; - - Assert(!lt->writing || lt->buffer == NULL); - } -#endif return lts->nBlocksWritten - lts->nHoleBlocks; }