mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Fix outdated comments in slru.c
SlruRecentlyUsed() is an inline function since53c2a97a92, not a macro. The description of long_segment_names was missing at the top of SimpleLruInit(), part forgotten in4ed8f0913b. Author: Julien Rouhaud <rjuju123@gmail.com> Discussion: https://postgr.es/m/aLpBLMOYwEQkaleF@jrouhaud Backpatch-through: 17
This commit is contained in:
		@@ -247,6 +247,7 @@ SimpleLruAutotuneBuffers(int divisor, int max)
 | 
				
			|||||||
 * buffer_tranche_id: tranche ID to use for the SLRU's per-buffer LWLocks.
 | 
					 * buffer_tranche_id: tranche ID to use for the SLRU's per-buffer LWLocks.
 | 
				
			||||||
 * bank_tranche_id: tranche ID to use for the bank LWLocks.
 | 
					 * bank_tranche_id: tranche ID to use for the bank LWLocks.
 | 
				
			||||||
 * sync_handler: which set of functions to use to handle sync requests
 | 
					 * sync_handler: which set of functions to use to handle sync requests
 | 
				
			||||||
 | 
					 * long_segment_names: use short or long segment names
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
SimpleLruInit(SlruCtl ctl, const char *name, int nslots, int nlsns,
 | 
					SimpleLruInit(SlruCtl ctl, const char *name, int nslots, int nlsns,
 | 
				
			||||||
@@ -620,7 +621,7 @@ SimpleLruReadPage_ReadOnly(SlruCtl ctl, int64 pageno, TransactionId xid)
 | 
				
			|||||||
			shared->page_number[slotno] == pageno &&
 | 
								shared->page_number[slotno] == pageno &&
 | 
				
			||||||
			shared->page_status[slotno] != SLRU_PAGE_READ_IN_PROGRESS)
 | 
								shared->page_status[slotno] != SLRU_PAGE_READ_IN_PROGRESS)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			/* See comments for SlruRecentlyUsed macro */
 | 
								/* See comments for SlruRecentlyUsed() */
 | 
				
			||||||
			SlruRecentlyUsed(shared, slotno);
 | 
								SlruRecentlyUsed(shared, slotno);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/* update the stats counter of pages found in the SLRU */
 | 
								/* update the stats counter of pages found in the SLRU */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user