aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2018-11-19 10:25:48 +0900
committerMichael Paquier <michael@paquier.xyz>2018-11-19 10:25:48 +0900
commit285bd0ac4a7c0538d544c40aa725682e11cb71a9 (patch)
tree3571baa7707d6f75edd792b733a7fea0aec158c8 /src/backend/access/transam/xlog.c
parent79376e07128fbf3c92f4e1fb457be435afa2e6a6 (diff)
downloadpostgresql-285bd0ac4a7c0538d544c40aa725682e11cb71a9.tar.gz
postgresql-285bd0ac4a7c0538d544c40aa725682e11cb71a9.zip
Remove unnecessary memcpy when reading WAL record fitting on page
When reading a WAL record, its contents are copied into an intermediate buffer. However, doing so is not necessary if the record fits fully into the current page, saving one memcpy for each such record. The allocation handling of the intermediate buffer is also now done only when a record crosses a page boundary, shaving some extra cycles when reading a WAL record. Author: Andrey Lepikhov Reviewed-by: Kyotaro Horiguchi, Heikki Linnakangas Discussion: https://postgr.es/m/c2ea54dd-a1d3-80eb-ddbf-7e6f258e615e@postgrespro.ru
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 7eed5866d2e..2875fe023af 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -4203,9 +4203,6 @@ CleanupBackupHistory(void)
* If no valid record is available, returns NULL, or fails if emode is PANIC.
* (emode must be either PANIC, LOG). In standby mode, retries until a valid
* record is available.
- *
- * The record is copied into readRecordBuf, so that on successful return,
- * the returned record pointer always points there.
*/
static XLogRecord *
ReadRecord(XLogReaderState *xlogreader, XLogRecPtr RecPtr, int emode,