[PATCH] Provide more information to filter_prepare

Markus Wanner <markus.wanner@enterprisedb.com>

From: Markus Wanner <markus.wanner@enterprisedb.com>
To: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Cc: itsajin@gmail.com, amit.kapila16@gmail.com
Date: 2021-03-09T08:44:40Z
Lists: pgsql-hackers

Attachments

Hi,

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.

Attached is a patch that adds the xid (still lacking docs changes).  The 
question about stream_prepare being optional made me think about whether 
an output plugin needs to know if changes have been already streamed 
prior to a prepare.  Maybe not?  Any other information you think the 
output plugin might find useful to decide whether or not to skip the 
prepare?

If you are okay with adding just the xid, I'll add docs changes to the 
patch provided.

Regards

Markus

Commits

  1. Add a xid argument to the filter_prepare callback for output plugins.