Re: MultiXact\SLRU buffers configuration
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: "Andrey M. Borodin" <x4mmm@yandex-team.ru>, vignesh C <vignesh21@gmail.com>, Andrew Borodin <amborodin86@gmail.com>, i.lazarev@postgrespro.ru, Yura Sokolov <y.sokolov@postgrespro.ru>, Andres Freund <andres@anarazel.de>, Thomas Munro <thomas.munro@gmail.com>, Gilles Darold <gilles@darold.net>, Alexander Korotkov <aekorotkov@gmail.com>, Anastasia Lubennikova <a.lubennikova@postgrespro.ru>, Daniel Gustafsson <daniel@yesql.se>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, pgsql-hackers mailing list <pgsql-hackers@postgresql.org>
Date: 2024-08-21T06:26:05Z
Lists: pgsql-hackers
Attachments
- 0001-injection_points-Add-initialization-of-shmem-state-a.patch (text/x-diff) patch 0001
- 0002-injection_point-Add-injection_points.stats.patch (text/x-diff) patch 0002
- 0003-Rework-new-SLRU-test-with-injection-points.patch (text/x-diff) patch 0003
On Wed, Aug 21, 2024 at 12:46:31PM +0900, Michael Paquier wrote: > Sorry, I should have split that for clarity (one patch for the GUC, > one to change the test to use CACHED/LOAD). It is not an error > though: if we don't have a controlled way to disable the stats of the > module, then the test would fail when calling the cached callback > because we'd try to allocate some memory for the dshash entry in > pgstats. > > The second effect of initializing the shmem state of the module with > shared_preload_libraries is condition variables are set up for the > sake if the test, removing the dependency to the SQL load() call. > Both are OK, but I'd prefer introducing one use case for these two > macros in the tree, so as these can be used as a reference in the > future when developing new tests. In short, here is a better patch set, with 0001 and 0002 introducing the pieces that the test would need to be able to use the LOAD() and CACHED() macros in 0003: - 0001: Add shmem callbacks to initialize shmem state of injection_points with shared_preload_libraries. - 0002: Add a GUC to control if the stats of the module are enabled. By default, they are disabled as they are only needed in the TAP test of injection_points for the stats. - 0003: Update the SLRU test to use INJECTION_POINT_LOAD and INJECTION_POINT_CACHED with injection_points loaded via shared_preload_libraries, removing the call to injection_points_load() in the perl test. What do you think? -- Michael
Commits
-
Rework new SLRU test with injection points
- 94a3373ac5c3 18.0 landed
-
injection_point: Add injection_points.stats
- 2e35c67f9568 18.0 landed
-
injection_points: Add initialization of shmem state when loading module
- b2b023aa3706 18.0 landed
-
Add injection-point test for new multixact CV usage
- 768a9fd5535f 18.0 landed
-
Use conditional variable to wait for next MultiXact offset
- a0e0fb1ba56f 17.0 landed
-
Improve performance of subsystems on top of SLRU
- 53c2a97a9266 17.0 landed
-
Adjust VACUUM hastup LP_REDIRECT comments.
- 325bc54eed4e 16.0 cited
-
Test replay of regression tests, attempt II.
- f47ed79cc8a0 15.0 cited