1. 12 Jul, 2022 1 commit
    • Tom Lane's avatar
      Invent qsort_interruptible(). · af72b088
      Tom Lane authored
      Justin Pryzby reported that some scenarios could cause gathering
      of extended statistics to spend many seconds in an un-cancelable
      qsort() operation.  To fix, invent qsort_interruptible(), which is
      just like qsort_arg() except that it will also do CHECK_FOR_INTERRUPTS
      every so often.  This bloats the backend by a couple of kB, which
      seems like a good investment.  (We considered just enabling
      CHECK_FOR_INTERRUPTS in the existing qsort and qsort_arg functions,
      but there are some callers for which that'd demonstrably be unsafe.
      Opt-in seems like a better way.)
      
      For now, just apply qsort_interruptible() in statistics collection.
      There's probably more places where it could be useful, but we can
      always change other call sites as we find problems.
      
      Back-patch to v14.  Before that we didn't have extended stats on
      expressions, so that the problem was less severe.  Also, this patch
      depends on the sort_template infrastructure introduced in v14.
      
      Tom Lane and Justin Pryzby
      
      Discussion: https://postgr.es/m/20220509000108.GQ28830@telsasoft.com
      af72b088
  2. 03 Mar, 2021 1 commit
  3. 05 Nov, 2019 1 commit
  4. 18 Dec, 2017 1 commit
    • Andres Freund's avatar
      Add shared tuplestores. · ab9e0e71
      Andres Freund authored
      SharedTuplestore allows multiple participants to write into it and
      then read the tuples back from it in parallel.  Each reader receives
      partial results.
      
      For now it always uses disk files, but other buffering policies and
      other kinds of scans (ie each reader receives complete results) may be
      useful in future.
      
      The upcoming parallel hash join feature will use this facility.
      
      Author: Thomas Munro
      Reviewed-By: Peter Geoghegan, Andres Freund, Robert Haas
      Discussion: https://postgr.es/m/CAEepm=2W=cOkiZxcg6qiFQP-dHUe09aqTrEMM7yJDrHMhDv_RA@mail.gmail.com
      ab9e0e71
  5. 15 Feb, 2012 2 commits
    • Robert Haas's avatar
      Fix VPATH builds, broken by my recent commit to speed up tuplesorting. · edec8c8e
      Robert Haas authored
      The relevant commit is 337b6f5e.
      edec8c8e
    • Robert Haas's avatar
      Speed up in-memory tuplesorting. · 337b6f5e
      Robert Haas authored
      Per recent work by Peter Geoghegan, it's significantly faster to
      tuplesort on a single sortkey if ApplySortComparator is inlined into
      quicksort rather reached via a function pointer.  It's also faster
      in general to have a version of quicksort which is specialized for
      sorting SortTuple objects rather than objects of arbitrary size and
      type.  This requires a couple of additional copies of the quicksort
      logic, which in this patch are generate using a Perl script.  There
      might be some benefit in adding further specializations here too,
      but thus far it's not clear that those gains are worth their weight
      in code footprint.
      337b6f5e
  6. 07 Dec, 2011 1 commit
    • Tom Lane's avatar
      Create a "sort support" interface API for faster sorting. · c6e3ac11
      Tom Lane authored
      This patch creates an API whereby a btree index opclass can optionally
      provide non-SQL-callable support functions for sorting.  In the initial
      patch, we only use this to provide a directly-callable comparator function,
      which can be invoked with a bit less overhead than the traditional
      SQL-callable comparator.  While that should be of value in itself, the real
      reason for doing this is to provide a datatype-extensible framework for
      more aggressive optimizations, as in Peter Geoghegan's recent work.
      
      Robert Haas and Tom Lane
      c6e3ac11
  7. 20 Sep, 2010 1 commit
  8. 19 Feb, 2008 1 commit
  9. 20 Jan, 2007 1 commit
  10. 29 Nov, 2003 1 commit
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  11. 31 Aug, 2000 1 commit
  12. 18 Jun, 2000 1 commit
    • Tom Lane's avatar
      Reimplement nodeMaterial to use a temporary BufFile (or even memory, if the · 1ee26b77
      Tom Lane authored
      materialized tupleset is small enough) instead of a temporary relation.
      This was something I was thinking of doing anyway for performance, and Jan
      says he needs it for TOAST because he doesn't want to cope with toasting
      noname relations.  With this change, the 'noname table' support in heap.c
      is dead code, and I have accordingly removed it.  Also clean up 'noname'
      plan handling in planner --- nonames are either sort or materialize plans,
      and it seems less confusing to handle them separately under those names.
      1ee26b77
  13. 29 May, 2000 1 commit
  14. 13 Dec, 1999 1 commit
  15. 09 Dec, 1999 1 commit
  16. 17 Oct, 1999 1 commit
    • Tom Lane's avatar
      Final stage of psort reconstruction work: replace psort.c with · 26c48b5e
      Tom Lane authored
      a generalized module 'tuplesort.c' that can sort either HeapTuples or
      IndexTuples, and is not tied to execution of a Sort node.  Clean up
      memory leakages in sorting, and replace nbtsort.c's private implementation
      of mergesorting with calls to tuplesort.c.
      26c48b5e
  17. 16 Oct, 1999 1 commit
  18. 06 Apr, 1998 1 commit
    • Bruce Momjian's avatar
      Hi, · 1e801a8f
      Bruce Momjian authored
      Attached you'll find a (big) patch that fixes make dep and make
      depend in all Makefiles where I found it to be appropriate.
      
      It also removes the dependency in Makefile.global for NAMEDATALEN
      and OIDNAMELEN by making backend/catalog/genbki.sh and bin/initdb/initdb.sh
      a little smarter.
      
      This no longer requires initdb.sh that is turned into initdb with
      a sed script when installing Postgres, hence initdb.sh should be
      renamed to initdb (after the patch has been applied :-) )
      
      This patch is against the 6.3 sources, as it took a while to
      complete.
      
      Please review and apply,
      
      Cheers,
      
      Jeroen van Vianen
      1e801a8f
  19. 20 Dec, 1997 1 commit
  20. 19 Dec, 1997 1 commit
  21. 09 Nov, 1996 1 commit
  22. 27 Oct, 1996 1 commit