Typo for xl_running_xacts

Started by Japin Liabout 3 years ago3 messages
#1Japin Li
japinli@hotmail.com
1 attachment(s)

Hi, hackers

I find some typo about xl_running_xacts in comments.
Attached a patch to fix those.

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

Attachments:

fix-typo-for-xl_running_xacts.difftext/x-diffDownload
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 5006a5c464..44d94bf656 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -93,7 +93,7 @@
  * Initially the machinery is in the START stage. When an xl_running_xacts
  * record is read that is sufficiently new (above the safe xmin horizon),
  * there's a state transition. If there were no running xacts when the
- * running_xacts record was generated, we'll directly go into CONSISTENT
+ * xl_running_xacts record was generated, we'll directly go into CONSISTENT
  * state, otherwise we'll switch to the BUILDING_SNAPSHOT state. Having a full
  * snapshot means that all transactions that start henceforth can be decoded
  * in their entirety, but transactions that started previously can't. In
@@ -1331,7 +1331,7 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
 	 */
 
 	/*
-	 * xl_running_xact record is older than what we can use, we might not have
+	 * xl_running_xacts record is older than what we can use, we might not have
 	 * all necessary catalog rows anymore.
 	 */
 	if (TransactionIdIsNormal(builder->initial_xmin_horizon) &&
@@ -1399,7 +1399,7 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
 	 * encountered.  In that case, switch to BUILDING_SNAPSHOT state, and
 	 * record xl_running_xacts->nextXid.  Once all running xacts have finished
 	 * (i.e. they're all >= nextXid), we have a complete catalog snapshot.  It
-	 * might look that we could use xl_running_xact's ->xids information to
+	 * might look that we could use xl_running_xacts->xids information to
 	 * get there quicker, but that is problematic because transactions marked
 	 * as running, might already have inserted their commit record - it's
 	 * infeasible to change that with locking.
#2Daniel Gustafsson
daniel@yesql.se
In reply to: Japin Li (#1)
Re: Typo for xl_running_xacts

On 17 Nov 2022, at 08:06, Japin Li <japinli@hotmail.com> wrote:

I find some typo about xl_running_xacts in comments.
Attached a patch to fix those.

Thanks, applied!

-	 * might look that we could use xl_running_xact's ->xids information to
+	 * might look that we could use xl_running_xacts->xids information to

I'm not a native english speaker, but since xl_running_xacts refers to a name
in this case and not an indication of plural possession, ending with a 's is
correct even if it ends with an 's', so I instead changed this to
"xl_running_xacts's".

--
Daniel Gustafsson https://vmware.com/

#3Japin Li
japinli@hotmail.com
In reply to: Daniel Gustafsson (#2)
Re: Typo for xl_running_xacts

On Thu, 17 Nov 2022 at 16:22, Daniel Gustafsson <daniel@yesql.se> wrote:

On 17 Nov 2022, at 08:06, Japin Li <japinli@hotmail.com> wrote:

I find some typo about xl_running_xacts in comments.
Attached a patch to fix those.

Thanks, applied!

-	 * might look that we could use xl_running_xact's ->xids information to
+	 * might look that we could use xl_running_xacts->xids information to

I'm not a native english speaker, but since xl_running_xacts refers to a name
in this case and not an indication of plural possession, ending with a 's is
correct even if it ends with an 's', so I instead changed this to
"xl_running_xacts's".

Thanks, I found other places use "xl_running_xacs'",
such as "xl_running_xacts' oldestRunningXid" in snapbuild.c.

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.