diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:19:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:19:15 +0000 |
commit | 6eb9c5a5657d1fe77b55cc261450f3538d35a94d (patch) | |
tree | 657d8194422a5daccecfd42d654b8a245ef7b4c8 /doc/src/sgml/test-decoding.sgml | |
parent | Initial commit. (diff) | |
download | postgresql-13-upstream.tar.xz postgresql-13-upstream.zip |
Adding upstream version 13.4.upstream/13.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/src/sgml/test-decoding.sgml')
-rw-r--r-- | doc/src/sgml/test-decoding.sgml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/src/sgml/test-decoding.sgml b/doc/src/sgml/test-decoding.sgml new file mode 100644 index 0000000..8356a3d --- /dev/null +++ b/doc/src/sgml/test-decoding.sgml @@ -0,0 +1,42 @@ +<!-- doc/src/sgml/test-decoding.sgml --> + +<sect1 id="test-decoding" xreflabel="test_decoding"> + <title>test_decoding</title> + + <indexterm zone="test-decoding"> + <primary>test_decoding</primary> + </indexterm> + + <para> + <filename>test_decoding</filename> is an example of a logical decoding + output plugin. It doesn't do anything especially useful, but can serve as + a starting point for developing your own output plugin. + </para> + + <para> + <filename>test_decoding</filename> receives WAL through the logical decoding + mechanism and decodes it into text representations of the operations + performed. + </para> + + <para> + Typical output from this plugin, used over the SQL logical decoding + interface, might be: + +<programlisting> +postgres=# SELECT * FROM pg_logical_slot_get_changes('test_slot', NULL, NULL, 'include-xids', '0'); + lsn | xid | data +-----------+-----+-------------------------------------------------- + 0/16D30F8 | 691 | BEGIN + 0/16D32A0 | 691 | table public.data: INSERT: id[int4]:2 data[text]:'arg' + 0/16D32A0 | 691 | table public.data: INSERT: id[int4]:3 data[text]:'demo' + 0/16D32A0 | 691 | COMMIT + 0/16D32D8 | 692 | BEGIN + 0/16D3398 | 692 | table public.data: DELETE: id[int4]:2 + 0/16D3398 | 692 | table public.data: DELETE: id[int4]:3 + 0/16D3398 | 692 | COMMIT +(8 rows) +</programlisting> + </para> + +</sect1> |