postgresql/src/backend
Tomas Vondra 65c298f61f Add support for basic NUMA awareness
Add basic NUMA awareness routines, using a minimal src/port/pg_numa.c
portability wrapper and an optional build dependency, enabled by
--with-libnuma configure option. For now this is Linux-only, other
platforms may be supported later.

A built-in SQL function pg_numa_available() allows checking NUMA
support, i.e. that the server was built/linked with the NUMA library.

The main function introduced is pg_numa_query_pages(), which allows
determining the NUMA node for individual memory pages. Internally the
function uses move_pages(2) syscall, as it allows batching, and is more
efficient than get_mempolicy(2).

Author: Jakub Wartak <jakub.wartak@enterprisedb.com>
Co-authored-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Tomas Vondra <tomas@vondra.me>
Discussion: https://postgr.es/m/CAKZiRmxh6KWo0aqRqvmcoaX2jUxZYb4kGp3N%3Dq1w%2BDiH-696Xw%40mail.gmail.com
2025-04-07 23:08:17 +02:00
..
access Allow NOT NULL constraints to be added as NOT VALID 2025-04-07 19:19:50 +02:00
archive Update copyright for 2025 2025-01-01 11:21:55 -05:00
backup Use XLOG_CONTROL_FILE macro consistently for control file name. 2025-04-07 09:27:33 +09:00
bootstrap Remove unnecessary (char *) casts [mem] 2025-02-12 08:50:13 +01:00
catalog Fix erroneous construction of functions' dependencies on transforms. 2025-04-07 13:31:37 -04:00
commands Fix erroneous construction of functions' dependencies on transforms. 2025-04-07 13:31:37 -04:00
executor Relax ordering-related hardcoded btree requirements in planning 2025-04-06 14:43:51 +02:00
foreign Update copyright for 2025 2025-01-01 11:21:55 -05:00
jit Allow NOT NULL constraints to be added as NOT VALID 2025-04-07 19:19:50 +02:00
lib Update copyright for 2025 2025-01-01 11:21:55 -05:00
libpq Modularize log_connections output 2025-03-12 11:35:21 -04:00
main Use thread-safe strftime_l() instead of strftime(). 2025-03-28 07:13:43 +01:00
nodes Make derived clause lookup in EquivalenceClass more efficient 2025-04-04 10:45:05 +09:00
optimizer Allow NOT NULL constraints to be added as NOT VALID 2025-04-07 19:19:50 +02:00
parser Allow NOT NULL constraints to be added as NOT VALID 2025-04-07 19:19:50 +02:00
partitioning Fix bug in cbc127917 to handle nested Append correctly 2025-02-25 09:24:42 +09:00
po Update copyright for 2025 2025-01-01 11:21:55 -05:00
port Update copyright for 2025 2025-01-01 11:21:55 -05:00
postmaster Use XLOG_CONTROL_FILE macro consistently for control file name. 2025-04-07 09:27:33 +09:00
regex Support PG_UNICODE_FAST locale in the builtin collation provider. 2025-01-17 15:56:30 -08:00
replication Use standard die() signal handler in walreceiver 2025-04-04 12:38:32 +03:00
rewrite Fix incorrect handling of subquery pullup 2025-03-13 16:36:03 +09:00
snowball Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
statistics Stats: use schemaname/relname instead of regclass. 2025-03-25 11:16:06 -07:00
storage aio: Make AIO more compatible with valgrind 2025-04-07 15:20:30 -04:00
tcop Use standard die() signal handler in walreceiver 2025-04-04 12:38:32 +03:00
tsearch Clear errno before calling strtol() in spell.c. 2025-03-08 11:24:25 -05:00
utils Add support for basic NUMA awareness 2025-04-07 23:08:17 +02:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile aio: Add liburing dependency 2025-03-26 19:45:32 -04:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls.mk Return yyparse() result not via global variable 2025-01-24 06:55:39 +01:00