From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Avoid streaming the transaction which are skipped (in corner cases) |
Date: | 2022-11-29 04:07:51 |
Message-ID: | CAFiTN-sTrkj_yLZR7CV3MXhwArxXkKy9YvO7k4fK9OwvYS_JuA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Nov 28, 2022 at 3:19 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> On Mon, Nov 28, 2022 at 1:46 PM shiy(dot)fnst(at)fujitsu(dot)com
> <shiy(dot)fnst(at)fujitsu(dot)com> wrote:
> >
> > Thanks for your patch.
> >
> > I saw that the patch added a check when selecting largest transaction, but in
> > addition to ReorderBufferCheckMemoryLimit(), the transaction can also be
> > streamed in ReorderBufferProcessPartialChange(). Should we add the check in
> > this function, too?
> >
> > diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
> > index 9a58c4bfb9..108737b02f 100644
> > --- a/src/backend/replication/logical/reorderbuffer.c
> > +++ b/src/backend/replication/logical/reorderbuffer.c
> > @@ -768,7 +768,8 @@ ReorderBufferProcessPartialChange(ReorderBuffer *rb, ReorderBufferTXN *txn,
> > */
> > if (ReorderBufferCanStartStreaming(rb) &&
> > !(rbtxn_has_partial_change(toptxn)) &&
> > - rbtxn_is_serialized(txn))
> > + rbtxn_is_serialized(txn) &&
> > + rbtxn_has_streamable_change(txn))
> > ReorderBufferStreamTXN(rb, toptxn);
> > }
>
> You are right we need this in ReorderBufferProcessPartialChange() as
> well. I will fix this in the next version.
Fixed this in the attached patch.
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
v3-0001-Fix-thinko-in-when-to-stream-a-transaction.patch | text/x-patch | 6.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Ajin Cherian | 2022-11-29 04:25:35 | Re: Support logical replication of DDLs |
Previous Message | Jeff Davis | 2022-11-29 03:36:26 | Re: Collation version tracking for macOS |