Re: Proposal: Generic WAL logical messages
От | Petr Jelinek |
---|---|
Тема | Re: Proposal: Generic WAL logical messages |
Дата | |
Msg-id | 56F2D7F3.20605@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: Proposal: Generic WAL logical messages (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Ответы |
Re: Proposal: Generic WAL logical messages
|
Список | pgsql-hackers |
On 23/03/16 14:17, Alvaro Herrera wrote: > Petr Jelinek wrote: > >> +++ b/contrib/test_decoding/sql/messages.sql >> @@ -0,0 +1,17 @@ >> +-- predictability >> +SET synchronous_commit = on; >> + >> +SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding'); >> + >> +SELECT 'msg1' FROM pg_logical_emit_message(true, 'test', 'msg1'); >> +SELECT 'msg2' FROM pg_logical_emit_message(false, 'test', 'msg2'); >> + >> +BEGIN; >> +SELECT 'msg3' FROM pg_logical_emit_message(true, 'test', 'msg3'); >> +SELECT 'msg4' FROM pg_logical_emit_message(false, 'test', 'msg4'); >> +SELECT 'msg5' FROM pg_logical_emit_message(true, 'test', 'msg5'); >> +COMMIT; >> + >> +SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'force-binary', '0', 'skip-empty-xacts','1'); >> + >> +SELECT 'init' FROM pg_drop_replication_slot('regression_slot'); > > No tests for a rolled back transaction? > Good point, probably worth testing especially since we have non-transactional messages. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Вложения
В списке pgsql-hackers по дате отправления: