mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 10:30:33 +03:00 
			
		
		
		
	When testing buffer pool logic, it is useful to be able to evict arbitrary blocks. This function can be used in SQL queries over the pg_buffercache view to set up a wide range of buffer pool states. Of course, buffer mappings might change concurrently so you might evict a block other than the one you had in mind, and another session might bring it back in at any time. That's OK for the intended purpose of setting up developer testing scenarios, and more complicated interlocking schemes to give stronger guararantees about that would likely be less flexible for actual testing work anyway. Superuser-only. Author: Palak Chaturvedi <chaturvedipalak1911@gmail.com> Author: Thomas Munro <thomas.munro@gmail.com> (docs, small tweaks) Reviewed-by: Nitin Jadhav <nitinjadhavpostgres@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Cary Huang <cary.huang@highgo.ca> Reviewed-by: Cédric Villemain <cedric.villemain+pgsql@abcsql.com> Reviewed-by: Jim Nasby <jim.nasby@gmail.com> Reviewed-by: Maxim Orlov <orlovmg@gmail.com> Reviewed-by: Thomas Munro <thomas.munro@gmail.com> Reviewed-by: Melanie Plageman <melanieplageman@gmail.com> Discussion: https://postgr.es/m/CALfch19pW48ZwWzUoRSpsaV9hqt0UPyaBPC4bOZ4W+c7FF566A@mail.gmail.com
		
			
				
	
	
		
			40 lines
		
	
	
		
			944 B
		
	
	
	
		
			Meson
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			944 B
		
	
	
	
		
			Meson
		
	
	
	
	
	
| # Copyright (c) 2022-2024, PostgreSQL Global Development Group
 | |
| 
 | |
| pg_buffercache_sources = files(
 | |
|   'pg_buffercache_pages.c',
 | |
| )
 | |
| 
 | |
| if host_system == 'windows'
 | |
|   pg_buffercache_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
 | |
|     '--NAME', 'pg_buffercache',
 | |
|     '--FILEDESC', 'pg_buffercache - monitoring of shared buffer cache in real-time',])
 | |
| endif
 | |
| 
 | |
| pg_buffercache = shared_module('pg_buffercache',
 | |
|   pg_buffercache_sources,
 | |
|   kwargs: contrib_mod_args,
 | |
| )
 | |
| contrib_targets += pg_buffercache
 | |
| 
 | |
| install_data(
 | |
|   'pg_buffercache--1.0--1.1.sql',
 | |
|   'pg_buffercache--1.1--1.2.sql',
 | |
|   'pg_buffercache--1.2--1.3.sql',
 | |
|   'pg_buffercache--1.2.sql',
 | |
|   'pg_buffercache--1.3--1.4.sql',
 | |
|   'pg_buffercache--1.4--1.5.sql',
 | |
|   'pg_buffercache.control',
 | |
|   kwargs: contrib_data_args,
 | |
| )
 | |
| 
 | |
| tests += {
 | |
|   'name': 'pg_buffercache',
 | |
|   'sd': meson.current_source_dir(),
 | |
|   'bd': meson.current_build_dir(),
 | |
|   'regress': {
 | |
|     'sql': [
 | |
|       'pg_buffercache',
 | |
|     ],
 | |
|   },
 | |
| }
 |