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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 357889e) | patch
Implement waiting for given lsn at transaction start
Tue, 7 Apr 2020 20:51:10 +0000 (23:51 +0300)
Tue, 7 Apr 2020 20:51:10 +0000 (23:51 +0300)
commit 0f5ca02f53ac2b211d8518f0882c49284c0c9610
Implement waiting for given lsn at transaction start

This commit adds following optional clause to BEGIN and START TRANSACTION
commands.

WAIT FOR LSN lsn [ TIMEOUT timeout ]

New clause pospones transaction start till given lsn is applied on standby.
This clause allows user be sure, that changes previously made on primary would
be visible on standby.

New shared memory struct is used to track awaited lsn per backend. Recovery
process wakes up backend once required lsn is applied.

Author: Ivan Kartyshov, Anna Akenteva
Reviewed-by: Craig Ringer, Thomas Munro, Robert Haas, Kyotaro Horiguchi
Reviewed-by: Masahiko Sawada, Ants Aasma, Dmitry Ivanov, Simon Riggs
Reviewed-by: Amit Kapila, Alexander Korotkov
Discussion: https://postgr.es/m/0240c26c-9f84-30ea-fca9-93ab2df5f305%40postgrespro.ru
20 files changed:
doc/src/sgml/ref/begin.sgml diff | blob | blame | history
doc/src/sgml/ref/start_transaction.sgml diff | blob | blame | history
src/backend/access/transam/xlog.c diff | blob | blame | history
src/backend/commands/Makefile diff | blob | blame | history
src/backend/commands/wait.c [new file with mode: 0644] blob
src/backend/nodes/copyfuncs.c diff | blob | blame | history
src/backend/nodes/equalfuncs.c diff | blob | blame | history
src/backend/nodes/outfuncs.c diff | blob | blame | history
src/backend/parser/gram.y diff | blob | blame | history
src/backend/storage/ipc/ipci.c diff | blob | blame | history
src/backend/storage/lmgr/proc.c diff | blob | blame | history
src/backend/tcop/utility.c diff | blob | blame | history
src/backend/utils/adt/misc.c diff | blob | blame | history
src/include/commands/wait.h [new file with mode: 0644] blob
src/include/nodes/nodes.h diff | blob | blame | history
src/include/nodes/parsenodes.h diff | blob | blame | history
src/include/parser/kwlist.h diff | blob | blame | history
src/include/utils/timestamp.h diff | blob | blame | history
src/test/recovery/t/020_begin_wait.pl [new file with mode: 0644] blob
src/tools/pgindent/typedefs.list diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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