postgres/contrib/pg_buffercache
Thomas Munro 13453eedd3 Add pg_buffercache_evict() function for testing.
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
2024-04-08 16:23:40 +12:00
..
expected Add pg_buffercache_usage_counts() to contrib/pg_buffercache. 2023-04-07 14:25:53 -04:00
sql Add pg_buffercache_usage_counts() to contrib/pg_buffercache. 2023-04-07 14:25:53 -04:00
.gitignore Add regression test coverage for contrib/pg_buffercache. 2022-07-30 15:33:44 -04:00
Makefile Add pg_buffercache_evict() function for testing. 2024-04-08 16:23:40 +12:00
meson.build Add pg_buffercache_evict() function for testing. 2024-04-08 16:23:40 +12:00
pg_buffercache--1.0--1.1.sql
pg_buffercache--1.1--1.2.sql
pg_buffercache--1.2--1.3.sql Default monitoring roles 2017-03-30 14:18:53 -04:00
pg_buffercache--1.2.sql
pg_buffercache--1.3--1.4.sql Add pg_buffercache_usage_counts() to contrib/pg_buffercache. 2023-04-07 14:25:53 -04:00
pg_buffercache--1.4--1.5.sql Add pg_buffercache_evict() function for testing. 2024-04-08 16:23:40 +12:00
pg_buffercache.control Add pg_buffercache_evict() function for testing. 2024-04-08 16:23:40 +12:00
pg_buffercache_pages.c Add pg_buffercache_evict() function for testing. 2024-04-08 16:23:40 +12:00