diff options
author | Noah Misch <noah@leadboat.com> | 2024-07-20 04:22:12 -0700 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2024-07-20 04:22:12 -0700 |
commit | e00c45f6850f86c53b48478f60c15be905dc914d (patch) | |
tree | 5e42c95b81f3efaa85f85d9a8a379587a6d036e0 /src/backend/storage/buffer/bufmgr.c | |
parent | 22b0ccd65d275d227a7d911aede12d34e1b5dfc9 (diff) | |
download | postgresql-e00c45f6850f86c53b48478f60c15be905dc914d.tar.gz postgresql-e00c45f6850f86c53b48478f60c15be905dc914d.zip |
Remove "smgr_persistence == 0" dead code.
Reaching that code would have required multiple processes performing
relation extension during recovery, which does not happen. That caller
has the persistence available, so pass it. This was dead code as soon
as commit 210622c60e1a9db2e2730140b8106ab57d259d15 added it.
Discussion: https://postgr.es/m/CAN55FZ0JKL6vk1xQp6rfOXiNFV1u1H0tJDPPGHWoiO3ea2Wc=A@mail.gmail.com
Diffstat (limited to 'src/backend/storage/buffer/bufmgr.c')
-rw-r--r-- | src/backend/storage/buffer/bufmgr.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 61816730955..db3eb2cce1e 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -1002,7 +1002,7 @@ ExtendBufferedRelTo(BufferManagerRelation bmr, if (buffer == InvalidBuffer) { Assert(extended_by == 0); - buffer = ReadBuffer_common(bmr.rel, bmr.smgr, 0, + buffer = ReadBuffer_common(bmr.rel, bmr.smgr, bmr.relpersistence, fork, extend_to - 1, mode, strategy); } @@ -1117,16 +1117,8 @@ PinBufferForBlock(Relation rel, Assert(blockNum != P_NEW); - /* - * If there is no Relation it usually implies recovery and thus permanent, - * but we take an argument because CreateAndCopyRelationData can reach us - * with only an SMgrRelation for an unlogged relation that we don't want - * to flag with BM_PERMANENT. - */ if (rel) persistence = rel->rd_rel->relpersistence; - else if (smgr_persistence == 0) - persistence = RELPERSISTENCE_PERMANENT; else persistence = smgr_persistence; |