]> granicus.if.org Git - postgresql/commit
Introduce logical decoding.
authorRobert Haas <rhaas@postgresql.org>
Mon, 3 Mar 2014 21:32:18 +0000 (16:32 -0500)
committerRobert Haas <rhaas@postgresql.org>
Mon, 3 Mar 2014 21:32:18 +0000 (16:32 -0500)
commitb89e151054a05f0f6d356ca52e3b725dd0505e53
tree9b9193e808625a381003650ff68b66cdb5f9f46e
parentde94b47c0a92faeddab5ac980449d3fa877b4a4f
Introduce logical decoding.

This feature, building on previous commits, allows the write-ahead log
stream to be decoded into a series of logical changes; that is,
inserts, updates, and deletes and the transactions which contain them.
It is capable of handling decoding even across changes to the schema
of the effected tables.  The output format is controlled by a
so-called "output plugin"; an example is included.  To make use of
this in a real replication system, the output plugin will need to be
modified to produce output in the format appropriate to that system,
and to perform filtering.

Currently, information can be extracted from the logical decoding
system only via SQL; future commits will add the ability to stream
changes via walsender.

Andres Freund, with review and other contributions from many other
people, including Álvaro Herrera, Abhijit Menon-Sen, Peter Gheogegan,
Kevin Grittner, Robert Haas, Heikki Linnakangas, Fujii Masao, Abhijit
Menon-Sen, Michael Paquier, Simon Riggs, Craig Ringer, and Steve
Singer.
89 files changed:
contrib/Makefile
contrib/test_decoding/.gitignore [new file with mode: 0644]
contrib/test_decoding/Makefile [new file with mode: 0644]
contrib/test_decoding/expected/binary.out [new file with mode: 0644]
contrib/test_decoding/expected/concurrent_ddl_dml.out [new file with mode: 0644]
contrib/test_decoding/expected/ddl.out [new file with mode: 0644]
contrib/test_decoding/expected/decoding_in_xact.out [new file with mode: 0644]
contrib/test_decoding/expected/delayed_startup.out [new file with mode: 0644]
contrib/test_decoding/expected/mxact.out [new file with mode: 0644]
contrib/test_decoding/expected/permissions.out [new file with mode: 0644]
contrib/test_decoding/expected/rewrite.out [new file with mode: 0644]
contrib/test_decoding/expected/toast.out [new file with mode: 0644]
contrib/test_decoding/logical.conf [new file with mode: 0644]
contrib/test_decoding/specs/concurrent_ddl_dml.spec [new file with mode: 0644]
contrib/test_decoding/specs/delayed_startup.spec [new file with mode: 0644]
contrib/test_decoding/specs/mxact.spec [new file with mode: 0644]
contrib/test_decoding/sql/binary.sql [new file with mode: 0644]
contrib/test_decoding/sql/ddl.sql [new file with mode: 0644]
contrib/test_decoding/sql/decoding_in_xact.sql [new file with mode: 0644]
contrib/test_decoding/sql/permissions.sql [new file with mode: 0644]
contrib/test_decoding/sql/rewrite.sql [new file with mode: 0644]
contrib/test_decoding/sql/toast.sql [new file with mode: 0644]
contrib/test_decoding/test_decoding.c [new file with mode: 0644]
doc/src/sgml/contrib.sgml
doc/src/sgml/filelist.sgml
doc/src/sgml/test-decoding.sgml [new file with mode: 0644]
src/Makefile.global.in
src/backend/access/heap/heapam.c
src/backend/access/heap/pruneheap.c
src/backend/access/heap/rewriteheap.c
src/backend/access/heap/tuptoaster.c
src/backend/access/index/indexam.c
src/backend/access/rmgrdesc/heapdesc.c
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/catalog/index.c
src/backend/catalog/system_views.sql
src/backend/commands/analyze.c
src/backend/commands/cluster.c
src/backend/commands/dbcommands.c
src/backend/commands/vacuum.c
src/backend/commands/vacuumlazy.c
src/backend/executor/nodeBitmapHeapscan.c
src/backend/replication/Makefile
src/backend/replication/logical/Makefile [new file with mode: 0644]
src/backend/replication/logical/decode.c [new file with mode: 0644]
src/backend/replication/logical/logical.c [new file with mode: 0644]
src/backend/replication/logical/logicalfuncs.c [new file with mode: 0644]
src/backend/replication/logical/reorderbuffer.c [new file with mode: 0644]
src/backend/replication/logical/snapbuild.c [new file with mode: 0644]
src/backend/replication/slot.c
src/backend/replication/slotfuncs.c
src/backend/replication/walreceiver.c
src/backend/replication/walsender.c
src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/standby.c
src/backend/storage/lmgr/proc.c
src/backend/tcop/postgres.c
src/backend/utils/cache/inval.c
src/backend/utils/cache/relcache.c
src/backend/utils/time/snapmgr.c
src/backend/utils/time/tqual.c
src/bin/initdb/initdb.c
src/include/access/heapam.h
src/include/access/heapam_xlog.h
src/include/access/rewriteheap.h
src/include/access/transam.h
src/include/access/tuptoaster.h
src/include/access/xlog.h
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/commands/vacuum.h
src/include/replication/decode.h [new file with mode: 0644]
src/include/replication/logical.h [new file with mode: 0644]
src/include/replication/logicalfuncs.h [new file with mode: 0644]
src/include/replication/output_plugin.h [new file with mode: 0644]
src/include/replication/reorderbuffer.h [new file with mode: 0644]
src/include/replication/slot.h
src/include/replication/snapbuild.h [new file with mode: 0644]
src/include/storage/itemptr.h
src/include/storage/proc.h
src/include/storage/procarray.h
src/include/storage/sinval.h
src/include/utils/inval.h
src/include/utils/snapmgr.h
src/include/utils/snapshot.h
src/include/utils/tqual.h
src/test/regress/expected/rules.out
src/tools/pgindent/typedefs.list