Re: [PATCH] Provide more information to filter_prepare
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Markus Wanner <markus.wanner@enterprisedb.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Ajin Cherian <itsajin@gmail.com>
Date: 2021-03-29T12:00:41Z
Lists: pgsql-hackers
On Mon, Mar 29, 2021 at 4:46 PM Markus Wanner
<markus.wanner@enterprisedb.com> wrote:
>
> On 29.03.21 13:04, vignesh C wrote:
> > The above content looks sufficient to me.
>
> Good, thanks. Based on that, I'm adding v7 of the patch.
>
Thanks for the updated patch.
@@ -440,7 +441,8 @@ pg_decode_rollback_prepared_txn(LogicalDecodingContext *ctx,
* substring, then we filter it out.
*/
static bool
-pg_decode_filter_prepare(LogicalDecodingContext *ctx, const char *gid)
+pg_decode_filter_prepare(LogicalDecodingContext *ctx, TransactionId xid,
+ const char *gid)
{
if (strstr(gid, "_nodecode") != NULL)
return true;
Currently there is one test to filter prepared txn with gid having
"_nodecode". I'm not sure if we can have any tests based on xid, I'm
sure you might have thought about it, Have you intentionally not
written any tests as it will be difficult to predict the xid. I just
wanted to confirm my understanding.
Regards,
Vignesh
Commits
-
Add a xid argument to the filter_prepare callback for output plugins.
- f64ea6dc5c8c 14.0 landed