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


Reply via email to