mirror of
https://github.com/postgres/postgres.git
synced 2025-12-15 02:22:24 +03:00
Replace most StaticAssertStmt() with StaticAssertDecl()
Similar to commit 75f49221c2, it is preferable to use
StaticAssertDecl() instead of StaticAssertStmt() when possible.
Discussion: https://www.postgresql.org/message-id/flat/CA%2BhUKGKvr0x_oGmQTUkx%3DODgSksT2EtgCA6LmGx_jQFG%3DsDUpg%40mail.gmail.com
This commit is contained in:
@@ -3388,6 +3388,9 @@ lazy_truncate_heap(LVRelState *vacrel)
|
||||
static BlockNumber
|
||||
count_nondeletable_pages(LVRelState *vacrel, bool *lock_waiter_detected)
|
||||
{
|
||||
StaticAssertDecl((PREFETCH_SIZE & (PREFETCH_SIZE - 1)) == 0,
|
||||
"prefetch size must be power of 2");
|
||||
|
||||
BlockNumber blkno;
|
||||
BlockNumber prefetchedUntil;
|
||||
instr_time starttime;
|
||||
@@ -3402,8 +3405,6 @@ count_nondeletable_pages(LVRelState *vacrel, bool *lock_waiter_detected)
|
||||
* in forward direction, so that OS-level readahead can kick in.
|
||||
*/
|
||||
blkno = vacrel->rel_pages;
|
||||
StaticAssertStmt((PREFETCH_SIZE & (PREFETCH_SIZE - 1)) == 0,
|
||||
"prefetch size must be power of 2");
|
||||
prefetchedUntil = InvalidBlockNumber;
|
||||
while (blkno > vacrel->nonempty_pages)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user