The logical replication launcher process would sometimes sleep
for as much as 3 minutes before noticing that it is supposed
to launch a new worker. This could happen if
(1) WaitForReplicationWorkerAttach absorbed a process latch wakeup
that was meant to cause ApplyLauncherMain to do work, or
(2) logicalrep_worker_launch reported failure, either because of
resource limits or because the new worker terminated immediately.
In case (2), the expected behavior is that we retry the launch after
wal_retrieve_retry_interval, but that didn't reliably happen.
It's not clear how often such conditions would occur in the field,
but in our subscription test suite they are somewhat common,
especially in tests that exercise cases that cause quick worker
failure. That causes the tests to take substantially longer than
they ought to do on typical setups.
To fix (1), make WaitForReplicationWorkerAttach re-set the latch
before returning if it cleared it while looping. To fix (2), ensure
that we reduce wait_time to no more than wal_retrieve_retry_interval
when logicalrep_worker_launch reports failure. In passing, fix a
couple of perhaps-hypothetical race conditions, e.g. examining
worker->in_use without a lock.
Backpatch to v16. Problem (2) didn't exist before commit
|
7 months ago | |
|---|---|---|
| config | jit: Remove {llvm-config,clang}-N configure probes. | 2 years ago |
| contrib | Fix re-distributing previously distributed invalidation messages during logical decoding. | 7 months ago |
| doc | doc: Remove dead link to NewbieDoc Docbook Guide | 7 months ago |
| src | Prevent excessive delays before launching new logrep workers. | 7 months ago |
| .cirrus.star | Remove duplicate words in docs and code comments. | 2 years ago |
| .cirrus.tasks.yml | ci: Upgrade FreeBSD image | 10 months ago |
| .cirrus.yml | ci: Make compute resources for CI configurable | 2 years ago |
| .dir-locals.el |
…
|
|
| .editorconfig |
…
|
|
| .git-blame-ignore-revs |
Add commit 7229ebe011 to .git-blame-ignore-revs.
|
1 year ago |
| .gitattributes | Exclude LLVM files from whitespace checks | 1 year ago |
| .gitignore | Update top-level .gitignore. | 3 years ago |
| COPYRIGHT | Align organization wording in copyright statement | 8 months ago |
| GNUmakefile.in | Allow selecting the git revision to be packaged by "make dist". | 2 years ago |
| HISTORY |
…
|
|
| Makefile | Adapt REL_17_STABLE to its new status as a stable branch | 2 years ago |
| README.md | Adapt REL_17_STABLE to its new status as a stable branch | 2 years ago |
| aclocal.m4 | autoconf: Move export_dynamic determination to configure | 3 years ago |
| configure | Make our usage of memset_s() conform strictly to the C11 standard. | 8 months ago |
| configure.ac | Make our usage of memset_s() conform strictly to the C11 standard. | 8 months ago |
| meson.build | meson: Fix meson warning | 7 months ago |
| meson_options.txt | Allow selecting the git revision to be packaged by "make dist". | 2 years ago |
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/17/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/17/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/.