File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -1002,7 +1002,7 @@ ExtendBufferedRelTo(BufferManagerRelation bmr,
10021002 if (buffer == InvalidBuffer )
10031003 {
10041004 Assert (extended_by == 0 );
1005- buffer = ReadBuffer_common (bmr .rel , bmr .smgr , 0 ,
1005+ buffer = ReadBuffer_common (bmr .rel , bmr .smgr , bmr . relpersistence ,
10061006 fork , extend_to - 1 , mode , strategy );
10071007 }
10081008
@@ -1117,16 +1117,8 @@ PinBufferForBlock(Relation rel,
11171117
11181118 Assert (blockNum != P_NEW );
11191119
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- */
11261120 if (rel )
11271121 persistence = rel -> rd_rel -> relpersistence ;
1128- else if (smgr_persistence == 0 )
1129- persistence = RELPERSISTENCE_PERMANENT ;
11301122 else
11311123 persistence = smgr_persistence ;
11321124
Original file line number Diff line number Diff line change @@ -114,14 +114,10 @@ typedef struct BufferManagerRelation
114114
115115struct ReadBuffersOperation
116116{
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 */
123119 struct SMgrRelationData * smgr ;
124- char smgr_persistence ;
120+ char smgr_persistence ; /* optional if rel != NULL */
125121 ForkNumber forknum ;
126122 BufferAccessStrategy strategy ;
127123
You can’t perform that action at this time.
0 commit comments