This change switches the implementation of wait and wakeups in the module injection_points to not rely anymore on condition variables, using a more primitive implementation based on atomics. The former implementation required a PGPROC, making it impossible to inject waits in the postmaster or during authentication. A couple of use cases have popped up for these in the past, where this would have become handy. The loop in the wait callback that relied on a condition variable is replaced by an atomic counter, whose check increases over time in an exponential manner (starts at 10us for quick responsiveness, up to 100ms). This change may be backpatched at some point depending on how much testing coverage is wanted. Let's limit ourselves to HEAD for now, checking things first with the buildfarm. Creating a wait still requires the SQL interface. We are looking at expanding that with an alternative implementation, so as early startup or authentication waits would become possible. This refactoring piece is mandatory to achieve this goal. Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru> Discussion: https://postgr.es/m/aher0VsjJ8xeNgLq@paquier.xyz |
||
|---|---|---|
| .github | ||
| config | ||
| contrib | ||
| doc | ||
| src | ||
| .dir-locals.el | ||
| .editorconfig | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| aclocal.m4 | ||
| configure | ||
| configure.ac | ||
| COPYRIGHT | ||
| GNUmakefile.in | ||
| HISTORY | ||
| Makefile | ||
| meson.build | ||
| meson_options.txt | ||
| README.md | ||
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/devel/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/devel/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.