pgsql: Improve assertion in mdwritev()

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Improve assertion in mdwritev()
Дата
Msg-id E1sEFz7-002rky-0T@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Improve assertion in mdwritev()

The assertion used at the beginning of mdwritev(), that is not enabled
except by defining -DCHECK_WRITE_VS_EXTEND as mdnblocks() is costly,
forgot about the total number of blocks to write at location specified
by the caller.  The calculation is fixed to count for that, and uses
casts to uint64 to ensure a proper check should the number of blocks
overflow.

Using a cast is a suggestion from Tom Lane.

Oversight in 4908c5872059.

Author: Xing Guo
Discussion: https://postgr.es/m/CACpMh+BM-VgKeO7suPG-VHTtpzJ+zsbDPwVHu42PLp-iTk0z+A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f04d1c1db01199f02b0914a7ca2962c531935717

Modified Files
--------------
src/backend/storage/smgr/md.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: pgsql: Fix documentation for System V semaphores.
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: ci: windows: Use the same image for VS and MinGW tasks