Re: Typos in reorderbuffer.c.

2024-03-14 Thread Kyotaro Horiguchi
At Thu, 14 Mar 2024 11:23:38 +0530, Amit Kapila  wrote 
in 
> On Thu, Mar 14, 2024 at 9:58 AM Kyotaro Horiguchi
>  wrote:
> >
> > While examining reorderbuffer.c, I found several typos. I'm not sure
> > if fixing them is worthwhile, but I've attached a fix just in case.
> >
> 
> LGTM. I'll push this in some time.

Thanks!

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


Re: Typos in reorderbuffer.c.

2024-03-13 Thread Amit Kapila
On Thu, Mar 14, 2024 at 9:58 AM Kyotaro Horiguchi
 wrote:
>
> While examining reorderbuffer.c, I found several typos. I'm not sure
> if fixing them is worthwhile, but I've attached a fix just in case.
>

LGTM. I'll push this in some time.

-- 
With Regards,
Amit Kapila.




Typos in reorderbuffer.c.

2024-03-13 Thread Kyotaro Horiguchi
Hello.

While examining reorderbuffer.c, I found several typos. I'm not sure
if fixing them is worthwhile, but I've attached a fix just in case.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 001f901ee6..92cf39ff74 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -32,7 +32,7 @@
  *
  *	  In order to cope with large transactions - which can be several times as
  *	  big as the available memory - this module supports spooling the contents
- *	  of a large transactions to disk. When the transaction is replayed the
+ *	  of large transactions to disk. When the transaction is replayed the
  *	  contents of individual (sub-)transactions will be read from disk in
  *	  chunks.
  *
@@ -3078,10 +3078,10 @@ ReorderBufferImmediateInvalidation(ReorderBuffer *rb, uint32 ninvalidations,
  * least once for every xid in XLogRecord->xl_xid (other places in records
  * may, but do not have to be passed through here).
  *
- * Reorderbuffer keeps some datastructures about transactions in LSN order,
+ * Reorderbuffer keeps some data structures about transactions in LSN order,
  * for efficiency. To do that it has to know about when transactions are seen
  * first in the WAL. As many types of records are not actually interesting for
- * logical decoding, they do not necessarily pass though here.
+ * logical decoding, they do not necessarily pass through here.
  */
 void
 ReorderBufferProcessXid(ReorderBuffer *rb, TransactionId xid, XLogRecPtr lsn)
@@ -3513,11 +3513,11 @@ ReorderBufferLargestTXN(ReorderBuffer *rb)
  * snapshot because we don't decode such transactions.  Also, we do not select
  * the transaction which doesn't have any streamable change.
  *
- * Note that, we skip transactions that contains incomplete changes. There
+ * Note that, we skip transactions that contain incomplete changes. There
  * is a scope of optimization here such that we can select the largest
  * transaction which has incomplete changes.  But that will make the code and
  * design quite complex and that might not be worth the benefit.  If we plan to
- * stream the transactions that contains incomplete changes then we need to
+ * stream the transactions that contain incomplete changes then we need to
  * find a way to partially stream/truncate the transaction changes in-memory
  * and build a mechanism to partially truncate the spilled files.
  * Additionally, whenever we partially stream the transaction we need to
@@ -4701,8 +4701,8 @@ ReorderBufferToastAppendChunk(ReorderBuffer *rb, ReorderBufferTXN *txn,
 }
 
 /*
- * Rejigger change->newtuple to point to in-memory toast tuples instead to
- * on-disk toast tuples that may not longer exist (think DROP TABLE or VACUUM).
+ * Rejigger change->newtuple to point to in-memory toast tuples instead of
+ * on-disk toast tuples that may no longer exist (think DROP TABLE or VACUUM).
  *
  * We cannot replace unchanged toast tuples though, so those will still point
  * to on-disk toast data.
@@ -4713,7 +4713,7 @@ ReorderBufferToastAppendChunk(ReorderBuffer *rb, ReorderBufferTXN *txn,
  * at unexpected times.
  *
  * We simply subtract size of the change before rejiggering the tuple, and
- * then adding the new size. This makes it look like the change was removed
+ * then add the new size. This makes it look like the change was removed
  * and then added back, except it only tweaks the accounting info.
  *
  * In particular it can't trigger serialization, which would be pointless


Re: Fix typos in reorderbuffer.c

2020-10-08 Thread Amit Kapila
On Thu, Oct 8, 2020 at 2:40 PM Masahiko Sawada
 wrote:
>
> On Thu, 8 Oct 2020 at 17:37, Amit Kapila  wrote:
> >
>
> > So, I feel the
> > comments should be accordingly updated.
>
> +1 for this change.
>

Thanks, I have pushed this and along with it pushed a typo-fix in logical.c.

-- 
With Regards,
Amit Kapila.




Re: Fix typos in reorderbuffer.c

2020-10-08 Thread Masahiko Sawada
On Thu, 8 Oct 2020 at 17:37, Amit Kapila  wrote:
>
> @@ -1432,7 +1432,7 @@ ReorderBufferCleanupTXN(ReorderBuffer *rb,
> ReorderBufferTXN *txn)
>   ReorderBufferCleanupTXN(rb, subtxn);
>   }
>
> - /* cleanup changes in the toplevel txn */
> + /* cleanup changes in the txn */
>   dlist_foreach_modify(iter, >changes)
>   {
>   ReorderBufferChange *change;
> @@ -1533,7 +1533,7 @@ ReorderBufferTruncateTXN(ReorderBuffer *rb,
> ReorderBufferTXN *txn)
>   ReorderBufferTruncateTXN(rb, subtxn);
>   }
>
> - /* cleanup changes in the toplevel txn */
> + /* cleanup changes in the txn */
>   dlist_foreach_modify(iter, >changes)
>   {
>   ReorderBufferChange *change;
>
> Both the above functions are recursive and will clean the changes for
> both the top-level transaction and subtransactions.

Right.

> So, I feel the
> comments should be accordingly updated.

+1 for this change.

Regards,

-- 
Masahiko Sawadahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




Fix typos in reorderbuffer.c

2020-10-08 Thread Amit Kapila
@@ -1432,7 +1432,7 @@ ReorderBufferCleanupTXN(ReorderBuffer *rb,
ReorderBufferTXN *txn)
  ReorderBufferCleanupTXN(rb, subtxn);
  }

- /* cleanup changes in the toplevel txn */
+ /* cleanup changes in the txn */
  dlist_foreach_modify(iter, >changes)
  {
  ReorderBufferChange *change;
@@ -1533,7 +1533,7 @@ ReorderBufferTruncateTXN(ReorderBuffer *rb,
ReorderBufferTXN *txn)
  ReorderBufferTruncateTXN(rb, subtxn);
  }

- /* cleanup changes in the toplevel txn */
+ /* cleanup changes in the txn */
  dlist_foreach_modify(iter, >changes)
  {
  ReorderBufferChange *change;

Both the above functions are recursive and will clean the changes for
both the top-level transaction and subtransactions. So, I feel the
comments should be accordingly updated.

-- 
With Regards,
Amit Kapila.


v1-0001-Fix-typos-in-reorderbuffer.c.patch
Description: Binary data