Re: [PATCH] Provide more information to filter_prepare

From: Markus Wanner <markus(dot)wanner(at)enterprisedb(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Ajin Cherian <itsajin(at)gmail(dot)com>
Subject: Re: [PATCH] Provide more information to filter_prepare
Date: 2021-03-10 10:56:12
Message-ID: f43bc7b3-798c-a259-17e2-51ab1e8eccc9@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10.03.21 11:18, Amit Kapila wrote:
> On Tue, Mar 9, 2021 at 2:14 PM Markus Wanner
> <markus(dot)wanner(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-03-10 11:33:40 Re: Logical Replication - improve error message while adding tables to the publication in check_publication_add_relation
Previous Message vignesh C 2021-03-10 10:33:38 Do we support upgrade of logical replication?