Skip to content

Commit ee44cb7

Browse files
committed
Improve comments about abbreviation abort.
Peter Geoghegan
1 parent f18c944 commit ee44cb7

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

src/backend/utils/sort/tuplesort.c

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,8 +1294,10 @@ tuplesort_putindextuplevalues(Tuplesortstate *state, Relation rel,
12941294
*
12951295
* Alter datum1 representation in already-copied tuples, so as to
12961296
* ensure a consistent representation (current tuple was just
1297-
* handled). Note that we rely on all tuples copied so far actually
1298-
* being contained within memtuples array.
1297+
* handled). It does not matter if some dumped tuples are already
1298+
* sorted on tape, since serialized tuples lack abbreviated keys
1299+
* (TSS_BUILDRUNS state prevents control reaching here in any
1300+
* case).
12991301
*/
13001302
for (i = 0; i < state->memtupcount; i++)
13011303
{
@@ -1373,8 +1375,10 @@ tuplesort_putdatum(Tuplesortstate *state, Datum val, bool isNull)
13731375
*
13741376
* Alter datum1 representation in already-copied tuples, so as to
13751377
* ensure a consistent representation (current tuple was just
1376-
* handled). Note that we rely on all tuples copied so far
1377-
* actually being contained within memtuples array.
1378+
* handled). It does not matter if some dumped tuples are
1379+
* already sorted on tape, since serialized tuples lack
1380+
* abbreviated keys (TSS_BUILDRUNS state prevents control
1381+
* reaching here in any case).
13781382
*/
13791383
for (i = 0; i < state->memtupcount; i++)
13801384
{
@@ -3174,8 +3178,10 @@ copytup_heap(Tuplesortstate *state, SortTuple *stup, void *tup)
31743178
*
31753179
* Alter datum1 representation in already-copied tuples, so as to
31763180
* ensure a consistent representation (current tuple was just
3177-
* handled). Note that we rely on all tuples copied so far actually
3178-
* being contained within memtuples array.
3181+
* handled). It does not matter if some dumped tuples are already
3182+
* sorted on tape, since serialized tuples lack abbreviated keys
3183+
* (TSS_BUILDRUNS state prevents control reaching here in any
3184+
* case).
31793185
*/
31803186
for (i = 0; i < state->memtupcount; i++)
31813187
{
@@ -3414,8 +3420,10 @@ copytup_cluster(Tuplesortstate *state, SortTuple *stup, void *tup)
34143420
*
34153421
* Alter datum1 representation in already-copied tuples, so as to
34163422
* ensure a consistent representation (current tuple was just
3417-
* handled). Note that we rely on all tuples copied so far actually
3418-
* being contained within memtuples array.
3423+
* handled). It does not matter if some dumped tuples are already
3424+
* sorted on tape, since serialized tuples lack abbreviated keys
3425+
* (TSS_BUILDRUNS state prevents control reaching here in any
3426+
* case).
34193427
*/
34203428
for (i = 0; i < state->memtupcount; i++)
34213429
{
@@ -3716,8 +3724,10 @@ copytup_index(Tuplesortstate *state, SortTuple *stup, void *tup)
37163724
*
37173725
* Alter datum1 representation in already-copied tuples, so as to
37183726
* ensure a consistent representation (current tuple was just
3719-
* handled). Note that we rely on all tuples copied so far actually
3720-
* being contained within memtuples array.
3727+
* handled). It does not matter if some dumped tuples are already
3728+
* sorted on tape, since serialized tuples lack abbreviated keys
3729+
* (TSS_BUILDRUNS state prevents control reaching here in any
3730+
* case).
37213731
*/
37223732
for (i = 0; i < state->memtupcount; i++)
37233733
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy