On 2/25/18 07:27, Craig Ringer wrote:
> I'm pretty sure we _will_ want the ability to decode and stream rewrite
> contents for non-IMMUTABLE table rewrites.
>
> Filtering out by default is OK by me, but I think making it impossible
> to decode is a mistake. So I'm all for the oid option and had written a
> suggestion for it before I saw you already mentioned it in the next
> part of your mail.
>
> The main issue with filtering out rewrites by default is that I don't
> see how, if we default to ignore/filter-out, plugins would indicate
> "actually I want to choose about this one" or "I understand table
> rewrites". I'd prefer not to add another change callback.
Second version, which uses an OID. I added another field to the output
plugin options (next to the output_type), to indicate whether the plugin
wants to receive these changes. I added some test cases to
test_decoding to show how it works either way. It's a bit messy to pass
this setting through to the ReorderBuffer; maybe there is a better idea.
But the result seems pretty useful.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services