On 10.03.21 11:18, Amit Kapila wrote:
On Tue, Mar 9, 2021 at 2:14 PM Markus Wanner
<markus.wan...@enterprisedb.com> wrote:
currently, only the gid is passed on to the filter_prepare callback.
While we probably should not pass a full ReorderBufferTXN (as we do for
most other output plugin callbacks), a bit more information would be
nice, I think.
How the proposed 'xid' parameter can be useful? What exactly plugins
want to do with it?
The xid is the very basic identifier for transactions in Postgres. Any
output plugin that interacts with Postgres in any way slightly more
interesting than "filter by gid prefix" is very likely to come across a
TransactionId.
It allows for basics like checking if the transaction to decode still is
in progress, for example. Or in a much more complex scenario, decide on
whether or not to filter based on properties the extension stored during
processing the transaction.
Regards
Markus