git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 81624db) | patch
Introduce latches. A latch is a boolean variable, with the capability to
2010年9月11日 15:48:04 +0000 (15:48 +0000)
2010年9月11日 15:48:04 +0000 (15:48 +0000)
commit 2746e5f21d4dce07ee55c58b2035ff631470577f
Introduce latches. A latch is a boolean variable, with the capability to
wait until it is set. Latches can be used to reliably wait until a signal
arrives, which is hard otherwise because signals don't interrupt select()
on some platforms, and even when they do, there's race conditions.

On Unix, latches use the so called self-pipe trick under the covers to
implement the sleep until the latch is set, without race conditions. On
Windows, Windows events are used.

Use the new latch abstraction to sleep in walsender, so that as soon as
a transaction finishes, walsender is woken up to immediately send the WAL
to the standby. This reduces the latency between master and standby, which
is good.

Preliminary work by Fujii Masao. The latch implementation is by me, with
helpful comments from many people.
13 files changed:
configure diff | blob | blame | history
configure.in diff | blob | blame | history
src/backend/access/transam/twophase.c diff | blob | blame | history
src/backend/access/transam/xact.c diff | blob | blame | history
src/backend/port/Makefile diff | blob | blame | history
src/backend/port/unix_latch.c [new file with mode: 0644] blob
src/backend/port/win32_latch.c [new file with mode: 0644] blob
src/backend/replication/walsender.c diff | blob | blame | history
src/backend/storage/ipc/ipci.c diff | blob | blame | history
src/backend/storage/ipc/procsignal.c diff | blob | blame | history
src/include/replication/walsender.h diff | blob | blame | history
src/include/storage/latch.h [new file with mode: 0644] blob
src/tools/msvc/Mkvcbuild.pm diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /