|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <limits.h>#include "commands/tablespace.h"#include "miscadmin.h"#include "pg_trace.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 |
Typedefs | |
| typedef union SlabSlot | SlabSlot |
Enumerations | |
| enum | TupSortStatus { TSS_INITIAL , TSS_BOUNDED , TSS_BUILDRUNS , TSS_SORTEDINMEM , TSS_SORTEDONTAPE , TSS_FINALMERGE } |
Variables | |
| bool | trace_sort = false |
Definition at line 393 of file tuplesort.c.
Definition at line 399 of file tuplesort.c.
| #define FREESTATE | ( | state | ) | ((state)->base.freestate ? (*(state)->base.freestate) (state) : (void) 0) |
Definition at line 396 of file tuplesort.c.
| #define INITIAL_MEMTUPSIZE |
Definition at line 118 of file tuplesort.c.
Definition at line 372 of file tuplesort.c.
Definition at line 397 of file tuplesort.c.
Definition at line 402 of file tuplesort.c.
Definition at line 175 of file tuplesort.c.
Definition at line 177 of file tuplesort.c.
Definition at line 174 of file tuplesort.c.
Definition at line 395 of file tuplesort.c.
Definition at line 380 of file tuplesort.c.
Definition at line 392 of file tuplesort.c.
| #define SLAB_SLOT_SIZE 1024 |
Definition at line 140 of file tuplesort.c.
| #define ST_CHECK_FOR_INTERRUPTS |
Definition at line 571 of file tuplesort.c.
| #define ST_CHECK_FOR_INTERRUPTS |
Definition at line 571 of file tuplesort.c.
| #define ST_CHECK_FOR_INTERRUPTS |
Definition at line 571 of file tuplesort.c.
| #define ST_CHECK_FOR_INTERRUPTS |
Definition at line 571 of file tuplesort.c.
| #define ST_CHECK_FOR_INTERRUPTS |
Definition at line 571 of file tuplesort.c.
Definition at line 569 of file tuplesort.c.
Definition at line 569 of file tuplesort.c.
Definition at line 569 of file tuplesort.c.
Definition at line 569 of file tuplesort.c.
| #define ST_COMPARE_ARG_TYPE Tuplesortstate |
Definition at line 570 of file tuplesort.c.
| #define ST_COMPARE_ARG_TYPE Tuplesortstate |
Definition at line 570 of file tuplesort.c.
| #define ST_COMPARE_ARG_TYPE Tuplesortstate |
Definition at line 570 of file tuplesort.c.
| #define ST_COMPARE_ARG_TYPE Tuplesortstate |
Definition at line 570 of file tuplesort.c.
| #define ST_COMPARE_ARG_TYPE SortSupportData |
Definition at line 570 of file tuplesort.c.
| #define ST_COMPARE_RUNTIME_POINTER |
Definition at line 596 of file tuplesort.c.
| #define ST_DECLARE |
Definition at line 600 of file tuplesort.c.
| #define ST_DEFINE |
Definition at line 573 of file tuplesort.c.
| #define ST_DEFINE |
Definition at line 573 of file tuplesort.c.
| #define ST_DEFINE |
Definition at line 573 of file tuplesort.c.
| #define ST_DEFINE |
Definition at line 573 of file tuplesort.c.
| #define ST_DEFINE |
Definition at line 573 of file tuplesort.c.
Definition at line 568 of file tuplesort.c.
Definition at line 568 of file tuplesort.c.
Definition at line 568 of file tuplesort.c.
Definition at line 568 of file tuplesort.c.
Definition at line 568 of file tuplesort.c.
Definition at line 572 of file tuplesort.c.
Definition at line 572 of file tuplesort.c.
Definition at line 572 of file tuplesort.c.
Definition at line 572 of file tuplesort.c.
Definition at line 572 of file tuplesort.c.
| #define ST_SORT qsort_tuple_unsigned |
Definition at line 567 of file tuplesort.c.
| #define ST_SORT qsort_tuple_signed |
Definition at line 567 of file tuplesort.c.
| #define ST_SORT qsort_tuple_int32 |
Definition at line 567 of file tuplesort.c.
| #define ST_SORT qsort_tuple |
Definition at line 567 of file tuplesort.c.
| #define ST_SORT qsort_ssup |
Definition at line 567 of file tuplesort.c.
Definition at line 176 of file tuplesort.c.
Definition at line 398 of file tuplesort.c.
Definition at line 401 of file tuplesort.c.
Definition at line 394 of file tuplesort.c.
| Enumerator | |
|---|---|
| TSS_INITIAL | |
| TSS_BOUNDED | |
| TSS_BUILDRUNS | |
| TSS_SORTEDINMEM | |
| TSS_SORTEDONTAPE | |
| TSS_FINALMERGE | |
Definition at line 152 of file tuplesort.c.
|
static |
Definition at line 2245 of file tuplesort.c.
References Assert, fb(), mergereadnext(), Min, SortTuple::srctape, and tuplesort_heap_insert().
Referenced by mergeonerun(), and mergeruns().
|
static |
Definition at line 1304 of file tuplesort.c.
References Assert, fb(), and TSS_INITIAL.
Referenced by tuplesort_puttuple_common().
|
static |
Definition at line 2292 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 3111 of file tuplesort.c.
References fb(), FREEMEM, GetMemoryChunkSpace(), and pfree().
Referenced by make_bounded_heap(), and tuplesort_puttuple_common().
|
static |
Definition at line 2839 of file tuplesort.c.
References elog, ERROR, fb(), len, and LogicalTapeRead().
Referenced by mergereadnext(), and tuplesort_gettuple_common().
|
static |
Definition at line 1037 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 1966 of file tuplesort.c.
References fb(), i, palloc(), SLAB_SLOT_SIZE, and USEMEM.
Referenced by mergeruns().
|
static |
Definition at line 1850 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 1899 of file tuplesort.c.
References fb(), GetMemoryChunkSpace(), PrepareTempTablespaces(), TAPE_BUFFER_OVERHEAD, and USEMEM.
Referenced by inittapes(), and leader_takeover_tapes().
|
static |
Definition at line 3052 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 2572 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 2852 of file tuplesort.c.
References fb(), len, and LogicalTapeWrite().
Referenced by dumptuples(), and mergeonerun().
|
static |
Definition at line 1818 of file tuplesort.c.
References fb(), Max, Min, and TAPE_BUFFER_OVERHEAD.
Referenced by mergeruns().
|
static |
Definition at line 2185 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 2273 of file tuplesort.c.
References fb(), getlen(), and READTUP.
Referenced by beginmerge(), mergeonerun(), and tuplesort_gettuple_common().
|
static |
Definition at line 2002 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().
|
static |
Definition at line 537 of file tuplesort.c.
References a, ApplyInt32SortComparator(), b, compare(), and fb().
|
static |
Definition at line 514 of file tuplesort.c.
References a, ApplySignedSortComparator(), b, compare(), and fb().
|
static |
Definition at line 492 of file tuplesort.c.
References a, ApplyUnsignedSortComparator(), b, compare(), and fb().
|
static |
Definition at line 2821 of file tuplesort.c.
References fb().
Referenced by make_bounded_heap(), and sort_bounded_heap().
|
static |
Definition at line 1933 of file tuplesort.c.
References Assert, fb(), and LogicalTapeCreate().
Referenced by dumptuples(), inittapes(), and mergeruns().
|
static |
Definition at line 2621 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 3147 of file tuplesort.c.
References DatumGetInt32(), fb(), x, and y.
Referenced by btint4sortsupport(), date_sortsupport(), and tuplesort_sort_memtuples().
| int ssup_datum_signed_cmp | ( | Datum | x, |
| Datum | y, | ||
| SortSupport | ssup | ||
| ) |
Definition at line 3133 of file tuplesort.c.
References DatumGetInt64(), fb(), x, and y.
Referenced by btint8sortsupport(), timestamp_sortsupport(), and tuplesort_sort_memtuples().
| int ssup_datum_unsigned_cmp | ( | Datum | x, |
| Datum | y, | ||
| SortSupport | ssup | ||
| ) |
Definition at line 3122 of file tuplesort.c.
Referenced by bytea_sortsupport(), gist_point_sortsupport(), macaddr_sortsupport(), network_sortsupport(), tuplesort_sort_memtuples(), uuid_sortsupport(), and varstr_sortsupport().
| void tuplesort_attach_shared | ( | Sharedsort * | shared, |
| dsm_segment * | seg | ||
| ) |
Definition at line 2944 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 741 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 635 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 936 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 2900 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 882 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 2484 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 1455 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 2757 of file tuplesort.c.
References tuplesort_heap_replace_top().
Referenced by mergeonerun(), sort_bounded_heap(), and tuplesort_gettuple_common().
|
static |
Definition at line 2722 of file tuplesort.c.
References Assert, CHECK_FOR_INTERRUPTS, COMPARETUP, i, and j.
Referenced by beginmerge(), and make_bounded_heap().
|
static |
Definition at line 2781 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 2921 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 2420 of file tuplesort.c.
References Assert, elog, ERROR, LogicalTapeTell(), MemoryContextSwitchTo(), TSS_SORTEDINMEM, TSS_SORTEDONTAPE, and TUPLESORT_RANDOMACCESS.
Referenced by ExecSortMarkPos().
Definition at line 1763 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 2528 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 1348 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 1154 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 2866 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 2387 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 1004 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 2451 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 823 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 1695 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 2661 of file tuplesort.c.
References Assert, fb(), LEADER, ssup_datum_int32_cmp(), ssup_datum_signed_cmp(), and ssup_datum_unsigned_cmp().
Referenced by dumptuples(), and tuplesort_performsort().
| const char * tuplesort_space_type_name | ( | TuplesortSpaceType | t | ) |
Definition at line 2551 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 953 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 871 of file tuplesort.c.
Referenced by ExecIncrementalSort().
|
static |
Definition at line 2992 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 2964 of file tuplesort.c.
References Assert, Sharedsort::currentWorker, Sharedsort::mutex, SpinLockAcquire, SpinLockRelease, and WORKER.
Referenced by tuplesort_begin_common().
|
static |
Definition at line 3030 of file tuplesort.c.
References Assert, fb(), WORKER, and worker_freeze_result_tape().
Referenced by tuplesort_performsort().
Definition at line 122 of file tuplesort.c.
Referenced by bytea_abbrev_abort(), dumptuples(), inittapes(), macaddr_abbrev_abort(), 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().