postgresql/src/backend/utils/activity
Alvaro Herrera a0e0fb1ba5
Use conditional variable to wait for next MultiXact offset
In one multixact.c edge case, we need a mechanism to wait for one
multixact offset to be written before being allowed to read the next
one.  We used to handle this case by sleeping for one millisecond and
retrying, but such sleeps have been reported as problematic in
production cases.  We can avoid the problem by using a condition
variable: readers sleep on it and then every creator of multixacts
broadcasts into the CV when creation is sufficiently far along.

Author: Kyotaro Horiguchi <horikyotajntt@gmail.com>
Reviewed-by: Andrey Borodin <amborodin@acm.org>
Discussion: https://postgr.es/m/47A598F4-B4E7-4029-8FEC-A06A6C3CB4B5@yandex-team.ru
Discussion: https://postgr.es/m/20200515.090333.24867479329066911.horikyota.ntt
2024-04-07 20:33:45 +02:00
..
.gitignore Add system view pg_wait_events 2023-08-20 15:35:02 +09:00
Makefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
backend_progress.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
backend_status.c Revert "Add notBefore and notAfter to SSL cert info display" 2024-03-22 22:58:41 +01:00
generate-wait_event_types.pl Add "ABI_compatibility" regions to wait_event_names.txt 2024-04-05 08:56:52 +09:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstat.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
pgstat_archiver.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstat_bgwriter.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstat_checkpointer.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstat_database.c Make the order of the header file includes consistent 2024-03-13 15:07:00 +01:00
pgstat_function.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstat_io.c Add a new slot sync worker to synchronize logical slots. 2024-02-22 15:25:15 +05:30
pgstat_relation.c Make the order of the header file includes consistent 2024-03-13 15:07:00 +01:00
pgstat_replslot.c Add some asserts based on LWLockHeldByMe() for replication slot statistics 2024-03-13 07:45:11 +09:00
pgstat_shmem.c Add helper functions for dshash tables with string keys. 2024-02-26 15:47:13 -06:00
pgstat_slru.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstat_subscription.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgstat_wal.c Make the order of the header file includes consistent 2024-03-13 15:07:00 +01:00
pgstat_xact.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
wait_event.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
wait_event_funcs.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
wait_event_names.txt Use conditional variable to wait for next MultiXact offset 2024-04-07 20:33:45 +02:00