Postgresql Extend the logical decoding output plugin API with stream methods.

Source Link:
Extend the logical decoding output plugin API with stream methods.
author Amit Kapila <akapila@postgresql.org>
Tue, 28 Jul 2020 10:36:44 +0800 (08:06 +0530)
committer Amit Kapila <akapila@postgresql.org>
Tue, 28 Jul 2020 10:39:44 +0800 (08:09 +0530)
commit 45fdc9738b36d1068d3ad8fdb06436d6fd14436b
tree 1168c9368d1d3c0e7daa47f82c5f8531ed0197c5 tree | snapshot
parent 13838740f61fc455aa4196d257efc0b761daba1f commit | diff
Extend the logical decoding output plugin API with stream methods.
This adds seven methods to the output plugin API, adding support for
streaming changes of large in-progress transactions.
* stream_start
* stream_stop
* stream_abort
* stream_commit
* stream_change
* stream_message
* stream_truncate
Most of this is a simple extension of the existing methods, with
the semantic difference that the transaction (or subtransaction)
is incomplete and may be aborted later (which is something the
regular API does not really need to deal with).
This also extends the 'test_decoding' plugin, implementing these
new stream methods.
The stream_start/start_stop are used to demarcate a chunk of changes
streamed for a particular toplevel transaction.
This commit simply adds these new APIs and the upcoming patch to "allow
the streaming mode in ReorderBuffer" will use these APIs.
I like to learn new and better ways of doing things when working on a scale, and feel free to ask questions and make suggestions.
Also, check out another story on this.
Thanks for reading this.