Re: Force streaming every change in logical decoding
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, "sawada.mshk@gmail.com" <sawada.mshk@gmail.com>,
"smithpb2250@gmail.com" <smithpb2250@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>,
"dilipbalaut@gmail.com" <dilipbalaut@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2022-12-23T05:50:22Z
Lists: pgsql-hackers
On Thu, Dec 22, 2022 at 6:18 PM shiy.fnst@fujitsu.com
<shiy.fnst@fujitsu.com> wrote:
>
>
> Besides, I tried to reduce data size in streaming subscription tap tests by this
> new GUC (see 0002 patch). But I didn't covert all streaming tap tests because I
> think we also need to cover the case that there are lots of changes. So, 015* is
> not modified. And 017* is not modified because streaming transactions and
> non-streaming transactions are tested alternately in this test.
>
I think we can remove the newly added test from the patch and instead
combine the 0001 and 0002 patches. I think we should leave the
022_twophase_cascade as it is because it can impact code coverage,
especially the below part of the test:
# 2PC PREPARE with a nested ROLLBACK TO SAVEPOINT
$node_A->safe_psql(
'postgres', "
BEGIN;
INSERT INTO test_tab VALUES (9999, 'foobar');
SAVEPOINT sp_inner;
INSERT INTO test_tab SELECT i, md5(i::text) FROM
generate_series(3, 5000) s(i);
Here, we will stream first time after the subtransaction, so can
impact the below part of the code in ReorderBufferStreamTXN:
if (txn->snapshot_now == NULL)
{
...
dlist_foreach(subxact_i, &txn->subtxns)
{
ReorderBufferTXN *subtxn;
subtxn = dlist_container(ReorderBufferTXN, node, subxact_i.cur);
ReorderBufferTransferSnapToParent(txn, subtxn);
}
...
--
With Regards,
Amit Kapila.
Commits
-
Add 'logical_decoding_mode' GUC.
- 5de94a041ed7 16.0 landed
-
Clean up some inconsistencies with GUC declarations
- d9d873bac670 16.0 cited