Re: [PATCH] Provide more information to filter_prepare
Markus Wanner <markus.wanner@enterprisedb.com>
From: Markus Wanner <markus.wanner@enterprisedb.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Ajin Cherian <itsajin@gmail.com>
Date: 2021-03-10T10:56:12Z
Lists: pgsql-hackers
On 10.03.21 11:18, Amit Kapila wrote: > On Tue, Mar 9, 2021 at 2:14 PM Markus Wanner > <markus.wanner@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
Commits
-
Add a xid argument to the filter_prepare callback for output plugins.
- f64ea6dc5c8c 14.0 landed