|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <limits.h>#include "commands/tablespace.h"#include "miscadmin.h"#include "pg_trace.h"#include "port/pg_bitutils.h"#include "storage/shmem.h"#include "utils/guc.h"#include "utils/memutils.h"#include "utils/pg_rusage.h"#include "utils/tuplesort.h"#include "lib/sort_template.h"
Go to the source code of this file.
Data Structures | |
| union | SlabSlot |
| struct | Tuplesortstate |
| struct | Sharedsort |
| struct | RadixSortInfo |
Typedefs | |
| typedef union SlabSlot | SlabSlot |
| typedef struct RadixSortInfo | RadixSortInfo |
Enumerations | |
| enum | TupSortStatus { TSS_INITIAL , TSS_BOUNDED , TSS_BUILDRUNS , TSS_SORTEDINMEM , TSS_SORTEDONTAPE , TSS_FINALMERGE } |
Variables | |
| bool | trace_sort = false |
Definition at line 394 of file tuplesort.c.
Definition at line 400 of file tuplesort.c.
| #define FREESTATE | ( | state | ) | ((state)->base.freestate ? (*(state)->base.freestate) (state) : (void) 0) |
Definition at line 397 of file tuplesort.c.
| #define INITIAL_MEMTUPSIZE |
Definition at line 119 of file tuplesort.c.
Definition at line 373 of file tuplesort.c.
Definition at line 398 of file tuplesort.c.
Definition at line 403 of file tuplesort.c.
Definition at line 176 of file tuplesort.c.
Definition at line 178 of file tuplesort.c.
Definition at line 175 of file tuplesort.c.
| #define QSORT_THRESHOLD 40 |
Definition at line 524 of file tuplesort.c.
Definition at line 396 of file tuplesort.c.
Definition at line 381 of file tuplesort.c.
Definition at line 393 of file tuplesort.c.
| #define SLAB_SLOT_SIZE 1024 |
Definition at line 141 of file tuplesort.c.
| #define ST_CHECK_FOR_INTERRUPTS |
Definition at line 493 of file tuplesort.c.
| #define ST_CHECK_FOR_INTERRUPTS |
Definition at line 493 of file tuplesort.c.
Definition at line 501 of file tuplesort.c.
| #define ST_COMPARE_ARG_TYPE Tuplesortstate |
Definition at line 492 of file tuplesort.c.
| #define ST_COMPARE_ARG_TYPE SortSupportData |
Definition at line 492 of file tuplesort.c.
| #define ST_COMPARE_RUNTIME_POINTER |
Definition at line 491 of file tuplesort.c.
| #define ST_DECLARE |
Definition at line 495 of file tuplesort.c.
| #define ST_DEFINE |
Definition at line 496 of file tuplesort.c.
| #define ST_DEFINE |
Definition at line 496 of file tuplesort.c.
Definition at line 490 of file tuplesort.c.
Definition at line 490 of file tuplesort.c.
Definition at line 494 of file tuplesort.c.
Definition at line 494 of file tuplesort.c.
| #define ST_SORT qsort_tuple |
Definition at line 489 of file tuplesort.c.
| #define ST_SORT qsort_ssup |
Definition at line 489 of file tuplesort.c.
Definition at line 177 of file tuplesort.c.
Definition at line 399 of file tuplesort.c.
Definition at line 402 of file tuplesort.c.
Definition at line 395 of file tuplesort.c.
| typedef struct RadixSortInfo RadixSortInfo |
| Enumerator | |
|---|---|
| TSS_INITIAL | |
| TSS_BOUNDED | |
| TSS_BUILDRUNS | |
| TSS_SORTEDINMEM | |
| TSS_SORTEDONTAPE | |
| TSS_FINALMERGE | |
Definition at line 153 of file tuplesort.c.
|
static |
Definition at line 2157 of file tuplesort.c.
References Assert, fb(), mergereadnext(), Min, SortTuple::srctape, and tuplesort_heap_insert().
Referenced by mergeonerun(), and mergeruns().
|
static |
Definition at line 1216 of file tuplesort.c.
References Assert, fb(), and TSS_INITIAL.
Referenced by tuplesort_puttuple_common().
Definition at line 2574 of file tuplesort.c.
References BITS_PER_BYTE.
Referenced by radix_sort_recursive().
|
static |
Definition at line 2204 of file tuplesort.c.
References Assert, elog, ereport, errcode(), errmsg, ERROR, fb(), FREEMEM, i, LACKMEM, LOG, markrunend(), MemoryContextReset(), pg_rusage_show(), selectnewtape(), trace_sort, TSS_BUILDRUNS, tuplesort_sort_memtuples(), and WRITETUP.
Referenced by tuplesort_performsort(), and tuplesort_puttuple_common().
|
static |
Definition at line 3436 of file tuplesort.c.
References fb(), FREEMEM, GetMemoryChunkSpace(), and pfree().
Referenced by make_bounded_heap(), and tuplesort_puttuple_common().
|
static |
Definition at line 3164 of file tuplesort.c.
References elog, ERROR, fb(), len, and LogicalTapeRead().
Referenced by mergereadnext(), and tuplesort_gettuple_common().
|
static |
Definition at line 949 of file tuplesort.c.
References elog, ERROR, fb(), FREEMEM, GetMemoryChunkSpace(), LACKMEM, MaxAllocHugeSize, repalloc_huge(), and USEMEM.
Referenced by tuplesort_puttuple_common().
|
static |
Definition at line 1878 of file tuplesort.c.
References fb(), i, palloc(), SLAB_SLOT_SIZE, and USEMEM.
Referenced by mergeruns().
|
static |
Definition at line 1762 of file tuplesort.c.
References Assert, elog, fb(), inittapestate(), LEADER, LOG, LogicalTapeSetCreate(), mergeruns(), MINORDER, palloc0(), pg_rusage_show(), selectnewtape(), trace_sort, TSS_BUILDRUNS, tuplesort_merge_order(), and WORKER.
Referenced by tuplesort_performsort(), and tuplesort_puttuple_common().
|
static |
Definition at line 1811 of file tuplesort.c.
References fb(), GetMemoryChunkSpace(), PrepareTempTablespaces(), TAPE_BUFFER_OVERHEAD, and USEMEM.
Referenced by inittapes(), and leader_takeover_tapes().
|
static |
Definition at line 3377 of file tuplesort.c.
References Assert, elog, ERROR, fb(), Sharedsort::fileset, inittapestate(), j, LEADER, LogicalTapeImport(), LogicalTapeSetCreate(), Sharedsort::mutex, palloc0(), SpinLockAcquire(), SpinLockRelease(), Sharedsort::tapes, TSS_BUILDRUNS, and Sharedsort::workersFinished.
Referenced by tuplesort_performsort().
|
static |
Definition at line 2484 of file tuplesort.c.
References Assert, CHECK_FOR_INTERRUPTS, COMPARETUP, fb(), free_sort_tuple(), i, reversedirection(), SERIAL, TSS_BOUNDED, TSS_INITIAL, tuplesort_heap_insert(), and tuplesort_heap_replace_top().
Referenced by tuplesort_puttuple_common().
|
static |
Definition at line 3177 of file tuplesort.c.
References fb(), len, and LogicalTapeWrite().
Referenced by dumptuples(), and mergeonerun().
|
static |
Definition at line 1730 of file tuplesort.c.
References fb(), Max, Min, and TAPE_BUFFER_OVERHEAD.
Referenced by mergeruns().
|
static |
Definition at line 2097 of file tuplesort.c.
References Assert, beginmerge(), fb(), markrunend(), mergereadnext(), RELEASE_SLAB_SLOT, tuplesort_heap_delete_top(), tuplesort_heap_replace_top(), and WRITETUP.
Referenced by mergeruns().
|
static |
Definition at line 2185 of file tuplesort.c.
References fb(), getlen(), and READTUP.
Referenced by beginmerge(), mergeonerun(), and tuplesort_gettuple_common().
|
static |
Definition at line 1914 of file tuplesort.c.
References Assert, beginmerge(), elog, fb(), FREEMEM, GetMemoryChunkSpace(), init_slab_allocator(), INT64_FORMAT, LOG, LogicalTapeClose(), LogicalTapeFreeze(), LogicalTapeRewindForRead(), LogicalTapeSetForgetFreeSpace(), MemoryContextAlloc(), MemoryContextResetOnly(), merge_read_buffer_size(), mergeonerun(), palloc0(), pfree(), pg_rusage_show(), selectnewtape(), trace_sort, TSS_BUILDRUNS, TSS_FINALMERGE, TSS_SORTEDONTAPE, TUPLESORT_RANDOMACCESS, USEMEM, WORKER, and worker_freeze_result_tape().
Referenced by inittapes(), and tuplesort_performsort().
|
inlinestatic |
Definition at line 2586 of file tuplesort.c.
References Assert, SortSupportData::comparator, DatumGetUInt32(), fb(), PG_INT32_MAX, PG_INT64_MAX, ssup_datum_int32_cmp(), ssup_datum_signed_cmp(), ssup_datum_unsigned_cmp(), SortSupportData::ssup_reverse, and UInt32GetDatum().
Referenced by radix_sort_recursive().
|
static |
Definition at line 2655 of file tuplesort.c.
References Assert, BITS_PER_BYTE, CHECK_FOR_INTERRUPTS, current_byte(), DatumGetUInt64(), fb(), i, idx(), normalize_datum(), partitions, pg_leftmost_one_pos64(), QSORT_THRESHOLD, and radix_sort_recursive().
Referenced by radix_sort_recursive(), and radix_sort_tuple().
|
static |
Definition at line 2839 of file tuplesort.c.
References Assert, CHECK_FOR_INTERRUPTS, COMPARETUP, data, fb(), i, j, QSORT_THRESHOLD, and radix_sort_recursive().
Referenced by tuplesort_sort_memtuples().
|
static |
Definition at line 3146 of file tuplesort.c.
References fb().
Referenced by make_bounded_heap(), and sort_bounded_heap().
|
static |
Definition at line 1845 of file tuplesort.c.
References Assert, fb(), and LogicalTapeCreate().
Referenced by dumptuples(), inittapes(), and mergeruns().
|
static |
Definition at line 2533 of file tuplesort.c.
References Assert, fb(), reversedirection(), SERIAL, TSS_BOUNDED, TSS_SORTEDINMEM, and tuplesort_heap_delete_top().
Referenced by tuplesort_performsort().
| int ssup_datum_int32_cmp | ( | Datum | x, |
| Datum | y, | ||
| SortSupport | ssup | ||
| ) |
Definition at line 3472 of file tuplesort.c.
References DatumGetInt32(), fb(), x, and y.
Referenced by btint4sortsupport(), date_sortsupport(), normalize_datum(), and tuplesort_sort_memtuples().
| int ssup_datum_signed_cmp | ( | Datum | x, |
| Datum | y, | ||
| SortSupport | ssup | ||
| ) |
Definition at line 3458 of file tuplesort.c.
References DatumGetInt64(), fb(), x, and y.
Referenced by btint8sortsupport(), normalize_datum(), timestamp_sortsupport(), and tuplesort_sort_memtuples().
| int ssup_datum_unsigned_cmp | ( | Datum | x, |
| Datum | y, | ||
| SortSupport | ssup | ||
| ) |
Definition at line 3447 of file tuplesort.c.
Referenced by bytea_sortsupport(), gist_point_sortsupport(), macaddr_sortsupport(), network_sortsupport(), normalize_datum(), tuplesort_sort_memtuples(), uuid_sortsupport(), and varstr_sortsupport().
| void tuplesort_attach_shared | ( | Sharedsort * | shared, |
| dsm_segment * | seg | ||
| ) |
Definition at line 3269 of file tuplesort.c.
References Sharedsort::fileset, and SharedFileSetAttach().
Referenced by _brin_parallel_build_main(), _bt_parallel_build_main(), and _gin_parallel_build_main().
|
static |
Definition at line 653 of file tuplesort.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, BumpContextCreate(), elog, ERROR, fb(), GetMemoryChunkSpace(), INITIAL_MEMTUPSIZE, LACKMEM, MemoryContextSwitchTo(), palloc(), pfree(), TSS_INITIAL, TupleSortUseBumpTupleCxt, and USEMEM.
Referenced by tuplesort_begin_common(), and tuplesort_reset().
| Tuplesortstate * tuplesort_begin_common | ( | int | workMem, |
| SortCoordinate | coordinate, | ||
| int | sortopt | ||
| ) |
Definition at line 547 of file tuplesort.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, CurrentMemoryContext, elog, ERROR, fb(), INITIAL_MEMTUPSIZE, Max, MemoryContextSwitchTo(), palloc0_object, pg_rusage_init(), trace_sort, tuplesort_begin_batch(), TUPLESORT_RANDOMACCESS, and worker_get_identifier().
Referenced by tuplesort_begin_cluster(), tuplesort_begin_datum(), tuplesort_begin_heap(), tuplesort_begin_index_brin(), tuplesort_begin_index_btree(), tuplesort_begin_index_gin(), tuplesort_begin_index_gist(), and tuplesort_begin_index_hash().
| void tuplesort_end | ( | Tuplesortstate * | state | ) |
Definition at line 848 of file tuplesort.c.
References MemoryContextDelete(), and tuplesort_free().
Referenced by _brin_parallel_merge(), _brin_parallel_scan_and_build(), _bt_parallel_scan_and_sort(), _bt_spooldestroy(), _gin_parallel_merge(), _gin_parallel_scan_and_build(), _gin_process_worker_data(), _h_spooldestroy(), array_sort_internal(), ExecEndAgg(), ExecEndIncrementalSort(), ExecEndSort(), ExecReScanAgg(), ExecReScanSort(), gistbuild(), heapam_relation_copy_for_cluster(), initialize_aggregate(), initialize_phase(), ordered_set_shutdown(), process_ordered_aggregate_multi(), process_ordered_aggregate_single(), and validate_index().
Definition at line 3225 of file tuplesort.c.
References add_size(), Assert, fb(), MAXALIGN, and mul_size().
Referenced by _brin_begin_parallel(), _bt_begin_parallel(), and _gin_begin_parallel().
|
static |
Definition at line 794 of file tuplesort.c.
References elog, fb(), FREESTATE, LOG, LogicalTapeSetBlocks(), LogicalTapeSetClose(), MemoryContextReset(), MemoryContextSwitchTo(), pg_rusage_show(), SERIAL, and trace_sort.
Referenced by tuplesort_end(), and tuplesort_reset().
| void tuplesort_get_stats | ( | Tuplesortstate * | state, |
| TuplesortInstrumentation * | stats | ||
| ) |
Definition at line 2396 of file tuplesort.c.
References SORT_SPACE_TYPE_DISK, SORT_SPACE_TYPE_MEMORY, SORT_TYPE_EXTERNAL_MERGE, SORT_TYPE_EXTERNAL_SORT, SORT_TYPE_QUICKSORT, SORT_TYPE_STILL_IN_PROGRESS, SORT_TYPE_TOP_N_HEAPSORT, TuplesortInstrumentation::sortMethod, TuplesortInstrumentation::spaceType, TuplesortInstrumentation::spaceUsed, TSS_FINALMERGE, TSS_SORTEDINMEM, TSS_SORTEDONTAPE, and tuplesort_updatemax().
Referenced by ExecSort(), instrumentSortedGroup(), and show_sort_info().
| bool tuplesort_gettuple_common | ( | Tuplesortstate * | state, |
| bool | forward, | ||
| SortTuple * | stup | ||
| ) |
Definition at line 1367 of file tuplesort.c.
References Assert, elog, ERROR, fb(), getlen(), LogicalTapeBackspace(), LogicalTapeClose(), mergereadnext(), READTUP, RELEASE_SLAB_SLOT, TSS_FINALMERGE, TSS_SORTEDINMEM, TSS_SORTEDONTAPE, tuplesort_heap_delete_top(), tuplesort_heap_replace_top(), TUPLESORT_RANDOMACCESS, and WORKER.
Referenced by tuplesort_getbrintuple(), tuplesort_getdatum(), tuplesort_getgintuple(), tuplesort_getheaptuple(), tuplesort_getindextuple(), tuplesort_gettupleslot(), and tuplesort_skiptuples().
|
static |
Definition at line 3082 of file tuplesort.c.
References tuplesort_heap_replace_top().
Referenced by mergeonerun(), sort_bounded_heap(), and tuplesort_gettuple_common().
|
static |
Definition at line 3047 of file tuplesort.c.
References Assert, CHECK_FOR_INTERRUPTS, COMPARETUP, i, and j.
Referenced by beginmerge(), and make_bounded_heap().
|
static |
Definition at line 3106 of file tuplesort.c.
References Assert, CHECK_FOR_INTERRUPTS, COMPARETUP, i, and j.
Referenced by make_bounded_heap(), mergeonerun(), tuplesort_gettuple_common(), tuplesort_heap_delete_top(), and tuplesort_puttuple_common().
| void tuplesort_initialize_shared | ( | Sharedsort * | shared, |
| int | nWorkers, | ||
| dsm_segment * | seg | ||
| ) |
Definition at line 3246 of file tuplesort.c.
References Assert, Sharedsort::currentWorker, fb(), Sharedsort::fileset, TapeShare::firstblocknumber, i, Sharedsort::mutex, Sharedsort::nTapes, SharedFileSetInit(), SpinLockInit(), Sharedsort::tapes, and Sharedsort::workersFinished.
Referenced by _brin_begin_parallel(), _bt_begin_parallel(), and _gin_begin_parallel().
| void tuplesort_markpos | ( | Tuplesortstate * | state | ) |
Definition at line 2332 of file tuplesort.c.
References Assert, elog, ERROR, LogicalTapeTell(), MemoryContextSwitchTo(), TSS_SORTEDINMEM, TSS_SORTEDONTAPE, and TUPLESORT_RANDOMACCESS.
Referenced by ExecSortMarkPos().
Definition at line 1675 of file tuplesort.c.
References fb(), Max, MAXORDER, MERGE_BUFFER_SIZE, Min, MINORDER, and TAPE_BUFFER_OVERHEAD.
Referenced by cost_tuplesort(), and inittapes().
| const char * tuplesort_method_name | ( | TuplesortMethod | m | ) |
Definition at line 2440 of file tuplesort.c.
References SORT_TYPE_EXTERNAL_MERGE, SORT_TYPE_EXTERNAL_SORT, SORT_TYPE_QUICKSORT, SORT_TYPE_STILL_IN_PROGRESS, and SORT_TYPE_TOP_N_HEAPSORT.
Referenced by show_incremental_sort_group_info(), and show_sort_info().
| void tuplesort_performsort | ( | Tuplesortstate * | state | ) |
Definition at line 1260 of file tuplesort.c.
References dumptuples(), elog, ERROR, fb(), inittapes(), leader_takeover_tapes(), LOG, MemoryContextSwitchTo(), mergeruns(), pg_rusage_show(), SERIAL, sort_bounded_heap(), trace_sort, TSS_BOUNDED, TSS_BUILDRUNS, TSS_FINALMERGE, TSS_INITIAL, TSS_SORTEDINMEM, TSS_SORTEDONTAPE, tuplesort_sort_memtuples(), WORKER, and worker_nomergeruns().
Referenced by _brin_parallel_merge(), _brin_parallel_scan_and_build(), _bt_leafbuild(), _bt_parallel_scan_and_sort(), _gin_parallel_merge(), _gin_parallel_scan_and_build(), _gin_process_worker_data(), _h_indexbuild(), array_sort_internal(), ExecIncrementalSort(), ExecSort(), gistbuild(), heapam_relation_copy_for_cluster(), hypothetical_dense_rank_final(), hypothetical_rank_common(), initialize_phase(), mode_final(), percentile_cont_final_common(), percentile_cont_multi_final_common(), percentile_disc_final(), percentile_disc_multi_final(), process_ordered_aggregate_multi(), process_ordered_aggregate_single(), switchToPresortedPrefixMode(), and validate_index().
| void tuplesort_puttuple_common | ( | Tuplesortstate * | state, |
| SortTuple * | tuple, | ||
| bool | useAbbrev, | ||
| Size | tuplen | ||
| ) |
Definition at line 1066 of file tuplesort.c.
References Assert, CHECK_FOR_INTERRUPTS, COMPARETUP, consider_abort_common(), SortTuple::datum1, dumptuples(), elog, ERROR, fb(), free_sort_tuple(), grow_memtuples(), inittapes(), LACKMEM, LEADER, LOG, make_bounded_heap(), MemoryContextSwitchTo(), pg_rusage_show(), REMOVEABBREV, trace_sort, TSS_BOUNDED, TSS_BUILDRUNS, TSS_INITIAL, tuplesort_heap_replace_top(), and USEMEM.
Referenced by tuplesort_putbrintuple(), tuplesort_putdatum(), tuplesort_putgintuple(), tuplesort_putheaptuple(), tuplesort_putindextuplevalues(), and tuplesort_puttupleslot().
| void * tuplesort_readtup_alloc | ( | Tuplesortstate * | state, |
| Size | tuplen | ||
| ) |
Definition at line 3191 of file tuplesort.c.
References Assert, buf, MemoryContextAlloc(), and SLAB_SLOT_SIZE.
Referenced by readtup_cluster(), readtup_datum(), readtup_heap(), readtup_index(), readtup_index_brin(), and readtup_index_gin().
| void tuplesort_rescan | ( | Tuplesortstate * | state | ) |
Definition at line 2299 of file tuplesort.c.
References Assert, elog, ERROR, fb(), LogicalTapeRewindForRead(), MemoryContextSwitchTo(), TSS_SORTEDINMEM, TSS_SORTEDONTAPE, and TUPLESORT_RANDOMACCESS.
Referenced by ExecReScanSort(), mode_final(), percentile_cont_final_common(), percentile_cont_multi_final_common(), percentile_disc_final(), and percentile_disc_multi_final().
| void tuplesort_reset | ( | Tuplesortstate * | state | ) |
Definition at line 916 of file tuplesort.c.
References fb(), tuplesort_begin_batch(), tuplesort_free(), and tuplesort_updatemax().
Referenced by ExecIncrementalSort(), ExecReScanIncrementalSort(), and switchToPresortedPrefixMode().
| void tuplesort_restorepos | ( | Tuplesortstate * | state | ) |
Definition at line 2363 of file tuplesort.c.
References Assert, elog, ERROR, LogicalTapeSeek(), MemoryContextSwitchTo(), TSS_SORTEDINMEM, TSS_SORTEDONTAPE, and TUPLESORT_RANDOMACCESS.
Referenced by ExecSortRestrPos().
| void tuplesort_set_bound | ( | Tuplesortstate * | state, |
| int64 | bound | ||
| ) |
Definition at line 735 of file tuplesort.c.
References Assert, fb(), LEADER, TSS_INITIAL, TUPLESORT_ALLOWBOUNDED, and WORKER.
Referenced by ExecIncrementalSort(), ExecSort(), and switchToPresortedPrefixMode().
| bool tuplesort_skiptuples | ( | Tuplesortstate * | state, |
| int64 | ntuples, | ||
| bool | forward | ||
| ) |
Definition at line 1607 of file tuplesort.c.
References Assert, CHECK_FOR_INTERRUPTS, elog, ERROR, fb(), MemoryContextSwitchTo(), TSS_FINALMERGE, TSS_SORTEDINMEM, TSS_SORTEDONTAPE, tuplesort_gettuple_common(), and WORKER.
Referenced by percentile_cont_final_common(), percentile_cont_multi_final_common(), percentile_disc_final(), and percentile_disc_multi_final().
|
static |
Definition at line 2994 of file tuplesort.c.
References Assert, SortSupportData::comparator, fb(), LEADER, QSORT_THRESHOLD, radix_sort_tuple(), ssup_datum_int32_cmp(), ssup_datum_signed_cmp(), ssup_datum_unsigned_cmp(), and verify_memtuples_sorted().
Referenced by dumptuples(), and tuplesort_performsort().
| const char * tuplesort_space_type_name | ( | TuplesortSpaceType | t | ) |
Definition at line 2463 of file tuplesort.c.
References Assert, SORT_SPACE_TYPE_DISK, and SORT_SPACE_TYPE_MEMORY.
Referenced by show_incremental_sort_group_info(), and show_sort_info().
|
static |
Definition at line 865 of file tuplesort.c.
References fb(), and LogicalTapeSetBlocks().
Referenced by tuplesort_get_stats(), and tuplesort_reset().
| bool tuplesort_used_bound | ( | Tuplesortstate * | state | ) |
Definition at line 783 of file tuplesort.c.
Referenced by ExecIncrementalSort().
|
static |
Definition at line 2977 of file tuplesort.c.
References Assert, and COMPARETUP.
Referenced by tuplesort_sort_memtuples().
|
static |
Definition at line 3317 of file tuplesort.c.
References Assert, fb(), LogicalTapeFreeze(), Sharedsort::mutex, output, pfree(), SpinLockAcquire(), SpinLockRelease(), Sharedsort::tapes, WORKER, and Sharedsort::workersFinished.
Referenced by mergeruns(), and worker_nomergeruns().
|
static |
Definition at line 3289 of file tuplesort.c.
References Assert, Sharedsort::currentWorker, Sharedsort::mutex, SpinLockAcquire(), SpinLockRelease(), and WORKER.
Referenced by tuplesort_begin_common().
|
static |
Definition at line 3355 of file tuplesort.c.
References Assert, fb(), WORKER, and worker_freeze_result_tape().
Referenced by tuplesort_performsort().
Definition at line 123 of file tuplesort.c.
Referenced by bytea_abbrev_abort(), dumptuples(), inittapes(), mergeruns(), network_abbrev_abort(), numeric_abbrev_abort(), tuplesort_begin_cluster(), tuplesort_begin_common(), tuplesort_begin_datum(), tuplesort_begin_heap(), tuplesort_begin_index_brin(), tuplesort_begin_index_btree(), tuplesort_begin_index_gin(), tuplesort_begin_index_gist(), tuplesort_begin_index_hash(), tuplesort_free(), tuplesort_performsort(), tuplesort_puttuple_common(), uuid_abbrev_abort(), and varstr_abbrev_abort().