From: | "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Oh, Mike" <minsoo(at)amazon(dot)com> |
Subject: | RE: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns |
Date: | 2022-07-15 06:32:10 |
Message-ID: | OSZPR01MB63106E9CE179D80F46CB3154FD8B9@OSZPR01MB6310.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 11, 2022 9:54 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> I've attached an updated patch, please review it.
>
Thanks for your patch. Here are some comments for the REL14-v1 patch.
1.
+ Size sz = sizeof(TransactionId) * nxacts;;
There is a redundant semicolon at the end.
2.
+ workspace = MemoryContextAlloc(rb->context, rb->n_initial_running_xacts);
Should it be:
+ workspace = MemoryContextAlloc(rb->context, sizeof(TransactionId) * rb->n_initial_running_xacts);
3.
+ /* bound check if there is at least one transaction to be removed */
+ if (NormalTransactionIdPrecedes(rb->initial_running_xacts[0],
+ running->oldestRunningXid))
+ return;
+
Here, I think it should return if rb->initial_running_xacts[0] is older than
oldestRunningXid, right? Should it be changed to:
+ if (!NormalTransactionIdPrecedes(rb->initial_running_xacts[0],
+ running->oldestRunningXid))
+ return;
4.
+ if ((parsed->xinfo & XACT_XINFO_HAS_INVALS) != 0)
Maybe we can change it like the following, to be consistent with other places in
this file. It's also fine if you don't change it.
+ if (parsed->xinfo & XACT_XINFO_HAS_INVALS)
Regards,
Shi yu
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2022-07-15 07:30:59 | Re: standby recovery fails (tablespace related) (tentative patch and discussion) |
Previous Message | Erik Rijkers | 2022-07-15 06:20:59 | Re: SQL/JSON documentation JSON_TABLE |