pgsql: Pass correct count to WALRead().

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема pgsql: Pass correct count to WALRead().
Дата
Msg-id E1rb3lP-006Zvf-NX@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Pass correct count to WALRead().

Previously, some callers requested XLOG_BLCKSZ bytes
unconditionally. While this did not cause a problem, because the extra
bytes are ignored, it's confusing and makes it harder to add safety
checks. Additionally, the comment about zero padding was incorrect.

With this commit, all callers request the number of bytes they
actually need.

Author: Bharath Rupireddy
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/CALj2ACWBRFac2TingD3PE3w2EBHXUHY3=AEEZPJmqhpEOBGExg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/73f0a1326608ac3a7d390706fdeec59fe4dc42c0

Modified Files
--------------
src/backend/access/transam/xlogutils.c | 7 +------
src/backend/postmaster/walsummarizer.c | 7 +------
src/backend/replication/walsender.c    | 2 +-
3 files changed, 3 insertions(+), 13 deletions(-)


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: pgsql: Add assert to WALReadFromBuffers().
Следующее
От: Nathan Bossart
Дата:
Сообщение: pgsql: Introduce overflow-safe integer comparison functions.