summaryrefslogtreecommitdiff
path: root/src/backend/access/heap
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2023-08-23 12:10:18 +1200
committerThomas Munro <tmunro@postgresql.org>2023-08-23 12:33:24 +1200
commitf58af9f416f95b1b396aab55c5978f277fe13ac7 (patch)
treed7a2691430d3f120ff8290719dd2f3016e1001ce /src/backend/access/heap
parentd8cd49e992eb0d0f3d447d6b41866ce1b573b01d (diff)
ExtendBufferedWhat -> BufferManagerRelation.
Commit 31966b15 invented a way for functions dealing with relation extension to accept a Relation in online code and an SMgrRelation in recovery code. It seems highly likely that future bufmgr.c interfaces will face the same problem, and need to do something similar. Generalize the names so that each interface doesn't have to re-invent the wheel. Back-patch to 16. Since extension AM authors might start using the constructor macros once 16 ships, we agreed to do the rename in 16 rather than waiting for 17. Reviewed-by: Peter Geoghegan <pg@bowt.ie> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/CA%2BhUKG%2B6tLD2BhpRWycEoti6LVLyQq457UL4ticP5xd8LqHySA%40mail.gmail.com
Diffstat (limited to 'src/backend/access/heap')
-rw-r--r--src/backend/access/heap/hio.c2
-rw-r--r--src/backend/access/heap/visibilitymap.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 21f808fecb5..caa62708aa5 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -339,7 +339,7 @@ RelationAddBlocks(Relation relation, BulkInsertState bistate,
* [auto]vacuum trying to truncate later pages as REL_TRUNCATE_MINIMUM is
* way larger.
*/
- first_block = ExtendBufferedRelBy(EB_REL(relation), MAIN_FORKNUM,
+ first_block = ExtendBufferedRelBy(BMR_REL(relation), MAIN_FORKNUM,
bistate ? bistate->strategy : NULL,
EB_LOCK_FIRST,
extend_by_pages,
diff --git a/src/backend/access/heap/visibilitymap.c b/src/backend/access/heap/visibilitymap.c
index 7d54ec9c0f7..2e18cd88bcf 100644
--- a/src/backend/access/heap/visibilitymap.c
+++ b/src/backend/access/heap/visibilitymap.c
@@ -628,7 +628,7 @@ vm_extend(Relation rel, BlockNumber vm_nblocks)
{
Buffer buf;
- buf = ExtendBufferedRelTo(EB_REL(rel), VISIBILITYMAP_FORKNUM, NULL,
+ buf = ExtendBufferedRelTo(BMR_REL(rel), VISIBILITYMAP_FORKNUM, NULL,
EB_CREATE_FORK_IF_NEEDED |
EB_CLEAR_SIZE_CACHE,
vm_nblocks,