summaryrefslogtreecommitdiff
path: root/src/include/storage/proc.h
diff options
context:
space:
mode:
authorRobert Haas2014-03-03 21:32:18 +0000
committerRobert Haas2014-03-03 21:32:18 +0000
commitb89e151054a05f0f6d356ca52e3b725dd0505e53 (patch)
tree9b9193e808625a381003650ff68b66cdb5f9f46e /src/include/storage/proc.h
parentde94b47c0a92faeddab5ac980449d3fa877b4a4f (diff)
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.
Diffstat (limited to 'src/include/storage/proc.h')
-rw-r--r--src/include/storage/proc.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index a3cadd9a017..5218b448cd6 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -41,10 +41,12 @@ struct XidCache
#define PROC_IS_AUTOVACUUM 0x01 /* is it an autovac worker? */
#define PROC_IN_VACUUM 0x02 /* currently running lazy vacuum */
#define PROC_IN_ANALYZE 0x04 /* currently running analyze */
-#define PROC_VACUUM_FOR_WRAPAROUND 0x08 /* set by autovac only */
+#define PROC_VACUUM_FOR_WRAPAROUND 0x08 /* set by autovac only */
+#define PROC_IN_LOGICAL_DECODING 0x10 /* currently doing logical decoding */
/* flags reset at EOXact */
-#define PROC_VACUUM_STATE_MASK (0x0E)
+#define PROC_VACUUM_STATE_MASK \
+ (PROC_IN_VACUUM | PROC_IN_ANALYZE | PROC_VACUUM_FOR_WRAPAROUND)
/*
* We allow a small number of "weak" relation locks (AccesShareLock,