aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2015-11-03 14:11:49 -0500
committerRobert Haas <rhaas@postgresql.org>2015-11-03 14:11:49 -0500
commitee44cb7566ffafc0144535e1f966f5e3bb7d384b (patch)
tree73b3fa07fa102e6d944ded2914d650c75145f8d5
parentf18c944b6137329ac4a6b2dce5745c5dc21a8578 (diff)
downloadpostgresql-ee44cb7566ffafc0144535e1f966f5e3bb7d384b.tar.gz
postgresql-ee44cb7566ffafc0144535e1f966f5e3bb7d384b.zip
Improve comments about abbreviation abort.
Peter Geoghegan
-rw-r--r--src/backend/utils/sort/tuplesort.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index d532e87450e..6572af875a5 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -1294,8 +1294,10 @@ tuplesort_putindextuplevalues(Tuplesortstate *state, Relation rel,
*
* Alter datum1 representation in already-copied tuples, so as to
* ensure a consistent representation (current tuple was just
- * handled). Note that we rely on all tuples copied so far actually
- * being contained within memtuples array.
+ * handled). It does not matter if some dumped tuples are already
+ * sorted on tape, since serialized tuples lack abbreviated keys
+ * (TSS_BUILDRUNS state prevents control reaching here in any
+ * case).
*/
for (i = 0; i < state->memtupcount; i++)
{
@@ -1373,8 +1375,10 @@ tuplesort_putdatum(Tuplesortstate *state, Datum val, bool isNull)
*
* Alter datum1 representation in already-copied tuples, so as to
* ensure a consistent representation (current tuple was just
- * handled). Note that we rely on all tuples copied so far
- * actually being contained within memtuples array.
+ * handled). It does not matter if some dumped tuples are
+ * already sorted on tape, since serialized tuples lack
+ * abbreviated keys (TSS_BUILDRUNS state prevents control
+ * reaching here in any case).
*/
for (i = 0; i < state->memtupcount; i++)
{
@@ -3174,8 +3178,10 @@ copytup_heap(Tuplesortstate *state, SortTuple *stup, void *tup)
*
* Alter datum1 representation in already-copied tuples, so as to
* ensure a consistent representation (current tuple was just
- * handled). Note that we rely on all tuples copied so far actually
- * being contained within memtuples array.
+ * handled). It does not matter if some dumped tuples are already
+ * sorted on tape, since serialized tuples lack abbreviated keys
+ * (TSS_BUILDRUNS state prevents control reaching here in any
+ * case).
*/
for (i = 0; i < state->memtupcount; i++)
{
@@ -3414,8 +3420,10 @@ copytup_cluster(Tuplesortstate *state, SortTuple *stup, void *tup)
*
* Alter datum1 representation in already-copied tuples, so as to
* ensure a consistent representation (current tuple was just
- * handled). Note that we rely on all tuples copied so far actually
- * being contained within memtuples array.
+ * handled). It does not matter if some dumped tuples are already
+ * sorted on tape, since serialized tuples lack abbreviated keys
+ * (TSS_BUILDRUNS state prevents control reaching here in any
+ * case).
*/
for (i = 0; i < state->memtupcount; i++)
{
@@ -3716,8 +3724,10 @@ copytup_index(Tuplesortstate *state, SortTuple *stup, void *tup)
*
* Alter datum1 representation in already-copied tuples, so as to
* ensure a consistent representation (current tuple was just
- * handled). Note that we rely on all tuples copied so far actually
- * being contained within memtuples array.
+ * handled). It does not matter if some dumped tuples are already
+ * sorted on tape, since serialized tuples lack abbreviated keys
+ * (TSS_BUILDRUNS state prevents control reaching here in any
+ * case).
*/
for (i = 0; i < state->memtupcount; i++)
{