pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Wanner <markus.wanner@enterprisedb.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Ajin Cherian <itsajin@gmail.com>
Subject: Re: [PATCH] Provide more information to filter_prepare
Date: Wed, 10 Mar 2021 11:56:12 +0100
Message-ID: <f43bc7b3-798c-a259-17e2-51ab1e8eccc9@enterprisedb.com> (raw)
In-Reply-To: <CAA4eK1L1OWb4ia5PjmC5BpuktBZgfqZbz=9sWLv77dBpZfhu+A@mail.gmail.com>
References: <ee280000-7355-c4dc-e47b-2436e7be959c@enterprisedb.com>
	<CAA4eK1L1OWb4ia5PjmC5BpuktBZgfqZbz=9sWLv77dBpZfhu+A@mail.gmail.com>

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





view thread (26+ messages)  latest in thread

Message-ID: <f43bc7b3-798c-a259-17e2-51ab1e8eccc9@enterprisedb.com>
Permalink:  ../f43bc7b3-798c-a259-17e2-51ab1e8eccc9@enterprisedb.com/
Also on:    postgresql.org/message-id/f43bc7b3-798c-a259-17e2-51ab1e8eccc9@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: markus.wanner@enterprisedb.com, amit.kapila16@gmail.com, itsajin@gmail.com
  Subject: Re: [PATCH] Provide more information to filter_prepare
  In-Reply-To: <f43bc7b3-798c-a259-17e2-51ab1e8eccc9@enterprisedb.com>
  References: <ee280000-7355-c4dc-e47b-2436e7be959c@enterprisedb.com> <CAA4eK1L1OWb4ia5PjmC5BpuktBZgfqZbz=9sWLv77dBpZfhu+A@mail.gmail.com> <f43bc7b3-798c-a259-17e2-51ab1e8eccc9@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox