Re: [PATCH] Present all committed transaction to the output plugin

From: Markus Wanner <markus(dot)wanner(at)enterprisedb(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Present all committed transaction to the output plugin
Date: 2021-02-20 20:44:30
Message-ID: dd0bdcd3-8dae-0de6-3475-c0d0a12f357f@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20.02.21 21:08, Andres Freund wrote:
> It's not free though

Agreed. It's an additional call to a callback. Do you think that's
acceptable if limited to two-phase transactions only?

> I'm wondering the opposite: What's a potential use case for handing
> "trivially empty" transactions to the output plugin that's worth
> incurring some cost for everyone?

Outlined in my previous mail: prepare the transaction on one node,
commit it on another one. The PREPARE of a transaction is an event a
user may well want to have replicated, without having to worry about
whether or not the transaction happens to be empty.

[ Imagine: ERROR: transaction cannot be replicated because it's empty.
HINT: add a dummy UPDATE so that Postgres always has
something to replicate, whatever else your app does
or does not do in the transaction. ]

Regards

Markus

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2021-02-20 21:10:58 Re: [POC] verifying UTF-8 using SIMD instructions
Previous Message Andres Freund 2021-02-20 20:13:17 Re: repeated decoding of prepared transactions