From: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
---|---|
To: | Markus Wanner <markus(dot)wanner(at)enterprisedb(dot)com>, 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-21 21:56:03 |
Message-ID: | 469cd0e5-c11d-8252-d836-bf000b994231@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2/21/21 11:05 AM, Markus Wanner wrote:
> On 21.02.21 03:04, Andres Freund wrote:
>> Cost-wise, yes - a 2pc prepare/commit is expensive enough that
>> comparatively the replay cost is unlikely to be relevant.
>
> Good. I attached an updated patch eliminating only the filtering for
> empty two-phase transactions.
>
>> Behaviourally I'm still not convinced it's useful.
>
> I don't have any further argument than: If you're promising to replicate
> two phases, I expect the first phase to be replicated individually.
>
> A database state with a transaction prepared and identified by
> 'woohoo-roll-me-back-if-you-can' is not the same as a state without it.
> Even if the transaction is empty, or if you're actually going to roll
> it back. And therefore possibly ending up at the very same state without
> any useful effect.
>
IMHO it's quite weird to handle the 2PC and non-2PC cases differently.
If the argument is that this is expensive, it'd be good to quantify
that, somehow. If there's a workload with significant fraction of such
empty transactions, does that mean +1% CPU usage, +10% or more?
Why not to make this configurable, i.e. the output plugin might indicate
whether it's interested in empty transactions or not. If not, we can do
what we do now. Otherwise the empty transactions would be passed to the
output plugin.
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2021-02-21 22:23:08 | Re: [HACKERS] GSoC 2017: Foreign Key Arrays |
Previous Message | Matthias van de Meent | 2021-02-21 19:10:09 | Re: Improvements and additions to COPY progress reporting |