mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Remove TRACE_SORT macro
The TRACE_SORT macro guarded the availability of the trace_sort GUC setting. But it has been enabled by default ever since it was introduced in PostgreSQL 8.1, and there have been no reports that someone wanted to disable it. So just remove the macro to simplify things. (For the avoidance of doubt: The trace_sort GUC is still there. This only removes the rarely-used macro guarding it.) Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://www.postgresql.org/message-id/flat/be5f7162-7c1d-44e3-9a78-74dcaa6529f2%40eisentraut.org
This commit is contained in:
@@ -2455,7 +2455,6 @@ varstr_abbrev_abort(int memtupcount, SortSupport ssup)
|
||||
* time there are differences within full key strings not captured in
|
||||
* abbreviations.
|
||||
*/
|
||||
#ifdef TRACE_SORT
|
||||
if (trace_sort)
|
||||
{
|
||||
double norm_abbrev_card = abbrev_distinct / (double) memtupcount;
|
||||
@@ -2465,7 +2464,6 @@ varstr_abbrev_abort(int memtupcount, SortSupport ssup)
|
||||
memtupcount, abbrev_distinct, key_distinct, norm_abbrev_card,
|
||||
sss->prop_card);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If the number of distinct abbreviated keys approximately matches the
|
||||
@@ -2527,12 +2525,10 @@ varstr_abbrev_abort(int memtupcount, SortSupport ssup)
|
||||
* of moderately high to high abbreviated cardinality. There is little to
|
||||
* lose but much to gain, which our strategy reflects.
|
||||
*/
|
||||
#ifdef TRACE_SORT
|
||||
if (trace_sort)
|
||||
elog(LOG, "varstr_abbrev: aborted abbreviation at %d "
|
||||
"(abbrev_distinct: %f, key_distinct: %f, prop_card: %f)",
|
||||
memtupcount, abbrev_distinct, key_distinct, sss->prop_card);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user