v1-0001-Improve-wording-in-comment-for-writetuple-functio.patch

text/plain

Filename: v1-0001-Improve-wording-in-comment-for-writetuple-functio.patch
Type: text/plain
Part: 2
Message: Small cleanups to tuplesort.c and a bonus small performance improvement

Patch

Format: format-patch
Series: patch v1-0001
Subject: Improve wording in comment for writetuple function
File+
src/backend/utils/sort/tuplesort.c 2 4
From 62fd0349f4550d3331843e8a7f7fe963fb90b8b6 Mon Sep 17 00:00:00 2001
From: David Rowley <dgrowley@gmail.com>
Date: Fri, 26 Aug 2022 13:53:18 +1200
Subject: [PATCH v1 1/3] Improve wording in comment for writetuple function

---
 src/backend/utils/sort/tuplesort.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index d90a1aebdf..4fe64f0793 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -1340,10 +1340,8 @@ tuplesort_puttuple_common(Tuplesortstate *state, SortTuple *tuple, bool useAbbre
 }
 
 /*
- * Write a stored tuple onto tape.tuple.  Unless the slab allocator is
- * used, after writing the tuple, pfree() the out-of-line data (not the
- * SortTuple struct!), and increase state->availMem by the amount of
- * memory space thereby released.
+ * Write 'stup' out onto 'tape' and, unless using the slab allocator, pfree
+ * stup's tuple and adjust the memory accounting accordingly.
  */
 static void
 writetuple(Tuplesortstate *state, LogicalTape *tape, SortTuple *stup)
-- 
2.34.1