Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5c215c9

Browse files
committed
Add parens to ConvertToXSegs macro
The current definition (introduced in9a32150) is dangerous. Nobugs exist in our code at present, but backpatch to 11 nonetheless,where that commit debuted.Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
1 parent35a8e22 commit5c215c9

File tree

1 file changed

+5
-2
lines changed
  • src/backend/access/transam

1 file changed

+5
-2
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,9 +738,12 @@ static ControlFileData *ControlFile = NULL;
738738
*/
739739
#defineUsableBytesInPage (XLOG_BLCKSZ - SizeOfXLogShortPHD)
740740

741-
/* Convert min_wal_size_mb and max wal_size_mb to equivalent segment count */
741+
/*
742+
* Convert min_wal_size_mb and max wal_size_mb to equivalent segment count.
743+
* Rounds down.
744+
*/
742745
#defineConvertToXSegs(x,segsize)\
743-
(x / ((segsize) / (1024 * 1024)))
746+
((x) / ((segsize) / (1024 * 1024)))
744747

745748
/* The number of bytes in a WAL segment usable for WAL data. */
746749
staticintUsableBytesInSegment;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp