File tree 2 files changed +4
-16
lines changed
2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -1002,7 +1002,7 @@ ExtendBufferedRelTo(BufferManagerRelation bmr,
1002
1002
if (buffer == InvalidBuffer )
1003
1003
{
1004
1004
Assert (extended_by == 0 );
1005
- buffer = ReadBuffer_common (bmr .rel , bmr .smgr , 0 ,
1005
+ buffer = ReadBuffer_common (bmr .rel , bmr .smgr , bmr . relpersistence ,
1006
1006
fork , extend_to - 1 , mode , strategy );
1007
1007
}
1008
1008
@@ -1117,16 +1117,8 @@ PinBufferForBlock(Relation rel,
1117
1117
1118
1118
Assert (blockNum != P_NEW );
1119
1119
1120
- /*
1121
- * If there is no Relation it usually implies recovery and thus permanent,
1122
- * but we take an argument because CreateAndCopyRelationData can reach us
1123
- * with only an SMgrRelation for an unlogged relation that we don't want
1124
- * to flag with BM_PERMANENT.
1125
- */
1126
1120
if (rel )
1127
1121
persistence = rel -> rd_rel -> relpersistence ;
1128
- else if (smgr_persistence == 0 )
1129
- persistence = RELPERSISTENCE_PERMANENT ;
1130
1122
else
1131
1123
persistence = smgr_persistence ;
1132
1124
Original file line number Diff line number Diff line change @@ -114,14 +114,10 @@ typedef struct BufferManagerRelation
114
114
115
115
struct ReadBuffersOperation
116
116
{
117
- /*
118
- * The following members should be set by the caller. If only smgr is
119
- * provided without rel, then smgr_persistence can be set to override the
120
- * default assumption of RELPERSISTENCE_PERMANENT.
121
- */
122
- Relation rel ;
117
+ /* The following members should be set by the caller. */
118
+ Relation rel ; /* optional */
123
119
struct SMgrRelationData * smgr ;
124
- char smgr_persistence ;
120
+ char smgr_persistence ; /* optional if rel != NULL */
125
121
ForkNumber forknum ;
126
122
BufferAccessStrategy strategy ;
127
123
You can’t perform that action at this time.
0 commit comments