Don't initialize page in {vm,fsm}_extend(), not needed
Andres Freund <andres@anarazel.de>
Don't initialize page in {vm,fsm}_extend(), not needed
The read path needs to be able to initialize pages anyway, as relation
extensions are not durable. By avoiding initializing pages, we can, in a
future patch, extend the relation by multiple blocks at once.
Using smgrextend() for {vm,fsm}_extend() is not a good idea in general, as at
least one page of the VM/FSM will be read immediately after, always causing a
cache miss, requiring us to read content we just wrote.
Discussion: https://postgr.es/m/20230301223515.pucbj7nb54n4i4nv@awork3.anarazel.de
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/visibilitymap.c | modified | +1 −5 |
| src/backend/storage/freespace/freespace.c | modified | +1 −4 |
Discussion
- refactoring relation extension and BufferAlloc(), faster COPY 57 messages · 2022-10-29 → 2023-05-03