postgresql/src/backend
Amit Kapila 1362bc33e0 Enhance slot synchronization API to respect promotion signal.
Previously, during a promotion, only the slot synchronization worker was
signaled to shut down. The backend executing slot synchronization via the
pg_sync_replication_slots() SQL function was not signaled, allowing it to
complete its synchronization cycle before exiting.

An upcoming patch improves pg_sync_replication_slots() to wait until
replication slots are fully persisted before finishing. This behaviour
requires the backend to exit promptly if a promotion occurs.

This patch ensures that, during promotion, a signal is also sent to the
backend running pg_sync_replication_slots(), allowing it to be interrupted
and exit immediately.

Author: Ajin Cherian <itsajin@gmail.com>
Reviewed-by: Shveta Malik <shveta.malik@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/CAFPTHDZAA%2BgWDntpa5ucqKKba41%3DtXmoXqN3q4rpjO9cdxgQrw%40mail.gmail.com
2025-12-11 03:49:28 +00:00
..
access Clarify why _bt_killitems sorts its items array. 2025-12-10 20:50:47 -05:00
archive Update copyright for 2025 2025-01-01 11:21:55 -05:00
backup Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
bootstrap Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
catalog Fix comment in GetPublicationRelations 2025-12-10 15:33:29 +02:00
commands Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
executor Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
foreign Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
jit Fix allocation formula in llvmjit_expr.c 2025-12-11 10:25:21 +09:00
lib Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
libpq Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
main Avoid possible crash within libsanitizer. 2025-11-05 11:09:45 -05:00
nodes Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
optimizer Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
parser Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
partitioning Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
po Translation updates 2025-05-05 12:04:49 +02:00
port Remove useless casting to same type 2025-12-02 10:09:32 +01:00
postmaster Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
regex Make regex "max_chr" depend on encoding, not provider. 2025-12-01 11:06:17 -08:00
replication Enhance slot synchronization API to respect promotion signal. 2025-12-11 03:49:28 +00:00
rewrite Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
snowball Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
statistics Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
storage Fix some near-bugs related to ResourceOwner function arguments 2025-12-10 11:43:16 +02:00
tcop Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
tsearch Use palloc_object() and palloc_array() in backend code 2025-12-10 07:36:46 +09:00
utils Add pg_iswcased(). 2025-12-10 11:56:11 -08:00
.gitignore
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 meson: add and use stamp files for generated headers 2025-08-11 15:18:23 -04:00
nls.mk Create a separate file listing backend types 2025-09-26 15:21:49 +02:00