mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
Add a xid argument to the filter_prepare callback for output plugins.
Along with gid, this provides a different way to identify the transaction. The users that use xid in some way to prepare the transactions can use it to filter prepare transactions. The later commands COMMIT PREPARED or ROLLBACK PREPARED carries both identifiers, providing an output plugin the choice of what to use. Author: Markus Wanner Reviewed-by: Vignesh C, Amit Kapila Discussion: https://postgr.es/m/ee280000-7355-c4dc-e47b-2436e7be959c@enterprisedb.com
This commit is contained in:
@@ -1083,7 +1083,8 @@ truncate_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
|
||||
}
|
||||
|
||||
bool
|
||||
filter_prepare_cb_wrapper(LogicalDecodingContext *ctx, const char *gid)
|
||||
filter_prepare_cb_wrapper(LogicalDecodingContext *ctx, TransactionId xid,
|
||||
const char *gid)
|
||||
{
|
||||
LogicalErrorCallbackState state;
|
||||
ErrorContextCallback errcallback;
|
||||
@@ -1104,7 +1105,7 @@ filter_prepare_cb_wrapper(LogicalDecodingContext *ctx, const char *gid)
|
||||
ctx->accept_writes = false;
|
||||
|
||||
/* do the actual work: call callback */
|
||||
ret = ctx->callbacks.filter_prepare_cb(ctx, gid);
|
||||
ret = ctx->callbacks.filter_prepare_cb(ctx, xid, gid);
|
||||
|
||||
/* Pop the error context stack */
|
||||
error_context_stack = errcallback.previous;
|
||||
|
Reference in New Issue
Block a user