mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Generic Messages for Logical Decoding
API and mechanism to allow generic messages to be inserted into WAL that are intended to be read by logical decoding plugins. This commit adds an optional new callback to the logical decoding API. Messages are either text or bytea. Messages can be transactional, or not, and are identified by a prefix to allow multiple concurrent decoding plugins. (Not to be confused with Generic WAL records, which are intended to allow crash recovery of extensible objects.) Author: Petr Jelinek and Andres Freund Reviewers: Artur Zakirov, Tomas Vondra, Simon Riggs Discussion: 5685F999.6010202@2ndquadrant.com
This commit is contained in:
@ -108,11 +108,12 @@ DELETE FROM tr_pkey;
|
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
|
||||
|
||||
/*
|
||||
* check that disk spooling works
|
||||
* check that disk spooling works (also for logical messages)
|
||||
*/
|
||||
BEGIN;
|
||||
CREATE TABLE tr_etoomuch (id serial primary key, data int);
|
||||
INSERT INTO tr_etoomuch(data) SELECT g.i FROM generate_series(1, 10234) g(i);
|
||||
SELECT 'tx logical msg' FROM pg_logical_emit_message(true, 'test', 'tx logical msg');
|
||||
DELETE FROM tr_etoomuch WHERE id < 5000;
|
||||
UPDATE tr_etoomuch SET data = - data WHERE id > 5000;
|
||||
COMMIT;
|
||||
|
Reference in New Issue
Block a user