- Notifications
You must be signed in to change notification settings - Fork5.3k
Commit4b203d4
committed
pg_buffercache: Add pg_buffercache_os_pages
ba2a3c2 has added a way to check if a buffer is spread acrossmultiple pages with some NUMA information, via a new viewpg_buffercache_numa that depends on pg_buffercache_numa_pages(), a SQLfunction. These can only be queried when support for libnuma exists,generating an error if not.However, it can be useful to know how shared buffers and OS pages mapwhen NUMA is not supported or not available. This commit expands thecapabilities around pg_buffercache_numa:- pg_buffercache_numa_pages() is refactored as an internal function,able to optionally process NUMA. Its SQL definition prior to thiscommit is still around to ensure backward-compatibility with v1.6.- A SQL function called pg_buffercache_os_pages() is added, able to workwith or without NUMA.- The view pg_buffercache_numa is redefined to usepg_buffercache_os_pages().- A new view is added, called pg_buffercache_os_pages. This ignoresNUMA for its result processing, for a better efficiency.The implementation is done so as there is no code duplication betweenthe NUMA and non-NUMA views/functions, relying on one internal functionthat does the job for all of them. The module is bumped to v1.7.Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>Reviewed-by: Mircea Cadariu <cadariu.mircea@gmail.com>Reviewed-by: Michael Paquier <michael@paquier.xyz>Discussion:https://postgr.es/m/Z/fFA2heH6lpSLlt@ip-10-97-1-34.eu-west-3.compute.internal1 parent07d1dc3 commit4b203d4
File tree
9 files changed
+289
-85
lines changed- contrib/pg_buffercache
- expected
- sql
- doc/src/sgml
- src/tools/pgindent
9 files changed
+289
-85
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
11 | 21 | | |
12 | 22 | | |
13 | 23 | | |
| |||
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| 41 | + | |
| 42 | + | |
31 | 43 | | |
32 | 44 | | |
33 | 45 | | |
| |||
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
46 | 64 | | |
47 | 65 | | |
48 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
0 commit comments
Comments
(0)