Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5622~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5622
Choose a head ref
  • 4 commits
  • 11 files changed
  • 3 contributors

Commits on Mar 3, 2025

  1. instr_time: Add INSTR_TIME_SET_SECONDS(), INSTR_TIME_IS_LT()

    INSTR_TIME_SET_SECONDS() is useful to calculate the end of a time-bound loop
    without having to convert into time units (which is
    costly). INSTR_TIME_IS_LT() can be used to check the loop condition.
    
    Author:
    Reviewed-by:
    Discussion: https://postgr.es/m/
    Backpatch:
    anarazel authored and Commitfest Bot committed Mar 3, 2025
    Configuration menu
    Copy the full SHA
    c85a5af View commit details
    Browse the repository at this point in the history
  2. wip: report nanoseconds in pg_test_timing

    This commit also updates pg_test_timing's documentation:
    
    - compare EXPLAIN (ANALYZE, TIMING ON/OFF) instead of comparing performance of
      of statement with/without EXPLAIN ANALYZE
    - explain the 2x overhead (due to two timestamp acquisitions per row)
    - remove old section about old versions of linux - I couldn't update the
      numbers, and it's old enough nobody would care
    anarazel authored and Commitfest Bot committed Mar 3, 2025
    Configuration menu
    Copy the full SHA
    4eb5f44 View commit details
    Browse the repository at this point in the history
  3. Use time stamp counter to measure time on Linux/x86

    We switch to using the time stamp counter (TSC) instead of clock_gettime()
    to reduce overhead of EXPLAIN (ANALYZE, TIME ON). Tests showed that runtime
    is reduced by around 10% for queries moving lots of rows through the plan.
    
    For now this is only enabled on Linux/x86, in case the system clocksource is
    reported as TSC. Relying on the Linux kernel simplifies the logic to detect
    if the present TSC is usable (frequency invariant, synchronized between
    sockets, etc.). In all other cases we fallback to clock_gettime().
    
    Note, that we intentionally use RDTSC in the fast paths, rather than RDTSCP.
    RDTSCP waits for outstanding instructions to retire on out-of-order CPUs.
    This adds noticably for little benefit in the typical InstrStartNode() /
    InstrStopNode() use case. The macro to be used in such cases is called
    INSTR_TIME_SET_CURRENT_FAST(). The original macro INSTR_TIME_SET_CURRENT()
    uses RDTSCP and is supposed to be used when precision is more important
    than performance.
    
    Author: David Geier <[email protected]>
    Author: Andres Freund <[email protected]>
    Author: Lukas Fittl <[email protected]>
    Reviewed-by:
    Discussion: https://www.postgresql.org/message-id/flat/20200612232810.f46nbqkdhbutzqdg%40alap3.anarazel.de
    lfittl authored and Commitfest Bot committed Mar 3, 2025
    Configuration menu
    Copy the full SHA
    a1557c0 View commit details
    Browse the repository at this point in the history
  4. [CF 5622] v10 - Reduce timing overhead of EXPLAIN ANALYZE using rdtsc

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5622
    
    The branch will be overwritten each time a new patch version is posted to
    the thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Patch(es): https://www.postgresql.org/message-id/CAP53PkzO2KpscD-tgFW_V-4WS+vkniH4-B00eM-e0bsBF-xUxg@mail.gmail.com
    Author(s): Andres Freund, Lukas Fittl, David Geier
    Commitfest Bot committed Mar 3, 2025
    Configuration menu
    Copy the full SHA
    305835b View commit details
    Browse the repository at this point in the history
Loading